Bug 96466

Summary: JSC: Refactor Opcodes to distinguish between core and extension opcodes
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: fpizlo, ggaren, ossy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Fix. none

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]
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]

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.