Title: [126814] trunk/Source/_javascript_Core
Revision
126814
Author
[email protected]
Date
2012-08-27 16:03:03 -0700 (Mon, 27 Aug 2012)

Log Message

Remove opcode definition autogen for now
https://bugs.webkit.org/show_bug.cgi?id=95148

Reviewed by Mark Hahnenberg.

This isn't worth doing at the moment.

* DerivedSources.make:
* _javascript_Core.xcodeproj/project.pbxproj:
* bytecode/Opcode.h:
(JSC):
(JSC::padOpcodeName):
* bytecode/OpcodeDefinitions.h: Removed.
* bytecode/opcodes: Removed.
* opcode_definition_generator.py: Removed.
* opcode_generator.py: Removed.
* opcode_parser.py: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (126813 => 126814)


--- trunk/Source/_javascript_Core/ChangeLog	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,3 +1,23 @@
+2012-08-27  Oliver Hunt  <[email protected]>
+
+        Remove opcode definition autogen for now
+        https://bugs.webkit.org/show_bug.cgi?id=95148
+
+        Reviewed by Mark Hahnenberg.
+
+        This isn't worth doing at the moment.
+
+        * DerivedSources.make:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * bytecode/Opcode.h:
+        (JSC):
+        (JSC::padOpcodeName):
+        * bytecode/OpcodeDefinitions.h: Removed.
+        * bytecode/opcodes: Removed.
+        * opcode_definition_generator.py: Removed.
+        * opcode_generator.py: Removed.
+        * opcode_parser.py: Removed.
+
 2012-08-27  Mark Hahnenberg  <[email protected]>
 
         Remove uses of TypedArray ClassInfo from SpeculativeJIT::checkArgumentTypes

Modified: trunk/Source/_javascript_Core/DerivedSources.make (126813 => 126814)


--- trunk/Source/_javascript_Core/DerivedSources.make	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/DerivedSources.make	2012-08-27 23:03:03 UTC (rev 126814)
@@ -80,13 +80,6 @@
 KeywordLookup.h: KeywordLookupGenerator.py Keywords.table
 	python $^ > $@
 
-# Don't autogenerate these yet, as there are some dependency problems
-# interacting with the LLIntOffsetsExtractor
-# opcode_generator.py: opcode_definition_generator.py opcode_parser.py
-#
-# OpcodeDefinitions.h: opcode_generator.py | bytecode/opcodes
-#	python $< -i $| -m definition -o $@
-
 # udis86 instruction tables
 
 udis86_itab.h: $(_javascript_Core)/disassembler/udis86/itab.py $(_javascript_Core)/disassembler/udis86/optable.xml

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (126813 => 126814)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2012-08-27 23:03:03 UTC (rev 126814)
@@ -140,9 +140,9 @@
 		0F63944015C75F1D006A597C /* DFGStructureCheckHoistingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63943C15C75F14006A597C /* DFGStructureCheckHoistingPhase.cpp */; };
 		0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63945115D07051006A597C /* ArrayProfile.cpp */; };
 		0F63945515D07057006A597C /* ArrayProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63945215D07051006A597C /* ArrayProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F63948415E48118006A597C /* DFGArrayMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63948115E48114006A597C /* DFGArrayMode.cpp */; };
 		0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63948215E48114006A597C /* DFGArrayMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F766D2815A8CC1E008F363E /* JITStubRoutine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F766D2615A8CC1B008F363E /* JITStubRoutine.cpp */; };
@@ -573,7 +573,6 @@
 		A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DCB77912E3D90500911940 /* WriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E2EA690FB460CF00601F06 /* LiteralParser.h */; };
 		A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */; };
-		A7EC8C7A15E6E9500051E9A9 /* OpcodeDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = A758FB5C15E6C91B00AC9895 /* OpcodeDefinitions.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F9935D0FD7325100A0B2D0 /* JSONObject.h */; };
 		A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */; };
 		A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7FB60A3103F7DC20017A286 /* PropertyDescriptor.cpp */; };
@@ -898,9 +897,9 @@
 		0F63943D15C75F14006A597C /* DFGStructureCheckHoistingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStructureCheckHoistingPhase.h; path = dfg/DFGStructureCheckHoistingPhase.h; sourceTree = "<group>"; };
 		0F63945115D07051006A597C /* ArrayProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayProfile.cpp; sourceTree = "<group>"; };
 		0F63945215D07051006A597C /* ArrayProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayProfile.h; sourceTree = "<group>"; };
-		0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStructureAbstractValue.h; path = dfg/DFGStructureAbstractValue.h; sourceTree = "<group>"; };
 		0F63948115E48114006A597C /* DFGArrayMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGArrayMode.cpp; path = dfg/DFGArrayMode.cpp; sourceTree = "<group>"; };
 		0F63948215E48114006A597C /* DFGArrayMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArrayMode.h; path = dfg/DFGArrayMode.h; sourceTree = "<group>"; };
+		0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStructureAbstractValue.h; path = dfg/DFGStructureAbstractValue.h; sourceTree = "<group>"; };
 		0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAdjacencyList.h; path = dfg/DFGAdjacencyList.h; sourceTree = "<group>"; };
 		0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGEdge.h; path = dfg/DFGEdge.h; sourceTree = "<group>"; };
 		0F766D1C15A5028D008F363E /* JITStubRoutine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITStubRoutine.h; sourceTree = "<group>"; };
@@ -1333,11 +1332,6 @@
 		A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMv7Assembler.cpp; sourceTree = "<group>"; };
 		A7521E121429169A003C8D0C /* CardSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardSet.h; sourceTree = "<group>"; };
 		A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic32_64.cpp; sourceTree = "<group>"; };
-		A758FB5815E6C89400AC9895 /* opcode_definition_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = opcode_definition_generator.py; sourceTree = "<group>"; };
-		A758FB5915E6C89400AC9895 /* opcode_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = opcode_generator.py; sourceTree = "<group>"; };
-		A758FB5A15E6C89400AC9895 /* opcode_parser.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = opcode_parser.py; sourceTree = "<group>"; };
-		A758FB5C15E6C91B00AC9895 /* OpcodeDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpcodeDefinitions.h; sourceTree = "<group>"; };
-		A758FB5D15E6C91B00AC9895 /* opcodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = opcodes; sourceTree = "<group>"; };
 		A767FF9F14F4502900789059 /* JSCTypedArrayStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTypedArrayStubs.h; sourceTree = "<group>"; };
 		A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = "<group>"; };
 		A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITWriteBarrier.h; sourceTree = "<group>"; };
@@ -1599,9 +1593,6 @@
 		0867D691FE84028FC02AAC07 /* _javascript_Core */ = {
 			isa = PBXGroup;
 			children = (
-				A758FB5815E6C89400AC9895 /* opcode_definition_generator.py */,
-				A758FB5915E6C89400AC9895 /* opcode_generator.py */,
-				A758FB5A15E6C89400AC9895 /* opcode_parser.py */,
 				8604F4F2143A6C4400B295F5 /* ChangeLog */,
 				A718F8211178EB4B002465A7 /* create_regex_tables */,
 				937B63CC09E766D200A671DD /* DerivedSources.make */,
@@ -2486,8 +2477,6 @@
 				BCFD8C910EEB2EE700283848 /* JumpTable.h */,
 				969A07940ED1D3AE00F1F681 /* Opcode.cpp */,
 				969A07950ED1D3AE00F1F681 /* Opcode.h */,
-				A758FB5C15E6C91B00AC9895 /* OpcodeDefinitions.h */,
-				A758FB5D15E6C91B00AC9895 /* opcodes */,
 				0FD82E84141F3FDA00179C94 /* SpeculatedType.cpp */,
 				0FD82E4F141DAEA100179C94 /* SpeculatedType.h */,
 				1429D8830ED21C3D00B89619 /* SamplingTool.cpp */,
@@ -2907,7 +2896,6 @@
 				0F63945515D07057006A597C /* ArrayProfile.h in Headers */,
 				0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */,
 				0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */,
-				A7EC8C7A15E6E9500051E9A9 /* OpcodeDefinitions.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/_javascript_Core/bytecode/Opcode.h (126813 => 126814)


--- trunk/Source/_javascript_Core/bytecode/Opcode.h	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/bytecode/Opcode.h	2012-08-27 23:03:03 UTC (rev 126814)
@@ -30,8 +30,6 @@
 #ifndef Opcode_h
 #define Opcode_h
 
-#include "OpcodeDefinitions.h"
-
 #include <algorithm>
 #include <string.h>
 
@@ -39,10 +37,174 @@
 
 namespace JSC {
 
+    #define FOR_EACH_OPCODE_ID(macro) \
+        macro(op_enter, 1) \
+        macro(op_create_activation, 2) \
+        macro(op_init_lazy_reg, 2) \
+        macro(op_create_arguments, 2) \
+        macro(op_create_this, 2) \
+        macro(op_convert_this, 3) \
+        \
+        macro(op_new_object, 2) \
+        macro(op_new_array, 4) \
+        macro(op_new_array_buffer, 4) \
+        macro(op_new_regexp, 3) \
+        macro(op_mov, 3) \
+        \
+        macro(op_not, 3) \
+        macro(op_eq, 4) \
+        macro(op_eq_null, 3) \
+        macro(op_neq, 4) \
+        macro(op_neq_null, 3) \
+        macro(op_stricteq, 4) \
+        macro(op_nstricteq, 4) \
+        macro(op_less, 4) \
+        macro(op_lesseq, 4) \
+        macro(op_greater, 4) \
+        macro(op_greatereq, 4) \
+        \
+        macro(op_pre_inc, 2) \
+        macro(op_pre_dec, 2) \
+        macro(op_post_inc, 3) \
+        macro(op_post_dec, 3) \
+        macro(op_to_jsnumber, 3) \
+        macro(op_negate, 3) \
+        macro(op_add, 5) \
+        macro(op_mul, 5) \
+        macro(op_div, 5) \
+        macro(op_mod, 4) \
+        macro(op_sub, 5) \
+        \
+        macro(op_lshift, 4) \
+        macro(op_rshift, 4) \
+        macro(op_urshift, 4) \
+        macro(op_bitand, 5) \
+        macro(op_bitxor, 5) \
+        macro(op_bitor, 5) \
+        \
+        macro(op_check_has_instance, 2) \
+        macro(op_instanceof, 5) \
+        macro(op_typeof, 3) \
+        macro(op_is_undefined, 3) \
+        macro(op_is_boolean, 3) \
+        macro(op_is_number, 3) \
+        macro(op_is_string, 3) \
+        macro(op_is_object, 3) \
+        macro(op_is_function, 3) \
+        macro(op_in, 4) \
+        \
+        macro(op_resolve, 4) /* has value profiling */  \
+        macro(op_resolve_skip, 5) /* has value profiling */ \
+        macro(op_resolve_global, 6) /* has value profiling */ \
+        macro(op_resolve_global_dynamic, 7) /* has value profiling */ \
+        macro(op_get_scoped_var, 5) /* has value profiling */ \
+        macro(op_put_scoped_var, 4) \
+        macro(op_get_global_var, 4) /* has value profiling */ \
+        macro(op_get_global_var_watchable, 5) /* has value profiling */ \
+        macro(op_put_global_var, 3) \
+        macro(op_put_global_var_check, 5) \
+        macro(op_resolve_base, 5) /* has value profiling */ \
+        macro(op_ensure_property_exists, 3) \
+        macro(op_resolve_with_base, 5) /* has value profiling */ \
+        macro(op_resolve_with_this, 5) /* has value profiling */ \
+        macro(op_get_by_id, 9) /* has value profiling */ \
+        macro(op_get_by_id_out_of_line, 9) /* has value profiling */ \
+        macro(op_get_by_id_self, 9) /* has value profiling */ \
+        macro(op_get_by_id_proto, 9) /* has value profiling */ \
+        macro(op_get_by_id_chain, 9) /* has value profiling */ \
+        macro(op_get_by_id_getter_self, 9) /* has value profiling */ \
+        macro(op_get_by_id_getter_proto, 9) /* has value profiling */ \
+        macro(op_get_by_id_getter_chain, 9) /* has value profiling */ \
+        macro(op_get_by_id_custom_self, 9) /* has value profiling */ \
+        macro(op_get_by_id_custom_proto, 9) /* has value profiling */ \
+        macro(op_get_by_id_custom_chain, 9) /* has value profiling */ \
+        macro(op_get_by_id_generic, 9) /* has value profiling */ \
+        macro(op_get_array_length, 9) /* has value profiling */ \
+        macro(op_get_string_length, 9) /* has value profiling */ \
+        macro(op_get_arguments_length, 4) \
+        macro(op_put_by_id, 9) \
+        macro(op_put_by_id_out_of_line, 9) \
+        macro(op_put_by_id_transition, 9) \
+        macro(op_put_by_id_transition_direct, 9) \
+        macro(op_put_by_id_transition_direct_out_of_line, 9) \
+        macro(op_put_by_id_transition_normal, 9) \
+        macro(op_put_by_id_transition_normal_out_of_line, 9) \
+        macro(op_put_by_id_replace, 9) \
+        macro(op_put_by_id_generic, 9) \
+        macro(op_del_by_id, 4) \
+        macro(op_get_by_val, 6) /* has value profiling */ \
+        macro(op_get_argument_by_val, 6) /* must be the same size as op_get_by_val */ \
+        macro(op_get_by_pname, 7) \
+        macro(op_put_by_val, 5) \
+        macro(op_del_by_val, 4) \
+        macro(op_put_by_index, 4) \
+        macro(op_put_getter_setter, 5) \
+        \
+        macro(op_jmp, 2) \
+        macro(op_jtrue, 3) \
+        macro(op_jfalse, 3) \
+        macro(op_jeq_null, 3) \
+        macro(op_jneq_null, 3) \
+        macro(op_jneq_ptr, 4) \
+        macro(op_jless, 4) \
+        macro(op_jlesseq, 4) \
+        macro(op_jgreater, 4) \
+        macro(op_jgreatereq, 4) \
+        macro(op_jnless, 4) \
+        macro(op_jnlesseq, 4) \
+        macro(op_jngreater, 4) \
+        macro(op_jngreatereq, 4) \
+        macro(op_jmp_scopes, 3) \
+        macro(op_loop, 2) \
+        macro(op_loop_if_true, 3) \
+        macro(op_loop_if_false, 3) \
+        macro(op_loop_if_less, 4) \
+        macro(op_loop_if_lesseq, 4) \
+        macro(op_loop_if_greater, 4) \
+        macro(op_loop_if_greatereq, 4) \
+        macro(op_loop_hint, 1) \
+        macro(op_switch_imm, 4) \
+        macro(op_switch_char, 4) \
+        macro(op_switch_string, 4) \
+        \
+        macro(op_new_func, 4) \
+        macro(op_new_func_exp, 3) \
+        macro(op_call, 6) \
+        macro(op_call_eval, 6) \
+        macro(op_call_varargs, 5) \
+        macro(op_tear_off_activation, 3) \
+        macro(op_tear_off_arguments, 2) \
+        macro(op_ret, 2) \
+        macro(op_call_put_result, 3) /* has value profiling */ \
+        macro(op_ret_object_or_this, 3) \
+        macro(op_method_check, 1) \
+        \
+        macro(op_construct, 6) \
+        macro(op_strcat, 4) \
+        macro(op_to_primitive, 3) \
+        \
+        macro(op_get_pnames, 6) \
+        macro(op_next_pname, 7) \
+        \
+        macro(op_push_scope, 2) \
+        macro(op_pop_scope, 1) \
+        macro(op_push_new_scope, 4) \
+        \
+        macro(op_catch, 2) \
+        macro(op_throw, 2) \
+        macro(op_throw_reference_error, 2) \
+        \
+        macro(op_debug, 5) \
+        macro(op_profile_will_call, 2) \
+        macro(op_profile_did_call, 2) \
+        \
+        macro(op_end, 2) // end must be the last opcode in the list
+
     #define OPCODE_ID_ENUM(opcode, length) opcode,
         typedef enum { FOR_EACH_OPCODE_ID(OPCODE_ID_ENUM) } OpcodeID;
     #undef OPCODE_ID_ENUM
 
+    const int maxOpcodeLength = 9;
     const int numOpcodeIDs = op_end + 1;
 
     #define OPCODE_ID_LENGTHS(id, length) const int id##_length = length;

Deleted: trunk/Source/_javascript_Core/bytecode/OpcodeDefinitions.h (126813 => 126814)


--- trunk/Source/_javascript_Core/bytecode/OpcodeDefinitions.h	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/bytecode/OpcodeDefinitions.h	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,156 +0,0 @@
-// Automatically generated by opcode_generator.py -i bytecode/opcodes -o bytecode/OpcodeDefinitions.h -m definition. Do not edit.
-
-namespace JSC {
-
-#define FOR_EACH_OPCODE_ID(macro) \
-    macro(op_enter, 1) \
-    macro(op_create_activation, 2) \
-    macro(op_init_lazy_reg, 2) \
-    macro(op_create_arguments, 2) \
-    macro(op_create_this, 2) \
-    macro(op_convert_this, 3) \
-    macro(op_new_object, 2) \
-    macro(op_new_array, 4) \
-    macro(op_new_array_buffer, 4) \
-    macro(op_new_regexp, 3) \
-    macro(op_mov, 3) \
-    macro(op_not, 3) \
-    macro(op_eq, 4) \
-    macro(op_eq_null, 3) \
-    macro(op_neq, 4) \
-    macro(op_neq_null, 3) \
-    macro(op_stricteq, 4) \
-    macro(op_nstricteq, 4) \
-    macro(op_less, 4) \
-    macro(op_lesseq, 4) \
-    macro(op_greater, 4) \
-    macro(op_greatereq, 4) \
-    macro(op_pre_inc, 2) \
-    macro(op_pre_dec, 2) \
-    macro(op_post_inc, 3) \
-    macro(op_post_dec, 3) \
-    macro(op_to_jsnumber, 3) \
-    macro(op_negate, 3) \
-    macro(op_add, 5) \
-    macro(op_mul, 5) \
-    macro(op_div, 5) \
-    macro(op_mod, 4) \
-    macro(op_sub, 5) \
-    macro(op_lshift, 4) \
-    macro(op_rshift, 4) \
-    macro(op_urshift, 4) \
-    macro(op_bitand, 5) \
-    macro(op_bitxor, 5) \
-    macro(op_bitor, 5) \
-    macro(op_check_has_instance, 2) \
-    macro(op_instanceof, 5) \
-    macro(op_typeof, 3) \
-    macro(op_is_undefined, 3) \
-    macro(op_is_boolean, 3) \
-    macro(op_is_number, 3) \
-    macro(op_is_string, 3) \
-    macro(op_is_object, 3) \
-    macro(op_is_function, 3) \
-    macro(op_in, 4) \
-    macro(op_resolve, 4) \
-    macro(op_resolve_skip, 5) \
-    macro(op_resolve_global, 6) \
-    macro(op_resolve_global_dynamic, 7) \
-    macro(op_get_scoped_var, 5) \
-    macro(op_put_scoped_var, 4) \
-    macro(op_get_global_var, 4) \
-    macro(op_get_global_var_watchable, 5) \
-    macro(op_put_global_var, 3) \
-    macro(op_put_global_var_check, 5) \
-    macro(op_resolve_base, 5) \
-    macro(op_ensure_property_exists, 3) \
-    macro(op_resolve_with_base, 5) \
-    macro(op_resolve_with_this, 5) \
-    macro(op_get_by_id, 9) \
-    macro(op_get_by_id_out_of_line, 9) \
-    macro(op_get_by_id_self, 9) \
-    macro(op_get_by_id_proto, 9) \
-    macro(op_get_by_id_chain, 9) \
-    macro(op_get_by_id_getter_self, 9) \
-    macro(op_get_by_id_getter_proto, 9) \
-    macro(op_get_by_id_getter_chain, 9) \
-    macro(op_get_by_id_custom_self, 9) \
-    macro(op_get_by_id_custom_proto, 9) \
-    macro(op_get_by_id_custom_chain, 9) \
-    macro(op_get_by_id_generic, 9) \
-    macro(op_get_array_length, 9) \
-    macro(op_get_string_length, 9) \
-    macro(op_get_arguments_length, 4) \
-    macro(op_put_by_id, 9) \
-    macro(op_put_by_id_out_of_line, 9) \
-    macro(op_put_by_id_transition, 9) \
-    macro(op_put_by_id_transition_direct, 9) \
-    macro(op_put_by_id_transition_direct_out_of_line, 9) \
-    macro(op_put_by_id_transition_normal, 9) \
-    macro(op_put_by_id_transition_normal_out_of_line, 9) \
-    macro(op_put_by_id_replace, 9) \
-    macro(op_put_by_id_generic, 9) \
-    macro(op_del_by_id, 4) \
-    macro(op_get_by_val, 6) \
-    macro(op_get_argument_by_val, 6) \
-    macro(op_get_by_pname, 7) \
-    macro(op_put_by_val, 5) \
-    macro(op_del_by_val, 4) \
-    macro(op_put_by_index, 4) \
-    macro(op_put_getter_setter, 5) \
-    macro(op_jmp, 2) \
-    macro(op_jtrue, 3) \
-    macro(op_jfalse, 3) \
-    macro(op_jeq_null, 3) \
-    macro(op_jneq_null, 3) \
-    macro(op_jneq_ptr, 4) \
-    macro(op_jless, 4) \
-    macro(op_jlesseq, 4) \
-    macro(op_jgreater, 4) \
-    macro(op_jgreatereq, 4) \
-    macro(op_jnless, 4) \
-    macro(op_jnlesseq, 4) \
-    macro(op_jngreater, 4) \
-    macro(op_jngreatereq, 4) \
-    macro(op_jmp_scopes, 3) \
-    macro(op_loop, 2) \
-    macro(op_loop_if_true, 3) \
-    macro(op_loop_if_false, 3) \
-    macro(op_loop_if_less, 4) \
-    macro(op_loop_if_lesseq, 4) \
-    macro(op_loop_if_greater, 4) \
-    macro(op_loop_if_greatereq, 4) \
-    macro(op_loop_hint, 1) \
-    macro(op_switch_imm, 4) \
-    macro(op_switch_char, 4) \
-    macro(op_switch_string, 4) \
-    macro(op_new_func, 4) \
-    macro(op_new_func_exp, 3) \
-    macro(op_call, 6) \
-    macro(op_call_eval, 6) \
-    macro(op_call_varargs, 5) \
-    macro(op_tear_off_activation, 3) \
-    macro(op_tear_off_arguments, 2) \
-    macro(op_ret, 2) \
-    macro(op_call_put_result, 3) \
-    macro(op_ret_object_or_this, 3) \
-    macro(op_method_check, 1) \
-    macro(op_construct, 6) \
-    macro(op_strcat, 4) \
-    macro(op_to_primitive, 3) \
-    macro(op_get_pnames, 6) \
-    macro(op_next_pname, 7) \
-    macro(op_push_scope, 2) \
-    macro(op_pop_scope, 1) \
-    macro(op_push_new_scope, 4) \
-    macro(op_catch, 2) \
-    macro(op_throw, 2) \
-    macro(op_throw_reference_error, 2) \
-    macro(op_debug, 5) \
-    macro(op_profile_will_call, 2) \
-    macro(op_profile_did_call, 2) \
-    macro(op_end, 2)
-
-const int maxOpcodeLength = 9;
-
-}

Deleted: trunk/Source/_javascript_Core/bytecode/opcodes (126813 => 126814)


--- trunk/Source/_javascript_Core/bytecode/opcodes	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/bytecode/opcodes	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,184 +0,0 @@
-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms(with or without
-# modification(are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice(this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice(this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES(INCLUDING(BUT NOT LIMITED TO(THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT(INDIRECT(INCIDENTAL(SPECIAL,
-# EXEMPLARY(OR CONSEQUENTIAL DAMAGES (INCLUDING(BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE(DATA(OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY(WHETHER IN CONTRACT(STRICT LIABILITY(OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE(EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-enter()
-create_activation(Register dst)
-init_lazy_reg(Register dst)
-create_arguments(Register dst)
-create_this(Register dst)
-convert_this(Register dst, ValueProfile profile)
-
-new_object(Register dst)
-new_array(Register dst, Register firstReg, int count)
-new_array_buffer(Register dst, int bufferIndex, int count)
-new_regexp(Register dst, int regexpIndex)
-mov(Register dst, Register src)
-
-not(Register dst, Register src)
-eq(Register dst, Register lhs, Register rhs)
-eq_null(Register dst, Register src)
-neq(Register dst, Register lhs, Register rhs)
-neq_null(Register dst, Register src)
-stricteq(Register dst, Register lhs, Register rhs)
-nstricteq(Register dst, Register lhs, Register rhs)
-less(Register dst, Register lhs, Register rhs)
-lesseq(Register dst, Register lhs, Register rhs)
-greater(Register dst, Register lhs, Register rhs)
-greatereq(Register dst, Register lhs, Register rhs)
-
-pre_inc(Register srcDst)
-pre_dec(Register srcDst)
-post_inc(Register dst, Register srcDst)
-post_dec(Register dst, Register srcDst)
-to_jsnumber(Register dst, Register src)
-negate(Register dst, Register src)
-add(Register dst, Register lhs, Register rhs, OperandTypes types)
-mul(Register dst, Register lhs, Register rhs, OperandTypes types)
-div(Register dst, Register lhs, Register rhs, OperandTypes types)
-mod(Register dst, Register lhs, Register rhs)
-sub(Register dst, Register lhs, Register rhs, OperandTypes types)
-
-lshift(Register dst, Register lhs, Register rhs)
-rshift(Register dst, Register lhs, Register rhs)
-urshift(Register dst, Register lhs, Register rhs)
-bitand(Register dst, Register lhs, Register rhs, OperandTypes types)
-bitxor(Register dst, Register lhs, Register rhs, OperandTypes types)
-bitor(Register dst, Register lhs, Register rhs, OperandTypes types)
-
-check_has_instance(Register src)
-instanceof(Register dst, Register value, Register base, Register basePrototype)
-typeof(Register dst, Register src)
-is_undefined(Register dst, Register src)
-is_boolean(Register dst, Register src)
-is_number(Register dst, Register src)
-is_string(Register dst, Register src)
-is_object(Register dst, Register src)
-is_function(Register dst, Register src)
-in(Register dst, Register property, Register base)
-
-resolve(Register dst, Identifier propertyName, ValueProfile profile) 
-uncached resolve_skip(Register dst, Identifier propertyName, int skip, ValueProfile profile)
-uncached resolve_global(Register dst, Identifier property, Structure structure, int offset, ValueProfile profile)
-uncached resolve_global_dynamic(Register dst, Identifier property, Structure structure, int offset, int depth, ValueProfile profile)
-uncached get_scoped_var(Register dst, int index, int depth, ValueProfile profile)
-uncached put_scoped_var(int index, int depth, Register src)
-uncached get_global_var(Register dst, ValuePointer valueLocation, ValueProfile profile)
-uncached get_global_var_watchable(Register dst, ValuePointer valueLocation, Identifier ident, ValueProfile profile)
-uncached put_global_var(ValuePointer destinationLocation, int index)
-uncached put_global_var_check(ValuePointer destinationLocation, int index, WatchPointer isWatched, Identifier ident)
-resolve_base(Register dst, Identifier property, bool isStrictPut, ValueProfile profile)
-ensure_property_exists(Register dst, Identifier property)
-resolve_with_base(Register baseDst, Register propDst, Identifier property, ValueProfile profile)
-resolve_with_this(Register baseDst, Register propDst, Identifier property, ValueProfile profile)
-get_by_id(Register dst, Register base, Identifier property, void, void, void, void, ValueProfile profile)
-uncached get_by_id_out_of_line(Register dst, Register base, Identifier property, void, void, void, void, ValueProfile profile)
-uncached get_by_id_self(Register dst, Register base, Identifier property, Structure structure, int offset, void, void, ValueProfile profile)
-uncached get_by_id_proto(Register dst, Register base, Identifier property, Structure structure, Structure prototypeStructure, int offset, void, ValueProfile profile)
-uncached get_by_id_chain(Register dst, Register base, Identifier property, Structure structure, StructureChain chain, int count, int offset, ValueProfile profile)
-uncached get_by_id_getter_self(Register dst, Register base, Identifier property, Structure structure, int offset, void, void, ValueProfile profile)
-uncached get_by_id_getter_proto(Register dst, Register base, Identifier property, Structure structure, Structure prototypeStructure, int offset, void, ValueProfile profile)
-uncached get_by_id_getter_chain(Register dst, Register base, Identifier property, Structure structure, StructureChain chain, int count, int offset, ValueProfile profile)
-uncached get_by_id_custom_self(Register dst, Register base, Identifier property, Structure structure, int offset, void, void, ValueProfile profile)
-uncached get_by_id_custom_proto(Register dst, Register base, Identifier property, Structure structure, Structure prototypeStructure, int offset, void, ValueProfile profile)
-uncached get_by_id_custom_chain(Register dst, Register base, Identifier property, Structure structure, StructureChain chain, int count, int offset, ValueProfile profile)
-uncached get_by_id_generic(Register dst, Register base, Identifier property, void, void, void, void, ValueProfile profile)
-uncached get_array_length(Register dst, Register base, Identifier property, void, void, void, void, ValueProfile profile)
-uncached get_string_length(Register dst, Register base, Identifier property, void, void, void, void, ValueProfile profile)
-get_arguments_length(Register dst, Register argumentsRegister, Identifier property)
-put_by_id(Register base, Identifier property, Register value, void, void, void, void, ValueProfile profile)
-uncached put_by_id_out_of_line(Register base, Identifier property, Register value, void, void, void, void, ValueProfile profile)
-uncached put_by_id_transition(Register base, Identifier property, Register value, Structure previousID, Structure newStructure, StructureChain prototypeChain, int offset, ValueProfile profile)
-uncached put_by_id_transition_direct(Register base, Identifier property, Register value, Structure previousID, Structure newStructure, StructureChain prototypeChain, int offset, ValueProfile profile)
-uncached put_by_id_transition_direct_out_of_line(Register base, Identifier property, Register value, Structure previousID, Structure newStructure, StructureChain prototypeChain, int offset, ValueProfile profile)
-uncached put_by_id_transition_normal(Register base, Identifier property, Register value, Structure previousID, Structure newStructure, StructureChain prototypeChain, int offset, ValueProfile profile)
-uncached put_by_id_transition_normal_out_of_line(Register base, Identifier property, Register value, Structure previousID, Structure newStructure, StructureChain prototypeChain, int offset, ValueProfile profile)
-uncached put_by_id_replace(Register base, Identifier property, Register value, Structure structure, int offset, void, void, ValueProfile profile)
-uncached put_by_id_generic(Register base, Identifier property, Register value, void, void, void, void, ValueProfile profile)
-del_by_id(Register dst, Register base, Identifier property)
-get_by_val(Register dst, Register base, Register property, ArrayProfile arrayProfile, ValueProfile profile)
-get_argument_by_val(Register dst, Register base, Register property, ArrayProfile arrayProfile, ValueProfile profile)
-get_by_pname(Register dst, Register base, Register property, Register expectedSubscript, Register iter, Register index)
-put_by_val(Register base, Register property, Register value, ArrayProfile arrayProfile)
-del_by_val(Register base, Register property, Register value)
-put_by_index(Register base, unsigned index, Register value)
-put_getter_setter(Register base, Identifier property, Register getter, Register setter)
-
-jmp(Label target)
-jtrue(Register condition, Label target)
-jfalse(Register condition, Label target)
-jeq_null(Register condition, Label target)
-jneq_null(Register condition, Label target)
-jneq_ptr(Register index, JSFunction function, Label target)
-jless(Register lhs, Register rhs, Label target)
-jlesseq(Register lhs, Register rhs, Label target)
-jgreater(Register lhs, Register rhs, Label target)
-jgreatereq(Register lhs, Register rhs, Label target)
-jnless(Register lhs, Register rhs, Label target)
-jnlesseq(Register lhs, Register rhs, Label target)
-jngreater(Register lhs, Register rhs, Label target)
-jngreatereq(Register lhs, Register rhs, Label target)
-jmp_scopes(int nNormalScopes, Label target)
-loop(Label target)
-loop_if_true(Register condition, Label target)
-loop_if_false(Register condition, Label target)
-loop_if_less(Register lhs, Register rhs, Label target)
-loop_if_lesseq(Register lhs, Register rhs, Label target)
-loop_if_greater(Register lhs, Register rhs, Label target)
-loop_if_greatereq(Register lhs, Register rhs, Label target)
-loop_hint()
-switch_imm(JumpTable index, Label default, Register scrutinee)
-switch_char(JumpTable index, Label default, Register scrutinee)
-switch_string(JumpTable index, Label default, Register scrutinee)
-
-new_func(Register dst, Function function, bool shouldNullCheck)
-new_func_exp(Register dst, FunctionExpression expr)
-call(Register function, Register argumentCountIncludingThis, Register registerOffset, LLIntCallLinkInfo callLinkInfo, void)
-call_eval(Register function, Register argumentCountIncludingThis, Register registerOffset, LLIntCallLinkInfo callLinkInfo, void)
-call_varargs(Register function, Register this, Register arguments, Register firstFreeRegister)
-tear_off_activation(Register activationRegister, Register argumentsRegister)
-tear_off_arguments(Register argumentsRegister)
-ret(Register result)
-call_put_result(Register dst, ValueProfile profile)
-ret_object_or_this(Register result, Register thisRegister)
-method_check()
-
-construct(Register func, int argCount, int registerOffset, Register proto, Register thisRegister)
-strcat(Register dst, Register src, int count)
-to_primitive(Register dst, Register src)
-
-get_pnames(Register dst, Register base, Register<int> i, Register<int> size, Label breakTarget)
-next_pname(Register dst, Register base, Register<int> i, Register<int> size, Register<JSPropertyNameIterator> iter, Label target)
-
-push_scope(Register scopeObject)
-pop_scope()
-push_new_scope(Register temporaryScopeStorage, Identifier property, Register value)
-
-catch(Register exceptionDst)
-throw(Register exception)
-throw_reference_error(Register exceptionMessage)
-
-uncached debug(void, void, void, void)
-uncached profile_will_call(void)
-uncached profile_did_call(void)
-
-end(Register result)  # end must be the last opcode in the list

Deleted: trunk/Source/_javascript_Core/opcode_definition_generator.py (126813 => 126814)


--- trunk/Source/_javascript_Core/opcode_definition_generator.py	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/opcode_definition_generator.py	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,42 +0,0 @@
-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms(with or without
-# modification(are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice(this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice(this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES(INCLUDING(BUT NOT LIMITED TO(THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT(INDIRECT(INCIDENTAL(SPECIAL,
-# EXEMPLARY(OR CONSEQUENTIAL DAMAGES (INCLUDING(BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE(DATA(OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY(WHETHER IN CONTRACT(STRICT LIABILITY(OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE(EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import operator
-import sys
-
-
-def generateOpcodeDefinition(opcode):
-    _, name, parameters = opcode
-    return "    macro(op_%s, %d)" % (name, len(parameters) + 1)
-
-
-def generate(outfile, opcodes):
-    outfile.write("// Automatically generated by %s. Do not edit.\n\n" % " ".join(sys.argv))
-    outfile.write("namespace JSC {\n\n")
-    outfile.write("#define FOR_EACH_OPCODE_ID(macro) \\\n")
-    lines = [generateOpcodeDefinition(opcode) for opcode in opcodes]
-    outfile.write(" \\\n".join(lines))
-    outfile.write("\n\n")
-    outfile.write("const int maxOpcodeLength = %d;\n" % (1 + reduce(lambda l, opcode: max(l, len(opcode[2])), opcodes, 0)))
-    outfile.write("\n}\n")
-    outfile.flush()

Deleted: trunk/Source/_javascript_Core/opcode_generator.py (126813 => 126814)


--- trunk/Source/_javascript_Core/opcode_generator.py	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/opcode_generator.py	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,94 +0,0 @@
-#!/usr/bin/python
-
-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms(with or without
-# modification(are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice(this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice(this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES(INCLUDING(BUT NOT LIMITED TO(THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT(INDIRECT(INCIDENTAL(SPECIAL,
-# EXEMPLARY(OR CONSEQUENTIAL DAMAGES (INCLUDING(BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE(DATA(OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY(WHETHER IN CONTRACT(STRICT LIABILITY(OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE(EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import sys
-import getopt
-import re
-
-import opcode_parser
-import opcode_definition_generator
-
-
-def printUsage():
-    print("Usage: %s -m [definition] [-i input] [-o output]" % (sys.argv[0]))
-
-
-def main(argv):
-    opts, args = getopt.getopt(argv, "ho:i:m:")
-    if len(args) != 0:
-        print(args)
-        printUsage()
-        sys.exit(1)
-    infilename = None
-    outfilename = None
-    mode = None
-    for opt, value in opts:
-        if opt == "-o":
-            if outfilename != None:
-                print("Multiple output files specified")
-                printUsage()
-                sys.exit(1)
-            outfilename = value
-        if opt == "-i":
-            if infilename != None:
-                print("Multiple output files specified")
-                printUsage()
-                sys.exit(1)
-            infilename = value
-        if opt == "-m":
-            if mode != None:
-                print("Multiple output modes specified")
-                printUsage()
-                sys.exit(1)
-            mode = value
-        if opt == "-h":
-            printUsage()
-            sys.exit()
-    if mode == None:
-        print("No output mode specified")
-        printUsage()
-        sys.exit(1)
-
-    infile = sys.stdin
-    outfile = sys.stdout
-    if infilename != None:
-        infile = file(infilename, "r", True)
-    if outfilename != None:
-        outfile = file(outfilename, "w", True)
-    input = [l for l in infile]
-    infile.close()
-    opcodes = opcode_parser.parseOpcodes(input)
-    if mode == "definition":
-        opcode_definition_generator.generate(outfile, opcodes)
-    else:
-        print("Invalid mode specified")
-        printUsage()
-        sys.exit(1)
-    outfile.close()
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])

Deleted: trunk/Source/_javascript_Core/opcode_parser.py (126813 => 126814)


--- trunk/Source/_javascript_Core/opcode_parser.py	2012-08-27 23:01:31 UTC (rev 126813)
+++ trunk/Source/_javascript_Core/opcode_parser.py	2012-08-27 23:03:03 UTC (rev 126814)
@@ -1,107 +0,0 @@
-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms(with or without
-# modification(are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice(this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice(this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES(INCLUDING(BUT NOT LIMITED TO(THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT(INDIRECT(INCIDENTAL(SPECIAL,
-# EXEMPLARY(OR CONSEQUENTIAL DAMAGES (INCLUDING(BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE(DATA(OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY(WHETHER IN CONTRACT(STRICT LIABILITY(OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE(EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import re
-
-
-class PrimitiveType:
-    def __init__(self, name, unlinkedType, linkedType):
-        self.name = name
-        self.unlinkedType = unlinkedType
-        self.linkedType = linkedType
-
-    def __repr__(self):
-        return self.name
-
-
-class RegisterType(PrimitiveType):
-    def __init__(self, name):
-        PrimitiveType.__init__(self, name, "int", "RegisterID")
-
-    def specialise(self, specialisation):
-        return PrimitiveType("%s<%s>" % (self.name, specialisation), "int", "RegisterID")
-
-types = {
-    "int": PrimitiveType("int", "int", "int"),
-    "unsigned": PrimitiveType("unsigned", "unsigned", "unsigned"),
-    "bool": PrimitiveType("bool", "bool", "bool"),
-    "void": PrimitiveType("void", None, "void*"),
-    "Register": RegisterType("Register"),
-    "OperandTypes": PrimitiveType("OperandTypes", "short", "OperandTypes"),
-    "Identifier": PrimitiveType("Identifier", "int", "int"),
-    "ValueProfile": PrimitiveType("ValueProfile", None, "ValueProfile*"),
-    "Structure": PrimitiveType("Structure", None, "Structure*"),
-    "StructureChain": PrimitiveType("Structure", None, "StructureChain*"),
-    "ValuePointer": PrimitiveType("ValuePointer", None, "WriteBarrier<Unknown>*"),
-    "WatchPointer": PrimitiveType("WatchPointer", None, "bool*"),
-    "ArrayProfile": PrimitiveType("ArrayProfile", None, "ArrayProfile*"),
-    "Label": PrimitiveType("Label", "int", "int"),
-    "JSFunction": PrimitiveType("JSFunction", "UnlinkedFunctionReference", "JSFunction*"),
-    "JumpTable": PrimitiveType("JumpTable", "int", "int"),
-    "Function": PrimitiveType("Function", "int", "int"),
-    "FunctionExpression": PrimitiveType("FunctionExpression", "int", "int"),
-    "LLIntCallLinkInfo": PrimitiveType("LLIntCallLinkInfo", None, "LLIntCallLinkInfo*"),
-}
-
-parameterString = r"((void)|((?!void\s*<)\w+(\s*<\w+>)?))(\s+\w+)?"
-parameterString = parameterString + r"(\s*,\s*" + parameterString + ")*"
-opcodeRegex = re.compile(r"(?P<isUncached>uncached\s+)?(?P<opcodeName>\w+)\(\s*(?P<parameters>" + parameterString + ")?\s*\)")
-parameterRegex = re.compile(r"(?P<baseType>\w+)\s*(<(?P<specialisation>\w+)>)?(\s+(?P<name>\w+))?")
-
-
-def makeType(base, specialisation):
-    result = types[base]
-    if specialisation:
-        result = result.specialise(specialisation)
-    return result
-
-
-def parseParameter(parameter):
-    match = parameterRegex.match(parameter)
-    return (makeType(match.group("baseType"), match.group("specialisation")), match.group("name"))
-
-
-def parseOpcode(line, lineNumber):
-    try:
-        match = opcodeRegex.match(line)
-        isUncached = match.group("isUncached") != None
-        name = match.group("opcodeName").strip()
-        if match.group("parameters"):
-            parameters = [parameter.strip() for parameter in match.group("parameters").split(",")]
-        else:
-            parameters = []
-        return (isUncached, name, [parseParameter(parameter) for parameter in parameters])
-    except:
-        print("Error on line %d" % lineNumber)
-        raise
-
-
-def parseOpcodes(lines):
-    # Strip comments and white space
-    commentStripper = re.compile("#.*")
-    i = 0
-    lines = [l.strip() for l in [commentStripper.sub("", l) for l in lines]]
-    lines = zip(lines, range(1, len(lines) + 1))
-    opcodes = [parseOpcode(opcode, line) for (opcode, line) in lines if len(opcode) != 0]
-    return opcodes
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to