Bug 63879 - Reduce code duplication for op_jless, op_jlesseq, op_jnless, op_jnlesseq.
Summary: Reduce code duplication for op_jless, op_jlesseq, op_jnless, op_jnlesseq.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks: 63881
  Show dependency treegraph
 
Reported: 2011-07-03 15:33 PDT by Gavin Barraclough
Modified: 2011-07-03 22:59 PDT (History)
1 user (show)

See Also:


Attachments
Preliminare patch (45.86 KB, patch)
2011-07-03 15:34 PDT, Gavin Barraclough
no flags Details | Formatted Diff | Diff
The patch (47.98 KB, patch)
2011-07-03 16:35 PDT, Gavin Barraclough
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2011-07-03 15:33:31 PDT
There is a lot of copy & paste code here; we can reduce duplication by making a shared implementation.
Comment 1 Gavin Barraclough 2011-07-03 15:34:10 PDT
Created attachment 99584 [details]
Preliminare patch
Comment 2 Gavin Barraclough 2011-07-03 16:35:21 PDT
Created attachment 99585 [details]
The patch

SunSpider shows a small progression, likely just noise, but this patch will optimize op_loop_if_lesseq!
Comment 3 WebKit Review Bot 2011-07-03 18:31:07 PDT
Attachment 99585 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/jit/JIT.h:723:  The parameter name "condition" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JIT.h:723:  emit_compareAndJump is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/jit/JIT.h:724:  The parameter name "condition" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JIT.h:724:  The parameter name "iter" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JIT.h:724:  emit_compareAndJumpSlow is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/jit/JITArithmetic32_64.cpp:87:  JIT::emit_compareAndJump is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/jit/JITArithmetic32_64.cpp:138:  JIT::emit_compareAndJumpSlow is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/jit/JITArithmetic.cpp:318:  JIT::emit_compareAndJump is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Source/JavaScriptCore/jit/JITArithmetic.cpp:362:  JIT::emit_compareAndJumpSlow is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 9 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Gavin Barraclough 2011-07-03 22:59:32 PDT
Fixed in r90352