2008-10-14 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 02:39:52 +0000 (02:39 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 02:39:52 +0000 (02:39 +0000)
        Rubber stamped by Sam Weinig.

        - revert r37572 and r37581 for now

        Turns out GCC 4.2 is still a (small) regression, we'll have to do
        more work to turn it on.

        * Configurations/DebugRelease.xcconfig:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * VM/CTI.cpp:
        * VM/CTI.h:
        * VM/Machine.cpp:
        (JSC::Machine::cti_op_convert_this):
        (JSC::Machine::cti_op_end):
        (JSC::Machine::cti_op_add):
        (JSC::Machine::cti_op_pre_inc):
        (JSC::Machine::cti_timeout_check):
        (JSC::Machine::cti_register_file_check):
        (JSC::Machine::cti_op_loop_if_less):
        (JSC::Machine::cti_op_loop_if_lesseq):
        (JSC::Machine::cti_op_new_object):
        (JSC::Machine::cti_op_put_by_id):
        (JSC::Machine::cti_op_put_by_id_second):
        (JSC::Machine::cti_op_put_by_id_generic):
        (JSC::Machine::cti_op_put_by_id_fail):
        (JSC::Machine::cti_op_get_by_id):
        (JSC::Machine::cti_op_get_by_id_second):
        (JSC::Machine::cti_op_get_by_id_generic):
        (JSC::Machine::cti_op_get_by_id_fail):
        (JSC::Machine::cti_op_instanceof):
        (JSC::Machine::cti_op_del_by_id):
        (JSC::Machine::cti_op_mul):
        (JSC::Machine::cti_op_new_func):
        (JSC::Machine::cti_op_call_JSFunction):
        (JSC::Machine::cti_vm_compile):
        (JSC::Machine::cti_op_push_activation):
        (JSC::Machine::cti_op_call_NotJSFunction):
        (JSC::Machine::cti_op_create_arguments):
        (JSC::Machine::cti_op_tear_off_activation):
        (JSC::Machine::cti_op_tear_off_arguments):
        (JSC::Machine::cti_op_ret_profiler):
        (JSC::Machine::cti_op_ret_scopeChain):
        (JSC::Machine::cti_op_new_array):
        (JSC::Machine::cti_op_resolve):
        (JSC::Machine::cti_op_construct_JSConstruct):
        (JSC::Machine::cti_op_construct_NotJSConstruct):
        (JSC::Machine::cti_op_get_by_val):
        (JSC::Machine::cti_op_resolve_func):
        (JSC::Machine::cti_op_sub):
        (JSC::Machine::cti_op_put_by_val):
        (JSC::Machine::cti_op_put_by_val_array):
        (JSC::Machine::cti_op_lesseq):
        (JSC::Machine::cti_op_loop_if_true):
        (JSC::Machine::cti_op_negate):
        (JSC::Machine::cti_op_resolve_base):
        (JSC::Machine::cti_op_resolve_skip):
        (JSC::Machine::cti_op_resolve_global):
        (JSC::Machine::cti_op_div):
        (JSC::Machine::cti_op_pre_dec):
        (JSC::Machine::cti_op_jless):
        (JSC::Machine::cti_op_not):
        (JSC::Machine::cti_op_jtrue):
        (JSC::Machine::cti_op_post_inc):
        (JSC::Machine::cti_op_eq):
        (JSC::Machine::cti_op_lshift):
        (JSC::Machine::cti_op_bitand):
        (JSC::Machine::cti_op_rshift):
        (JSC::Machine::cti_op_bitnot):
        (JSC::Machine::cti_op_resolve_with_base):
        (JSC::Machine::cti_op_new_func_exp):
        (JSC::Machine::cti_op_mod):
        (JSC::Machine::cti_op_less):
        (JSC::Machine::cti_op_neq):
        (JSC::Machine::cti_op_post_dec):
        (JSC::Machine::cti_op_urshift):
        (JSC::Machine::cti_op_bitxor):
        (JSC::Machine::cti_op_new_regexp):
        (JSC::Machine::cti_op_bitor):
        (JSC::Machine::cti_op_call_eval):
        (JSC::Machine::cti_op_throw):
        (JSC::Machine::cti_op_get_pnames):
        (JSC::Machine::cti_op_next_pname):
        (JSC::Machine::cti_op_push_scope):
        (JSC::Machine::cti_op_pop_scope):
        (JSC::Machine::cti_op_typeof):
        (JSC::Machine::cti_op_is_undefined):
        (JSC::Machine::cti_op_is_boolean):
        (JSC::Machine::cti_op_is_number):
        (JSC::Machine::cti_op_is_string):
        (JSC::Machine::cti_op_is_object):
        (JSC::Machine::cti_op_is_function):
        (JSC::Machine::cti_op_stricteq):
        (JSC::Machine::cti_op_nstricteq):
        (JSC::Machine::cti_op_to_jsnumber):
        (JSC::Machine::cti_op_in):
        (JSC::Machine::cti_op_push_new_scope):
        (JSC::Machine::cti_op_jmp_scopes):
        (JSC::Machine::cti_op_put_by_index):
        (JSC::Machine::cti_op_switch_imm):
        (JSC::Machine::cti_op_switch_char):
        (JSC::Machine::cti_op_switch_string):
        (JSC::Machine::cti_op_del_by_val):
        (JSC::Machine::cti_op_put_getter):
        (JSC::Machine::cti_op_put_setter):
        (JSC::Machine::cti_op_new_error):
        (JSC::Machine::cti_op_debug):
        (JSC::Machine::cti_vm_throw):
        * VM/Machine.h:
        * masm/X86Assembler.h:
        (JSC::X86Assembler::emitRestoreArgumentReference):
        (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline):
        * wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37597 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/Configurations/DebugRelease.xcconfig
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/VM/CTI.cpp
JavaScriptCore/VM/CTI.h
JavaScriptCore/VM/Machine.cpp
JavaScriptCore/VM/Machine.h
JavaScriptCore/masm/X86Assembler.h
JavaScriptCore/wtf/Platform.h

index 8a1a3e021ca7abcc7025cf8ffe18e8c23434ac72..5ed569fcef944b19099c2468113f917716f086be 100644 (file)
@@ -1,3 +1,118 @@
+2008-10-14  Maciej Stachowiak  <mjs@apple.com>
+
+        Rubber stamped by Sam Weinig.
+        
+        - revert r37572 and r37581 for now
+        
+        Turns out GCC 4.2 is still a (small) regression, we'll have to do
+        more work to turn it on.
+
+        * Configurations/DebugRelease.xcconfig:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * VM/CTI.cpp:
+        * VM/CTI.h:
+        * VM/Machine.cpp:
+        (JSC::Machine::cti_op_convert_this):
+        (JSC::Machine::cti_op_end):
+        (JSC::Machine::cti_op_add):
+        (JSC::Machine::cti_op_pre_inc):
+        (JSC::Machine::cti_timeout_check):
+        (JSC::Machine::cti_register_file_check):
+        (JSC::Machine::cti_op_loop_if_less):
+        (JSC::Machine::cti_op_loop_if_lesseq):
+        (JSC::Machine::cti_op_new_object):
+        (JSC::Machine::cti_op_put_by_id):
+        (JSC::Machine::cti_op_put_by_id_second):
+        (JSC::Machine::cti_op_put_by_id_generic):
+        (JSC::Machine::cti_op_put_by_id_fail):
+        (JSC::Machine::cti_op_get_by_id):
+        (JSC::Machine::cti_op_get_by_id_second):
+        (JSC::Machine::cti_op_get_by_id_generic):
+        (JSC::Machine::cti_op_get_by_id_fail):
+        (JSC::Machine::cti_op_instanceof):
+        (JSC::Machine::cti_op_del_by_id):
+        (JSC::Machine::cti_op_mul):
+        (JSC::Machine::cti_op_new_func):
+        (JSC::Machine::cti_op_call_JSFunction):
+        (JSC::Machine::cti_vm_compile):
+        (JSC::Machine::cti_op_push_activation):
+        (JSC::Machine::cti_op_call_NotJSFunction):
+        (JSC::Machine::cti_op_create_arguments):
+        (JSC::Machine::cti_op_tear_off_activation):
+        (JSC::Machine::cti_op_tear_off_arguments):
+        (JSC::Machine::cti_op_ret_profiler):
+        (JSC::Machine::cti_op_ret_scopeChain):
+        (JSC::Machine::cti_op_new_array):
+        (JSC::Machine::cti_op_resolve):
+        (JSC::Machine::cti_op_construct_JSConstruct):
+        (JSC::Machine::cti_op_construct_NotJSConstruct):
+        (JSC::Machine::cti_op_get_by_val):
+        (JSC::Machine::cti_op_resolve_func):
+        (JSC::Machine::cti_op_sub):
+        (JSC::Machine::cti_op_put_by_val):
+        (JSC::Machine::cti_op_put_by_val_array):
+        (JSC::Machine::cti_op_lesseq):
+        (JSC::Machine::cti_op_loop_if_true):
+        (JSC::Machine::cti_op_negate):
+        (JSC::Machine::cti_op_resolve_base):
+        (JSC::Machine::cti_op_resolve_skip):
+        (JSC::Machine::cti_op_resolve_global):
+        (JSC::Machine::cti_op_div):
+        (JSC::Machine::cti_op_pre_dec):
+        (JSC::Machine::cti_op_jless):
+        (JSC::Machine::cti_op_not):
+        (JSC::Machine::cti_op_jtrue):
+        (JSC::Machine::cti_op_post_inc):
+        (JSC::Machine::cti_op_eq):
+        (JSC::Machine::cti_op_lshift):
+        (JSC::Machine::cti_op_bitand):
+        (JSC::Machine::cti_op_rshift):
+        (JSC::Machine::cti_op_bitnot):
+        (JSC::Machine::cti_op_resolve_with_base):
+        (JSC::Machine::cti_op_new_func_exp):
+        (JSC::Machine::cti_op_mod):
+        (JSC::Machine::cti_op_less):
+        (JSC::Machine::cti_op_neq):
+        (JSC::Machine::cti_op_post_dec):
+        (JSC::Machine::cti_op_urshift):
+        (JSC::Machine::cti_op_bitxor):
+        (JSC::Machine::cti_op_new_regexp):
+        (JSC::Machine::cti_op_bitor):
+        (JSC::Machine::cti_op_call_eval):
+        (JSC::Machine::cti_op_throw):
+        (JSC::Machine::cti_op_get_pnames):
+        (JSC::Machine::cti_op_next_pname):
+        (JSC::Machine::cti_op_push_scope):
+        (JSC::Machine::cti_op_pop_scope):
+        (JSC::Machine::cti_op_typeof):
+        (JSC::Machine::cti_op_is_undefined):
+        (JSC::Machine::cti_op_is_boolean):
+        (JSC::Machine::cti_op_is_number):
+        (JSC::Machine::cti_op_is_string):
+        (JSC::Machine::cti_op_is_object):
+        (JSC::Machine::cti_op_is_function):
+        (JSC::Machine::cti_op_stricteq):
+        (JSC::Machine::cti_op_nstricteq):
+        (JSC::Machine::cti_op_to_jsnumber):
+        (JSC::Machine::cti_op_in):
+        (JSC::Machine::cti_op_push_new_scope):
+        (JSC::Machine::cti_op_jmp_scopes):
+        (JSC::Machine::cti_op_put_by_index):
+        (JSC::Machine::cti_op_switch_imm):
+        (JSC::Machine::cti_op_switch_char):
+        (JSC::Machine::cti_op_switch_string):
+        (JSC::Machine::cti_op_del_by_val):
+        (JSC::Machine::cti_op_put_getter):
+        (JSC::Machine::cti_op_put_setter):
+        (JSC::Machine::cti_op_new_error):
+        (JSC::Machine::cti_op_debug):
+        (JSC::Machine::cti_vm_throw):
+        * VM/Machine.h:
+        * masm/X86Assembler.h:
+        (JSC::X86Assembler::emitRestoreArgumentReference):
+        (JSC::X86Assembler::emitRestoreArgumentReferenceForTrampoline):
+        * wtf/Platform.h:
+
 2008-10-14  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin Adler.
index 1c052dba22b4431908cf6d9706b268f2ae80297f..4f5699a5be65804e39654bfa9520e21c9b541113 100644 (file)
@@ -6,7 +6,3 @@ MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
 MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
 
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
-
-GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
-GCC_VERSION_0310 = 4.2;
-GCC_VERSION_0311 = 4.2;
index 776b178acc228ab90f4425cdd67c44988b8ee805..dad3bdbabadb12f16d8283fc3af77470e6b50bdf 100644 (file)
                E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EF79A80CE97BA60088D500 /* UTF8.cpp */; };
 /* End PBXBuildFile section */
 
+/* Begin PBXBuildRule section */
+               1CFE4BEC0B0BA1EB00CC444D /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.c;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               1CFE4BF10B0BA22200CC444D /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.cpp;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B88E0014FEFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.c;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B88E0014FFFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.cpp;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B88F0014FEFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.c;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B88F0014FFFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.cpp;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B89F0014FEFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.c;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+               5DAD97A80B39B89F0014FFFF /* PBXBuildRule */ = {
+                       isa = PBXBuildRule;
+                       compilerSpec = com.apple.compilers.gcc.4_0;
+                       fileType = sourcecode.cpp;
+                       isEditable = 1;
+                       outputFiles = (
+                       );
+               };
+/* End PBXBuildRule section */
+
 /* Begin PBXContainerItemProxy section */
                141211350A48796100480255 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                                144005C70A5338C60005F061 /* Headers */,
                        );
                        buildRules = (
+                               5DAD97A80B39B88E0014FEFF /* PBXBuildRule */,
+                               5DAD97A80B39B88E0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                141211360A48796100480255 /* PBXTargetDependency */,
                                14BD59BD0A3E8F9000BAF59C /* Frameworks */,
                        );
                        buildRules = (
+                               5DAD97A80B39B88F0014FEFF /* PBXBuildRule */,
+                               5DAD97A80B39B88F0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                14270B080A451DA10080EEEA /* PBXTargetDependency */,
                                1C395CBC0C6BCC16000D1E52 /* Generate 64-bit Export File */,
                        );
                        buildRules = (
+                               1CFE4BF10B0BA22200CC444D /* PBXBuildRule */,
+                               1CFE4BEC0B0BA1EB00CC444D /* PBXBuildRule */,
                        );
                        dependencies = (
                                65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
                                5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */,
                        );
                        buildRules = (
+                               5DAD97A80B39B89F0014FEFF /* PBXBuildRule */,
+                               5DAD97A80B39B89F0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                14270B0C0A451DA40080EEEA /* PBXTargetDependency */,
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */;
                        buildSettings = {
+                               GCC_VERSION = 4.0;
                                STRIP_INSTALLED_PRODUCT = NO;
                        };
                        name = Release;
index 95cd8ee966015d02690c36310a50cb862f3fee9e..83b82e7559c239c8205c44b40bbba1ca2b52f89d 100644 (file)
@@ -108,8 +108,16 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
 asm(
 ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
 SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
+#if USE(CTI_ARGUMENT)
+#if USE(FAST_CALL_CTI_ARGUMENT)
     "movl %esp, %ecx" "\n"
+#else
+    "movl %esp, 0(%esp)" "\n"
+#endif
     "call " SYMBOL_STRING(_ZN3JSC7Machine12cti_vm_throwEPPv) "\n"
+#else
+    "call " SYMBOL_STRING(_ZN3JSC7Machine12cti_vm_throwEPv) "\n"
+#endif
     "addl $0x24, %esp" "\n"
     "popl %edi" "\n"
     "popl %esi" "\n"
index 16271c98c106214c40a5bbbe05548d2ceb9a5328..4b6cbdaef1899160bae6d8309852dfba169c8ab9 100644 (file)
 #define CTI_ARGS_exception 0x0F
 #define CTI_ARGS_profilerReference 0x10
 #define CTI_ARGS_globalData 0x11
-#define ARG_registerFile ((RegisterFile*)(args)[CTI_ARGS_registerFile])
-#define ARG_callFrame ((CallFrame*)(args)[CTI_ARGS_callFrame])
-#define ARG_exception ((JSValue**)(args)[CTI_ARGS_exception])
-#define ARG_profilerReference ((Profiler**)(args)[CTI_ARGS_profilerReference])
-#define ARG_globalData ((JSGlobalData*)(args)[CTI_ARGS_globalData])
-
-#define ARG_setCallFrame(newCallFrame) (*(CallFrame**)&(args)[CTI_ARGS_callFrame] = (newCallFrame))
-
-#define ARG_src1 ((JSValue*)((args)[1]))
-#define ARG_src2 ((JSValue*)((args)[2]))
-#define ARG_src3 ((JSValue*)((args)[3]))
-#define ARG_src4 ((JSValue*)((args)[4]))
-#define ARG_src5 ((JSValue*)((args)[5]))
-#define ARG_id1 ((Identifier*)((args)[1]))
-#define ARG_id2 ((Identifier*)((args)[2]))
-#define ARG_id3 ((Identifier*)((args)[3]))
-#define ARG_id4 ((Identifier*)((args)[4]))
-#define ARG_int1 ((int)((args)[1]))
-#define ARG_int2 ((int)((args)[2]))
-#define ARG_int3 ((int)((args)[3]))
-#define ARG_int4 ((int)((args)[4]))
-#define ARG_int5 ((int)((args)[5]))
-#define ARG_func1 ((FuncDeclNode*)((args)[1]))
-#define ARG_funcexp1 ((FuncExprNode*)((args)[1]))
-#define ARG_registers1 ((Register*)((args)[1]))
-#define ARG_regexp1 ((RegExp*)((args)[1]))
-#define ARG_pni1 ((JSPropertyNameIterator*)((args)[1]))
-#define ARG_instr1 ((Instruction*)((args)[1]))
-#define ARG_instr2 ((Instruction*)((args)[2]))
-#define ARG_instr3 ((Instruction*)((args)[3]))
-#define ARG_instr4 ((Instruction*)((args)[4]))
-#define ARG_instr5 ((Instruction*)((args)[5]))
-#define ARG_instr6 ((Instruction*)((args)[6]))
-
-#define CTI_RETURN_ADDRESS ((args)[-1])
+#define ARG_registerFile ((RegisterFile*)(ARGS)[CTI_ARGS_registerFile])
+#define ARG_callFrame ((CallFrame*)(ARGS)[CTI_ARGS_callFrame])
+#define ARG_exception ((JSValue**)(ARGS)[CTI_ARGS_exception])
+#define ARG_profilerReference ((Profiler**)(ARGS)[CTI_ARGS_profilerReference])
+#define ARG_globalData ((JSGlobalData*)(ARGS)[CTI_ARGS_globalData])
+
+#define ARG_setCallFrame(newCallFrame) (*(CallFrame**)&(ARGS)[CTI_ARGS_callFrame] = (newCallFrame))
+
+#define ARG_src1 ((JSValue*)((ARGS)[1]))
+#define ARG_src2 ((JSValue*)((ARGS)[2]))
+#define ARG_src3 ((JSValue*)((ARGS)[3]))
+#define ARG_src4 ((JSValue*)((ARGS)[4]))
+#define ARG_src5 ((JSValue*)((ARGS)[5]))
+#define ARG_id1 ((Identifier*)((ARGS)[1]))
+#define ARG_id2 ((Identifier*)((ARGS)[2]))
+#define ARG_id3 ((Identifier*)((ARGS)[3]))
+#define ARG_id4 ((Identifier*)((ARGS)[4]))
+#define ARG_int1 ((int)((ARGS)[1]))
+#define ARG_int2 ((int)((ARGS)[2]))
+#define ARG_int3 ((int)((ARGS)[3]))
+#define ARG_int4 ((int)((ARGS)[4]))
+#define ARG_int5 ((int)((ARGS)[5]))
+#define ARG_func1 ((FuncDeclNode*)((ARGS)[1]))
+#define ARG_funcexp1 ((FuncExprNode*)((ARGS)[1]))
+#define ARG_registers1 ((Register*)((ARGS)[1]))
+#define ARG_regexp1 ((RegExp*)((ARGS)[1]))
+#define ARG_pni1 ((JSPropertyNameIterator*)((ARGS)[1]))
+#define ARG_instr1 ((Instruction*)((ARGS)[1]))
+#define ARG_instr2 ((Instruction*)((ARGS)[2]))
+#define ARG_instr3 ((Instruction*)((ARGS)[3]))
+#define ARG_instr4 ((Instruction*)((ARGS)[4]))
+#define ARG_instr5 ((Instruction*)((ARGS)[5]))
+#define ARG_instr6 ((Instruction*)((ARGS)[6]))
+
+#define CTI_RETURN_ADDRESS ((ARGS)[-1])
 
 namespace JSC {
 
@@ -95,12 +95,12 @@ namespace JSC {
     struct Instruction;
     struct OperandTypes;
 
-    typedef JSValue* (SFX_CALL *CTIHelper_j)(void** args);
-    typedef JSPropertyNameIterator* (SFX_CALL *CTIHelper_p)(void** args);
-    typedef void (SFX_CALL *CTIHelper_v)(void** args);
-    typedef void* (SFX_CALL *CTIHelper_s)(void** args);
-    typedef int (SFX_CALL *CTIHelper_b)(void** args);
-    typedef VoidPtrPair (SFX_CALL *CTIHelper_2)(void** args);
+    typedef JSValue* (SFX_CALL *CTIHelper_j)(CTI_ARGS);
+    typedef JSPropertyNameIterator* (SFX_CALL *CTIHelper_p)(CTI_ARGS);
+    typedef void (SFX_CALL *CTIHelper_v)(CTI_ARGS);
+    typedef void* (SFX_CALL *CTIHelper_s)(CTI_ARGS);
+    typedef int (SFX_CALL *CTIHelper_b)(CTI_ARGS);
+    typedef VoidPtrPair (SFX_CALL *CTIHelper_2)(CTI_ARGS);
 
     struct CallRecord {
         X86Assembler::JmpSrc from;
@@ -238,8 +238,13 @@ namespace JSC {
         // will compress the displacement, and we may not be able to fit a repatched offset.
         static const int repatchGetByIdDefaultOffset = 256;
 
+#if USE(FAST_CALL_CTI_ARGUMENT)
         static const int ctiArgumentInitSize = 2;
-
+#elif USE(CTI_ARGUMENT)
+        static const int ctiArgumentInitSize = 4;
+#else
+        static const int ctiArgumentInitSize = 0;
+#endif
         // These architecture specific value are used to enable repatching - see comment on op_put_by_id.
         static const int repatchOffsetPutByIdStructureID = 19;
         static const int repatchOffsetPutByIdPropertyMapOffset = 34;
index ce7cd5396d8fc16d5f7e8b73e0218fcb5187d3da..e205099e20bd3141f91bb33bda7cd33b66b1820b 100644 (file)
@@ -4241,7 +4241,7 @@ NEVER_INLINE void Machine::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* c
         } \
     } while (0)
 
-JSValue* Machine::cti_op_convert_this(void** args)
+JSValue* Machine::cti_op_convert_this(CTI_ARGS)
 {
     JSValue* v1 = ARG_src1;
     CallFrame* callFrame = ARG_callFrame;
@@ -4251,14 +4251,14 @@ JSValue* Machine::cti_op_convert_this(void** args)
     return result;
 }
 
-void Machine::cti_op_end(void** args)
+void Machine::cti_op_end(CTI_ARGS)
 {
     ScopeChainNode* scopeChain = ARG_callFrame->scopeChain();
     ASSERT(scopeChain->refCount > 1);
     scopeChain->deref();
 }
 
-JSValue* Machine::cti_op_add(void** args)
+JSValue* Machine::cti_op_add(CTI_ARGS)
 {
     JSValue* v1 = ARG_src1;
     JSValue* v2 = ARG_src2;
@@ -4301,7 +4301,7 @@ JSValue* Machine::cti_op_add(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_pre_inc(void** args)
+JSValue* Machine::cti_op_pre_inc(CTI_ARGS)
 {
     JSValue* v = ARG_src1;
 
@@ -4311,7 +4311,7 @@ JSValue* Machine::cti_op_pre_inc(void** args)
     return result;
 }
 
-void Machine::cti_timeout_check(void** args)
+void Machine::cti_timeout_check(CTI_ARGS)
 {
     if (ARG_globalData->machine->checkTimeout(ARG_callFrame->dynamicGlobalObject())) {
         ARG_globalData->exception = createInterruptedExecutionException(ARG_globalData);
@@ -4319,7 +4319,7 @@ void Machine::cti_timeout_check(void** args)
     }
 }
 
-void Machine::cti_register_file_check(void** args)
+void Machine::cti_register_file_check(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     CodeBlock* codeBlock = callFrame->codeBlock();
@@ -4335,7 +4335,7 @@ void Machine::cti_register_file_check(void** args)
     }
 }
 
-int Machine::cti_op_loop_if_less(void** args)
+int Machine::cti_op_loop_if_less(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -4346,7 +4346,7 @@ int Machine::cti_op_loop_if_less(void** args)
     return result;
 }
 
-int Machine::cti_op_loop_if_lesseq(void** args)
+int Machine::cti_op_loop_if_lesseq(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -4357,12 +4357,12 @@ int Machine::cti_op_loop_if_lesseq(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_new_object(void** args)
+JSValue* Machine::cti_op_new_object(CTI_ARGS)
 {
     return constructEmptyObject(ARG_callFrame);;
 }
 
-void Machine::cti_op_put_by_id(void** args)
+void Machine::cti_op_put_by_id(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4375,7 +4375,7 @@ void Machine::cti_op_put_by_id(void** args)
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-void Machine::cti_op_put_by_id_second(void** args)
+void Machine::cti_op_put_by_id_second(CTI_ARGS)
 {
     PutPropertySlot slot;
     ARG_src1->put(ARG_callFrame, *ARG_id2, ARG_src3, slot);
@@ -4383,14 +4383,14 @@ void Machine::cti_op_put_by_id_second(void** args)
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-void Machine::cti_op_put_by_id_generic(void** args)
+void Machine::cti_op_put_by_id_generic(CTI_ARGS)
 {
     PutPropertySlot slot;
     ARG_src1->put(ARG_callFrame, *ARG_id2, ARG_src3, slot);
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-void Machine::cti_op_put_by_id_fail(void** args)
+void Machine::cti_op_put_by_id_fail(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4404,7 +4404,7 @@ void Machine::cti_op_put_by_id_fail(void** args)
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-JSValue* Machine::cti_op_get_by_id(void** args)
+JSValue* Machine::cti_op_get_by_id(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4419,7 +4419,7 @@ JSValue* Machine::cti_op_get_by_id(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_get_by_id_second(void** args)
+JSValue* Machine::cti_op_get_by_id_second(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4434,7 +4434,7 @@ JSValue* Machine::cti_op_get_by_id_second(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_get_by_id_generic(void** args)
+JSValue* Machine::cti_op_get_by_id_generic(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4447,7 +4447,7 @@ JSValue* Machine::cti_op_get_by_id_generic(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_get_by_id_fail(void** args)
+JSValue* Machine::cti_op_get_by_id_fail(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4463,7 +4463,7 @@ JSValue* Machine::cti_op_get_by_id_fail(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_instanceof(void** args)
+JSValue* Machine::cti_op_instanceof(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     JSValue* value = ARG_src1;
@@ -4504,7 +4504,7 @@ JSValue* Machine::cti_op_instanceof(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_del_by_id(void** args)
+JSValue* Machine::cti_op_del_by_id(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Identifier& ident = *ARG_id2;
@@ -4516,7 +4516,7 @@ JSValue* Machine::cti_op_del_by_id(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_mul(void** args)
+JSValue* Machine::cti_op_mul(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -4532,12 +4532,12 @@ JSValue* Machine::cti_op_mul(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_new_func(void** args)
+JSValue* Machine::cti_op_new_func(CTI_ARGS)
 {
     return ARG_func1->makeFunction(ARG_callFrame, ARG_callFrame->scopeChain());
 }
 
-VoidPtrPair Machine::cti_op_call_JSFunction(void** args)
+VoidPtrPair Machine::cti_op_call_JSFunction(CTI_ARGS)
 {
 #ifndef NDEBUG
     CallData callData;
@@ -4586,7 +4586,7 @@ VoidPtrPair Machine::cti_op_call_JSFunction(void** args)
     return pair;
 }
 
-void* Machine::cti_vm_compile(void** args)
+void* Machine::cti_vm_compile(CTI_ARGS)
 {
     CodeBlock* codeBlock = ARG_callFrame->codeBlock();
     if (!codeBlock->ctiCode)
@@ -4594,14 +4594,14 @@ void* Machine::cti_vm_compile(void** args)
     return codeBlock->ctiCode;
 }
 
-JSValue* Machine::cti_op_push_activation(void** args)
+JSValue* Machine::cti_op_push_activation(CTI_ARGS)
 {
     JSActivation* activation = new (ARG_globalData) JSActivation(ARG_callFrame, static_cast<FunctionBodyNode*>(ARG_callFrame->codeBlock()->ownerNode));
     ARG_callFrame->setScopeChain(ARG_callFrame->scopeChain()->copy()->push(activation));
     return activation;
 }
 
-JSValue* Machine::cti_op_call_NotJSFunction(void** args)
+JSValue* Machine::cti_op_call_NotJSFunction(CTI_ARGS)
 {
     JSValue* funcVal = ARG_src1;
 
@@ -4643,45 +4643,45 @@ JSValue* Machine::cti_op_call_NotJSFunction(void** args)
     VM_THROW_EXCEPTION();
 }
 
-void Machine::cti_op_create_arguments(void** args)
+void Machine::cti_op_create_arguments(CTI_ARGS)
 {
     Arguments* arguments = new (ARG_globalData) Arguments(ARG_callFrame);
     ARG_callFrame->setCalleeArguments(arguments);
     ARG_callFrame[RegisterFile::ArgumentsRegister] = arguments;
 }
 
-void Machine::cti_op_tear_off_activation(void** args)
+void Machine::cti_op_tear_off_activation(CTI_ARGS)
 {
     ASSERT(ARG_callFrame->codeBlock()->needsFullScopeChain);
     ASSERT(ARG_src1->isObject(&JSActivation::info));
     static_cast<JSActivation*>(ARG_src1)->copyRegisters(ARG_callFrame->optionalCalleeArguments());
 }
 
-void Machine::cti_op_tear_off_arguments(void** args)
+void Machine::cti_op_tear_off_arguments(CTI_ARGS)
 {
     ASSERT(ARG_callFrame->codeBlock()->usesArguments && !ARG_callFrame->codeBlock()->needsFullScopeChain);
     ARG_callFrame->optionalCalleeArguments()->copyRegisters();
 }
 
-void Machine::cti_op_ret_profiler(void** args)
+void Machine::cti_op_ret_profiler(CTI_ARGS)
 {
     ASSERT(*ARG_profilerReference);
     (*ARG_profilerReference)->didExecute(ARG_callFrame, ARG_callFrame->callee());
 }
 
-void Machine::cti_op_ret_scopeChain(void** args)
+void Machine::cti_op_ret_scopeChain(CTI_ARGS)
 {
     ASSERT(ARG_callFrame->codeBlock()->needsFullScopeChain);
     ARG_callFrame->scopeChain()->deref();
 }
 
-JSValue* Machine::cti_op_new_array(void** args)
+JSValue* Machine::cti_op_new_array(CTI_ARGS)
 {
     ArgList argList(ARG_registers1, ARG_int2);
     return constructArray(ARG_callFrame, argList);
 }
 
-JSValue* Machine::cti_op_resolve(void** args)
+JSValue* Machine::cti_op_resolve(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     ScopeChainNode* scopeChain = callFrame->scopeChain();
@@ -4708,7 +4708,7 @@ JSValue* Machine::cti_op_resolve(void** args)
     VM_THROW_EXCEPTION();
 }
 
-VoidPtrPair Machine::cti_op_construct_JSConstruct(void** args)
+VoidPtrPair Machine::cti_op_construct_JSConstruct(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -4771,7 +4771,7 @@ VoidPtrPair Machine::cti_op_construct_JSConstruct(void** args)
     return pair;
 }
 
-JSValue* Machine::cti_op_construct_NotJSConstruct(void** args)
+JSValue* Machine::cti_op_construct_NotJSConstruct(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -4807,7 +4807,7 @@ JSValue* Machine::cti_op_construct_NotJSConstruct(void** args)
     VM_THROW_EXCEPTION();
 }
 
-JSValue* Machine::cti_op_get_by_val(void** args)
+JSValue* Machine::cti_op_get_by_val(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Machine* machine = ARG_globalData->machine;
@@ -4839,7 +4839,7 @@ JSValue* Machine::cti_op_get_by_val(void** args)
     return result;
 }
 
-VoidPtrPair Machine::cti_op_resolve_func(void** args)
+VoidPtrPair Machine::cti_op_resolve_func(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     ScopeChainNode* scopeChain = callFrame->scopeChain();
@@ -4881,7 +4881,7 @@ VoidPtrPair Machine::cti_op_resolve_func(void** args)
     VM_THROW_EXCEPTION_2();
 }
 
-JSValue* Machine::cti_op_sub(void** args)
+JSValue* Machine::cti_op_sub(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -4897,7 +4897,7 @@ JSValue* Machine::cti_op_sub(void** args)
     return result;
 }
 
-void Machine::cti_op_put_by_val(void** args)
+void Machine::cti_op_put_by_val(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     Machine* machine = ARG_globalData->machine;
@@ -4929,7 +4929,7 @@ void Machine::cti_op_put_by_val(void** args)
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-void Machine::cti_op_put_by_val_array(void** args)
+void Machine::cti_op_put_by_val_array(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -4953,7 +4953,7 @@ void Machine::cti_op_put_by_val_array(void** args)
     VM_CHECK_EXCEPTION_AT_END();
 }
 
-JSValue* Machine::cti_op_lesseq(void** args)
+JSValue* Machine::cti_op_lesseq(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     JSValue* result = jsBoolean(jsLessEq(callFrame, ARG_src1, ARG_src2));
@@ -4961,7 +4961,7 @@ JSValue* Machine::cti_op_lesseq(void** args)
     return result;
 }
 
-int Machine::cti_op_loop_if_true(void** args)
+int Machine::cti_op_loop_if_true(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
 
@@ -4972,7 +4972,7 @@ int Machine::cti_op_loop_if_true(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_negate(void** args)
+JSValue* Machine::cti_op_negate(CTI_ARGS)
 {
     JSValue* src = ARG_src1;
 
@@ -4986,12 +4986,12 @@ JSValue* Machine::cti_op_negate(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_resolve_base(void** args)
+JSValue* Machine::cti_op_resolve_base(CTI_ARGS)
 {
     return inlineResolveBase(ARG_callFrame, *ARG_id1, ARG_callFrame->scopeChain());
 }
 
-JSValue* Machine::cti_op_resolve_skip(void** args)
+JSValue* Machine::cti_op_resolve_skip(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     ScopeChainNode* scopeChain = callFrame->scopeChain();
@@ -5023,7 +5023,7 @@ JSValue* Machine::cti_op_resolve_skip(void** args)
     VM_THROW_EXCEPTION();
 }
 
-JSValue* Machine::cti_op_resolve_global(void** args)
+JSValue* Machine::cti_op_resolve_global(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(ARG_src1);
@@ -5051,7 +5051,7 @@ JSValue* Machine::cti_op_resolve_global(void** args)
     VM_THROW_EXCEPTION();
 }
 
-JSValue* Machine::cti_op_div(void** args)
+JSValue* Machine::cti_op_div(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5067,7 +5067,7 @@ JSValue* Machine::cti_op_div(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_pre_dec(void** args)
+JSValue* Machine::cti_op_pre_dec(CTI_ARGS)
 {
     JSValue* v = ARG_src1;
 
@@ -5077,7 +5077,7 @@ JSValue* Machine::cti_op_pre_dec(void** args)
     return result;
 }
 
-int Machine::cti_op_jless(void** args)
+int Machine::cti_op_jless(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5088,7 +5088,7 @@ int Machine::cti_op_jless(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_not(void** args)
+JSValue* Machine::cti_op_not(CTI_ARGS)
 {
     JSValue* src = ARG_src1;
 
@@ -5099,7 +5099,7 @@ JSValue* Machine::cti_op_not(void** args)
     return result;
 }
 
-int SFX_CALL Machine::cti_op_jtrue(void** args)
+int SFX_CALL Machine::cti_op_jtrue(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
 
@@ -5110,7 +5110,7 @@ int SFX_CALL Machine::cti_op_jtrue(void** args)
     return result;
 }
 
-VoidPtrPair Machine::cti_op_post_inc(void** args)
+VoidPtrPair Machine::cti_op_post_inc(CTI_ARGS)
 {
     JSValue* v = ARG_src1;
 
@@ -5123,7 +5123,7 @@ VoidPtrPair Machine::cti_op_post_inc(void** args)
     return pair;
 }
 
-JSValue* Machine::cti_op_eq(void** args)
+JSValue* Machine::cti_op_eq(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5136,7 +5136,7 @@ JSValue* Machine::cti_op_eq(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_lshift(void** args)
+JSValue* Machine::cti_op_lshift(CTI_ARGS)
 {
     JSValue* val = ARG_src1;
     JSValue* shift = ARG_src2;
@@ -5154,7 +5154,7 @@ JSValue* Machine::cti_op_lshift(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_bitand(void** args)
+JSValue* Machine::cti_op_bitand(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5170,7 +5170,7 @@ JSValue* Machine::cti_op_bitand(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_rshift(void** args)
+JSValue* Machine::cti_op_rshift(CTI_ARGS)
 {
     JSValue* val = ARG_src1;
     JSValue* shift = ARG_src2;
@@ -5188,7 +5188,7 @@ JSValue* Machine::cti_op_rshift(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_bitnot(void** args)
+JSValue* Machine::cti_op_bitnot(CTI_ARGS)
 {
     JSValue* src = ARG_src1;
 
@@ -5202,7 +5202,7 @@ JSValue* Machine::cti_op_bitnot(void** args)
     return result;
 }
 
-VoidPtrPair Machine::cti_op_resolve_with_base(void** args)
+VoidPtrPair Machine::cti_op_resolve_with_base(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     ScopeChainNode* scopeChain = callFrame->scopeChain();
@@ -5236,12 +5236,12 @@ VoidPtrPair Machine::cti_op_resolve_with_base(void** args)
     VM_THROW_EXCEPTION_2();
 }
 
-JSValue* Machine::cti_op_new_func_exp(void** args)
+JSValue* Machine::cti_op_new_func_exp(CTI_ARGS)
 {
     return ARG_funcexp1->makeFunction(ARG_callFrame, ARG_callFrame->scopeChain());
 }
 
-JSValue* Machine::cti_op_mod(void** args)
+JSValue* Machine::cti_op_mod(CTI_ARGS)
 {
     JSValue* dividendValue = ARG_src1;
     JSValue* divisorValue = ARG_src2;
@@ -5253,7 +5253,7 @@ JSValue* Machine::cti_op_mod(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_less(void** args)
+JSValue* Machine::cti_op_less(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     JSValue* result = jsBoolean(jsLess(callFrame, ARG_src1, ARG_src2));
@@ -5261,7 +5261,7 @@ JSValue* Machine::cti_op_less(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_neq(void** args)
+JSValue* Machine::cti_op_neq(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5274,7 +5274,7 @@ JSValue* Machine::cti_op_neq(void** args)
     return result;
 }
 
-VoidPtrPair Machine::cti_op_post_dec(void** args)
+VoidPtrPair Machine::cti_op_post_dec(CTI_ARGS)
 {
     JSValue* v = ARG_src1;
 
@@ -5287,7 +5287,7 @@ VoidPtrPair Machine::cti_op_post_dec(void** args)
     return pair;
 }
 
-JSValue* Machine::cti_op_urshift(void** args)
+JSValue* Machine::cti_op_urshift(CTI_ARGS)
 {
     JSValue* val = ARG_src1;
     JSValue* shift = ARG_src2;
@@ -5303,7 +5303,7 @@ JSValue* Machine::cti_op_urshift(void** args)
     }
 }
 
-JSValue* Machine::cti_op_bitxor(void** args)
+JSValue* Machine::cti_op_bitxor(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5315,12 +5315,12 @@ JSValue* Machine::cti_op_bitxor(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_new_regexp(void** args)
+JSValue* Machine::cti_op_new_regexp(CTI_ARGS)
 {
     return new (ARG_globalData) RegExpObject(ARG_callFrame->lexicalGlobalObject()->regExpStructure(), ARG_regexp1);
 }
 
-JSValue* Machine::cti_op_bitor(void** args)
+JSValue* Machine::cti_op_bitor(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5332,7 +5332,7 @@ JSValue* Machine::cti_op_bitor(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_call_eval(void** args)
+JSValue* Machine::cti_op_call_eval(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     RegisterFile* registerFile = ARG_registerFile;
@@ -5357,7 +5357,7 @@ JSValue* Machine::cti_op_call_eval(void** args)
     return JSImmediate::impossibleValue();
 }
 
-void* Machine::cti_op_throw(void** args)
+void* Machine::cti_op_throw(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     CodeBlock* codeBlock = callFrame->codeBlock();
@@ -5382,12 +5382,12 @@ void* Machine::cti_op_throw(void** args)
     return exceptionValue;
 }
 
-JSPropertyNameIterator* Machine::cti_op_get_pnames(void** args)
+JSPropertyNameIterator* Machine::cti_op_get_pnames(CTI_ARGS)
 {
     return JSPropertyNameIterator::create(ARG_callFrame, ARG_src1);
 }
 
-JSValue* Machine::cti_op_next_pname(void** args)
+JSValue* Machine::cti_op_next_pname(CTI_ARGS)
 {
     JSPropertyNameIterator* it = ARG_pni1;
     JSValue* temp = it->next(ARG_callFrame);
@@ -5396,55 +5396,55 @@ JSValue* Machine::cti_op_next_pname(void** args)
     return temp;
 }
 
-void Machine::cti_op_push_scope(void** args)
+void Machine::cti_op_push_scope(CTI_ARGS)
 {
     JSObject* o = ARG_src1->toObject(ARG_callFrame);
     VM_CHECK_EXCEPTION_VOID();
     ARG_callFrame->setScopeChain(ARG_callFrame->scopeChain()->push(o));
 }
 
-void Machine::cti_op_pop_scope(void** args)
+void Machine::cti_op_pop_scope(CTI_ARGS)
 {
     ARG_callFrame->setScopeChain(ARG_callFrame->scopeChain()->pop());
 }
 
-JSValue* Machine::cti_op_typeof(void** args)
+JSValue* Machine::cti_op_typeof(CTI_ARGS)
 {
     return jsTypeStringForValue(ARG_callFrame, ARG_src1);
 }
 
-JSValue* Machine::cti_op_is_undefined(void** args)
+JSValue* Machine::cti_op_is_undefined(CTI_ARGS)
 {
     JSValue* v = ARG_src1;
     return jsBoolean(JSImmediate::isImmediate(v) ? v->isUndefined() : v->asCell()->structureID()->typeInfo().masqueradesAsUndefined());
 }
 
-JSValue* Machine::cti_op_is_boolean(void** args)
+JSValue* Machine::cti_op_is_boolean(CTI_ARGS)
 {
     return jsBoolean(ARG_src1->isBoolean());
 }
 
-JSValue* Machine::cti_op_is_number(void** args)
+JSValue* Machine::cti_op_is_number(CTI_ARGS)
 {
     return jsBoolean(ARG_src1->isNumber());
 }
 
-JSValue* Machine::cti_op_is_string(void** args)
+JSValue* Machine::cti_op_is_string(CTI_ARGS)
 {
     return jsBoolean(ARG_globalData->machine->isJSString(ARG_src1));
 }
 
-JSValue* Machine::cti_op_is_object(void** args)
+JSValue* Machine::cti_op_is_object(CTI_ARGS)
 {
     return jsBoolean(jsIsObjectType(ARG_src1));
 }
 
-JSValue* Machine::cti_op_is_function(void** args)
+JSValue* Machine::cti_op_is_function(CTI_ARGS)
 {
     return jsBoolean(jsIsFunctionType(ARG_src1));
 }
 
-JSValue* Machine::cti_op_stricteq(void** args)
+JSValue* Machine::cti_op_stricteq(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5456,7 +5456,7 @@ JSValue* Machine::cti_op_stricteq(void** args)
     return jsBoolean(strictEqualSlowCaseInline(src1, src2));
 }
 
-JSValue* Machine::cti_op_nstricteq(void** args)
+JSValue* Machine::cti_op_nstricteq(CTI_ARGS)
 {
     JSValue* src1 = ARG_src1;
     JSValue* src2 = ARG_src2;
@@ -5468,7 +5468,7 @@ JSValue* Machine::cti_op_nstricteq(void** args)
     return jsBoolean(!strictEqualSlowCaseInline(src1, src2));
 }
 
-JSValue* Machine::cti_op_to_jsnumber(void** args)
+JSValue* Machine::cti_op_to_jsnumber(CTI_ARGS)
 {
     JSValue* src = ARG_src1;
     CallFrame* callFrame = ARG_callFrame;
@@ -5478,7 +5478,7 @@ JSValue* Machine::cti_op_to_jsnumber(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_in(void** args)
+JSValue* Machine::cti_op_in(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     JSValue* baseVal = ARG_src2;
@@ -5504,7 +5504,7 @@ JSValue* Machine::cti_op_in(void** args)
     return jsBoolean(baseObj->hasProperty(callFrame, property));
 }
 
-JSValue* Machine::cti_op_push_new_scope(void** args)
+JSValue* Machine::cti_op_push_new_scope(CTI_ARGS)
 {
     JSObject* scope = new (ARG_globalData) JSStaticScopeObject(ARG_callFrame, *ARG_id1, ARG_src2, DontDelete);
 
@@ -5513,7 +5513,7 @@ JSValue* Machine::cti_op_push_new_scope(void** args)
     return scope;
 }
 
-void Machine::cti_op_jmp_scopes(void** args)
+void Machine::cti_op_jmp_scopes(CTI_ARGS)
 {
     unsigned count = ARG_int1;
     CallFrame* callFrame = ARG_callFrame;
@@ -5524,7 +5524,7 @@ void Machine::cti_op_jmp_scopes(void** args)
     callFrame->setScopeChain(tmp);
 }
 
-void Machine::cti_op_put_by_index(void** args)
+void Machine::cti_op_put_by_index(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     unsigned property = ARG_int2;
@@ -5532,7 +5532,7 @@ void Machine::cti_op_put_by_index(void** args)
     ARG_src1->put(callFrame, property, ARG_src3);
 }
 
-void* Machine::cti_op_switch_imm(void** args)
+void* Machine::cti_op_switch_imm(CTI_ARGS)
 {
     JSValue* scrutinee = ARG_src1;
     unsigned tableIndex = ARG_int2;
@@ -5547,7 +5547,7 @@ void* Machine::cti_op_switch_imm(void** args)
     return codeBlock->immediateSwitchJumpTables[tableIndex].ctiDefault;
 }
 
-void* Machine::cti_op_switch_char(void** args)
+void* Machine::cti_op_switch_char(CTI_ARGS)
 {
     JSValue* scrutinee = ARG_src1;
     unsigned tableIndex = ARG_int2;
@@ -5565,7 +5565,7 @@ void* Machine::cti_op_switch_char(void** args)
     return result;
 }
 
-void* Machine::cti_op_switch_string(void** args)
+void* Machine::cti_op_switch_string(CTI_ARGS)
 {
     JSValue* scrutinee = ARG_src1;
     unsigned tableIndex = ARG_int2;
@@ -5582,7 +5582,7 @@ void* Machine::cti_op_switch_string(void** args)
     return result;
 }
 
-JSValue* Machine::cti_op_del_by_val(void** args)
+JSValue* Machine::cti_op_del_by_val(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -5605,7 +5605,7 @@ JSValue* Machine::cti_op_del_by_val(void** args)
     return result;
 }
 
-void Machine::cti_op_put_getter(void** args)
+void Machine::cti_op_put_getter(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -5616,7 +5616,7 @@ void Machine::cti_op_put_getter(void** args)
     baseObj->defineGetter(callFrame, ident, static_cast<JSObject*>(ARG_src3));
 }
 
-void Machine::cti_op_put_setter(void** args)
+void Machine::cti_op_put_setter(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -5627,7 +5627,7 @@ void Machine::cti_op_put_setter(void** args)
     baseObj->defineSetter(callFrame, ident, static_cast<JSObject*>(ARG_src3));
 }
 
-JSValue* Machine::cti_op_new_error(void** args)
+JSValue* Machine::cti_op_new_error(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     CodeBlock* codeBlock = callFrame->codeBlock();
@@ -5638,7 +5638,7 @@ JSValue* Machine::cti_op_new_error(void** args)
     return Error::create(callFrame, static_cast<ErrorType>(type), message->toString(callFrame), lineNumber, codeBlock->ownerNode->sourceID(), codeBlock->ownerNode->sourceURL());
 }
 
-void Machine::cti_op_debug(void** args)
+void Machine::cti_op_debug(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
 
@@ -5649,7 +5649,7 @@ void Machine::cti_op_debug(void** args)
     ARG_globalData->machine->debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine);
 }
 
-void* Machine::cti_vm_throw(void** args)
+void* Machine::cti_vm_throw(CTI_ARGS)
 {
     CallFrame* callFrame = ARG_callFrame;
     CodeBlock* codeBlock = callFrame->codeBlock();
index c65e1fc2a3ab29e8f7d92b43ad80a0178a1d3b5e..e8729995da19369cafb1d09d6082a672248303a3 100644 (file)
@@ -53,12 +53,32 @@ namespace JSC {
 
 #if ENABLE(CTI)
 
+#if USE(CTI_ARGUMENT)
+#define CTI_ARGS void** args
+#define ARGS (args)
+#else
+#define CTI_ARGS void* args
+#define ARGS (&args)
+#endif
+
+#if USE(FAST_CALL_CTI_ARGUMENT)
+
 #if COMPILER(MSVC)
 #define SFX_CALL __fastcall
 #elif COMPILER(GCC)
 #define SFX_CALL  __attribute__ ((fastcall))
 #else
 #error Need to support fastcall calling convention in this compiler
+#endif
+
+#else
+
+#if COMPILER(MSVC)
+#define SFX_CALL __cdecl
+#else
+#define SFX_CALL
+#endif
+
 #endif
 
     struct VoidPtrPair { void* first; void* second; };
@@ -141,103 +161,103 @@ namespace JSC {
 
 #if ENABLE(CTI)
 
-        static void SFX_CALL cti_timeout_check(void** args);
-        static void SFX_CALL cti_register_file_check(void** args);
-
-        static JSValue* SFX_CALL cti_op_convert_this(void** args);
-        static void SFX_CALL cti_op_end(void** args);
-        static JSValue* SFX_CALL cti_op_add(void** args);
-        static JSValue* SFX_CALL cti_op_pre_inc(void** args);
-        static int SFX_CALL cti_op_loop_if_less(void** args);
-        static int SFX_CALL cti_op_loop_if_lesseq(void** args);
-        static JSValue* SFX_CALL cti_op_new_object(void** args);
-        static void SFX_CALL cti_op_put_by_id(void** args);
-        static void SFX_CALL cti_op_put_by_id_second(void** args);
-        static void SFX_CALL cti_op_put_by_id_generic(void** args);
-        static void SFX_CALL cti_op_put_by_id_fail(void** args);
-        static JSValue* SFX_CALL cti_op_get_by_id(void** args);
-        static JSValue* SFX_CALL cti_op_get_by_id_second(void** args);
-        static JSValue* SFX_CALL cti_op_get_by_id_generic(void** args);
-        static JSValue* SFX_CALL cti_op_get_by_id_fail(void** args);
-        static JSValue* SFX_CALL cti_op_del_by_id(void** args);
-        static JSValue* SFX_CALL cti_op_instanceof(void** args);
-        static JSValue* SFX_CALL cti_op_mul(void** args);
-        static JSValue* SFX_CALL cti_op_new_func(void** args);
-        static VoidPtrPair SFX_CALL cti_op_call_JSFunction(void** args);
-        static JSValue* SFX_CALL cti_op_call_NotJSFunction(void** args);
-        static void SFX_CALL cti_op_create_arguments(void** args);
-        static void SFX_CALL cti_op_tear_off_activation(void** args);
-        static void SFX_CALL cti_op_tear_off_arguments(void** args);
-        static void SFX_CALL cti_op_ret_profiler(void** args);
-        static void SFX_CALL cti_op_ret_scopeChain(void** args);
-        static JSValue* SFX_CALL cti_op_new_array(void** args);
-        static JSValue* SFX_CALL cti_op_resolve(void** args);
-        static JSValue* SFX_CALL cti_op_resolve_global(void** args);
-        static VoidPtrPair SFX_CALL cti_op_construct_JSConstruct(void** args);
-        static JSValue* SFX_CALL cti_op_construct_NotJSConstruct(void** args);
-        static JSValue* SFX_CALL cti_op_get_by_val(void** args);
-        static VoidPtrPair SFX_CALL cti_op_resolve_func(void** args);
-        static JSValue* SFX_CALL cti_op_sub(void** args);
-        static void SFX_CALL cti_op_put_by_val(void** args);
-        static void SFX_CALL cti_op_put_by_val_array(void** args);
-        static JSValue* SFX_CALL cti_op_lesseq(void** args);
-        static int SFX_CALL cti_op_loop_if_true(void** args);
-        static JSValue* SFX_CALL cti_op_resolve_base(void** args);
-        static JSValue* SFX_CALL cti_op_negate(void** args);
-        static JSValue* SFX_CALL cti_op_resolve_skip(void** args);
-        static JSValue* SFX_CALL cti_op_div(void** args);
-        static JSValue* SFX_CALL cti_op_pre_dec(void** args);
-        static int SFX_CALL cti_op_jless(void** args);
-        static JSValue* SFX_CALL cti_op_not(void** args);
-        static int SFX_CALL cti_op_jtrue(void** args);
-        static VoidPtrPair SFX_CALL cti_op_post_inc(void** args);
-        static JSValue* SFX_CALL cti_op_eq(void** args);
-        static JSValue* SFX_CALL cti_op_lshift(void** args);
-        static JSValue* SFX_CALL cti_op_bitand(void** args);
-        static JSValue* SFX_CALL cti_op_rshift(void** args);
-        static JSValue* SFX_CALL cti_op_bitnot(void** args);
-        static VoidPtrPair SFX_CALL cti_op_resolve_with_base(void** args);
-        static JSValue* SFX_CALL cti_op_new_func_exp(void** args);
-        static JSValue* SFX_CALL cti_op_mod(void** args);
-        static JSValue* SFX_CALL cti_op_less(void** args);
-        static JSValue* SFX_CALL cti_op_neq(void** args);
-        static VoidPtrPair SFX_CALL cti_op_post_dec(void** args);
-        static JSValue* SFX_CALL cti_op_urshift(void** args);
-        static JSValue* SFX_CALL cti_op_bitxor(void** args);
-        static JSValue* SFX_CALL cti_op_new_regexp(void** args);
-        static JSValue* SFX_CALL cti_op_bitor(void** args);
-        static JSValue* SFX_CALL cti_op_call_eval(void** args);
-        static void* SFX_CALL cti_op_throw(void** args);
-        static JSPropertyNameIterator* SFX_CALL cti_op_get_pnames(void** args);
-        static JSValue* SFX_CALL cti_op_next_pname(void** args);
-        static void SFX_CALL cti_op_push_scope(void** args);
-        static void SFX_CALL cti_op_pop_scope(void** args);
-        static JSValue* SFX_CALL cti_op_typeof(void** args);
-        static JSValue* SFX_CALL cti_op_is_undefined(void** args);
-        static JSValue* SFX_CALL cti_op_is_boolean(void** args);
-        static JSValue* SFX_CALL cti_op_is_number(void** args);
-        static JSValue* SFX_CALL cti_op_is_string(void** args);
-        static JSValue* SFX_CALL cti_op_is_object(void** args);
-        static JSValue* SFX_CALL cti_op_is_function(void** args);
-        static JSValue* SFX_CALL cti_op_stricteq(void** args);
-        static JSValue* SFX_CALL cti_op_nstricteq(void** args);
-        static JSValue* SFX_CALL cti_op_to_jsnumber(void** args);
-        static JSValue* SFX_CALL cti_op_in(void** args);
-        static JSValue* SFX_CALL cti_op_push_new_scope(void** args);
-        static void SFX_CALL cti_op_jmp_scopes(void** args);
-        static void SFX_CALL cti_op_put_by_index(void** args);
-        static void* SFX_CALL cti_op_switch_imm(void** args);
-        static void* SFX_CALL cti_op_switch_char(void** args);
-        static void* SFX_CALL cti_op_switch_string(void** args);
-        static JSValue* SFX_CALL cti_op_del_by_val(void** args);
-        static void SFX_CALL cti_op_put_getter(void** args);
-        static void SFX_CALL cti_op_put_setter(void** args);
-        static JSValue* SFX_CALL cti_op_new_error(void** args);
-        static void SFX_CALL cti_op_debug(void** args);
-
-        static void* SFX_CALL cti_vm_throw(void** args);
-        static void* SFX_CALL cti_vm_compile(void** args);
-        static JSValue* SFX_CALL cti_op_push_activation(void** args);
+        static void SFX_CALL cti_timeout_check(CTI_ARGS);
+        static void SFX_CALL cti_register_file_check(CTI_ARGS);
+
+        static JSValue* SFX_CALL cti_op_convert_this(CTI_ARGS);
+        static void SFX_CALL cti_op_end(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_add(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_pre_inc(CTI_ARGS);
+        static int SFX_CALL cti_op_loop_if_less(CTI_ARGS);
+        static int SFX_CALL cti_op_loop_if_lesseq(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_object(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_id(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_id_second(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_id_generic(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_id_fail(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_get_by_id(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_get_by_id_second(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_get_by_id_generic(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_get_by_id_fail(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_del_by_id(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_instanceof(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_mul(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_func(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_call_JSFunction(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_call_NotJSFunction(CTI_ARGS);
+        static void SFX_CALL cti_op_create_arguments(CTI_ARGS);
+        static void SFX_CALL cti_op_tear_off_activation(CTI_ARGS);
+        static void SFX_CALL cti_op_tear_off_arguments(CTI_ARGS);
+        static void SFX_CALL cti_op_ret_profiler(CTI_ARGS);
+        static void SFX_CALL cti_op_ret_scopeChain(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_array(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_resolve(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_resolve_global(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_construct_JSConstruct(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_construct_NotJSConstruct(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_get_by_val(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_resolve_func(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_sub(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_val(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_val_array(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_lesseq(CTI_ARGS);
+        static int SFX_CALL cti_op_loop_if_true(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_resolve_base(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_negate(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_resolve_skip(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_div(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_pre_dec(CTI_ARGS);
+        static int SFX_CALL cti_op_jless(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_not(CTI_ARGS);
+        static int SFX_CALL cti_op_jtrue(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_post_inc(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_eq(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_lshift(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_bitand(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_rshift(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_bitnot(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_resolve_with_base(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_func_exp(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_mod(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_less(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_neq(CTI_ARGS);
+        static VoidPtrPair SFX_CALL cti_op_post_dec(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_urshift(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_bitxor(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_regexp(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_bitor(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_call_eval(CTI_ARGS);
+        static void* SFX_CALL cti_op_throw(CTI_ARGS);
+        static JSPropertyNameIterator* SFX_CALL cti_op_get_pnames(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_next_pname(CTI_ARGS);
+        static void SFX_CALL cti_op_push_scope(CTI_ARGS);
+        static void SFX_CALL cti_op_pop_scope(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_typeof(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_undefined(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_boolean(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_number(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_string(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_object(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_is_function(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_stricteq(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_nstricteq(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_to_jsnumber(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_in(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_push_new_scope(CTI_ARGS);
+        static void SFX_CALL cti_op_jmp_scopes(CTI_ARGS);
+        static void SFX_CALL cti_op_put_by_index(CTI_ARGS);
+        static void* SFX_CALL cti_op_switch_imm(CTI_ARGS);
+        static void* SFX_CALL cti_op_switch_char(CTI_ARGS);
+        static void* SFX_CALL cti_op_switch_string(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_del_by_val(CTI_ARGS);
+        static void SFX_CALL cti_op_put_getter(CTI_ARGS);
+        static void SFX_CALL cti_op_put_setter(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_new_error(CTI_ARGS);
+        static void SFX_CALL cti_op_debug(CTI_ARGS);
+
+        static void* SFX_CALL cti_vm_throw(CTI_ARGS);
+        static void* SFX_CALL cti_vm_compile(CTI_ARGS);
+        static JSValue* SFX_CALL cti_op_push_activation(CTI_ARGS);
         
 #endif // ENABLE(CTI)
 
index af796ad8f98c85a5ee62d6c1e14aecafeed7dc0d..a836c16245740ec224eaec104122267010b54334 100644 (file)
@@ -1081,16 +1081,27 @@ public:
     void emitConvertToFastCall() {}
 #endif
 
+#if USE(CTI_ARGUMENT)
     void emitRestoreArgumentReference()
     {
+#if USE(FAST_CALL_CTI_ARGUMENT)
         movl_rr(X86::esp, X86::ecx);
+#else
+        movl_rm(X86::esp, 0, X86::esp);
+#endif
     }
 
     void emitRestoreArgumentReferenceForTrampoline()
     {
+#if USE(FAST_CALL_CTI_ARGUMENT)
         movl_rr(X86::esp, X86::ecx);
         addl_i32r(4, X86::ecx);
+#endif
     }
+#else
+    void emitRestoreArgumentReference() {}
+    void emitRestoreArgumentReferenceForTrampoline() {}
+#endif
 
 private:
     void emitModRm_rr(RegisterID reg, RegisterID rm)
index c33b8984c45bc8b0bde97f1180ea4a7d6f1d0eaa..bc98da9e991a1c815e6d59e3e59a278bb10a5cb9 100644 (file)
 #endif
 #endif
 
+// Use "fastcall" calling convention on MSVC and GCC > 4.0
+#if COMPILER(MSVC) || (COMPILER(GCC) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 0)))
+#define WTF_USE_FAST_CALL_CTI_ARGUMENT 1
+#endif
+
+#if COMPILER(MSVC) || USE(FAST_CALL_CTI_ARGUMENT)
+#define WTF_USE_CTI_ARGUMENT 1
+#endif
+
 #endif /* WTF_Platform_h */