Bug 96466 - JSC: Refactor Opcodes to distinguish between core and extension opcodes
Summary: JSC: Refactor Opcodes to distinguish between core and extension opcodes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 96509 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-11 21:52 PDT by Mark Lam
Modified: 2012-09-12 15:20 PDT (History)
4 users (show)

See Also:


Attachments
Fix. (4.20 KB, patch)
2012-09-11 22:24 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2012-09-11 21:52:28 PDT
Previously, in the llint C++ interpreter (in LowLevelInterpreter.h), I declared a handful of llint opcode aliases for opcode that look like this:

const OpcodeID llint_op_call = op_call;
const OpcodeID llint_op_call_eval = op_call_eval;
...

When r128219 landed, it added a reference to llint_op_get_array_length, and this broke the C++ llint.  This demonstrates that the above approach is too fragile in practice.  So, I will refactor the FOR_EACH_OPCODE_ID() macro to create a separate FOR_EACH_CORE_OPCODE_ID() macro.  This FOR_EACH_CORE_OPCODE_ID() macro will be used to automatically declare the llint opcode aliases that the C++ llint needs.
Comment 1 Mark Lam 2012-09-11 22:24:04 PDT
Created attachment 163520 [details]
Fix.
Comment 2 WebKit Review Bot 2012-09-11 22:25:41 PDT
Attachment 163520 [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/bytecode/Opcode.h:42:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Lam 2012-09-11 22:27:24 PDT
The style checker will complain about indented code in the namespace.  This is needed to stay consistent with existing code in Opcode.h.  To resolve this complaint would mean making the changed code inconsistent with the rest, or go on an unindent spree that will make the diff hard to read.  It's better off the way it is right now.
Comment 4 Mark Lam 2012-09-12 07:44:05 PDT
*** Bug 96509 has been marked as a duplicate of this bug. ***
Comment 5 WebKit Review Bot 2012-09-12 15:20:15 PDT
Comment on attachment 163520 [details]
Fix.

Clearing flags on attachment: 163520

Committed r128369: <http://trac.webkit.org/changeset/128369>
Comment 6 WebKit Review Bot 2012-09-12 15:20:19 PDT
All reviewed patches have been landed.  Closing bug.