Changeset 37581 in webkit for trunk/JavaScriptCore/VM/Machine.h


Ignore:
Timestamp:
Oct 14, 2008, 1:21:19 AM (17 years ago)
Author:
[email protected]
Message:

2008-10-14 Maciej Stachowiak <[email protected]>

Reviewed by Cameron Zwarich.


  • always use CTI_ARGUMENTS and CTI_ARGUMENTS_FASTCALL


This is a small regression for GCC 4.0, but simplifies the code
for future improvements and lets us focus on GCC 4.2+ and MSVC.

  • 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/Machine.h

    r37570 r37581  
    5454#if ENABLE(CTI)
    5555
    56 #if USE(CTI_ARGUMENT)
    57 #define CTI_ARGS void** args
    58 #define ARGS (args)
    59 #else
    60 #define CTI_ARGS void* args
    61 #define ARGS (&args)
    62 #endif
    63 
    64 #if USE(FAST_CALL_CTI_ARGUMENT)
    65 
    6656#if COMPILER(MSVC)
    6757#define SFX_CALL __fastcall
     
    7060#else
    7161#error Need to support fastcall calling convention in this compiler
    72 #endif
    73 
    74 #else
    75 
    76 #if COMPILER(MSVC)
    77 #define SFX_CALL __cdecl
    78 #else
    79 #define SFX_CALL
    80 #endif
    81 
    8262#endif
    8363
     
    162142#if ENABLE(CTI)
    163143
    164         static void SFX_CALL cti_timeout_check(CTI_ARGS);
    165         static void SFX_CALL cti_register_file_check(CTI_ARGS);
    166 
    167         static JSValue* SFX_CALL cti_op_convert_this(CTI_ARGS);
    168         static void SFX_CALL cti_op_end(CTI_ARGS);
    169         static JSValue* SFX_CALL cti_op_add(CTI_ARGS);
    170         static JSValue* SFX_CALL cti_op_pre_inc(CTI_ARGS);
    171         static int SFX_CALL cti_op_loop_if_less(CTI_ARGS);
    172         static int SFX_CALL cti_op_loop_if_lesseq(CTI_ARGS);
    173         static JSValue* SFX_CALL cti_op_new_object(CTI_ARGS);
    174         static void SFX_CALL cti_op_put_by_id(CTI_ARGS);
    175         static void SFX_CALL cti_op_put_by_id_second(CTI_ARGS);
    176         static void SFX_CALL cti_op_put_by_id_generic(CTI_ARGS);
    177         static void SFX_CALL cti_op_put_by_id_fail(CTI_ARGS);
    178         static JSValue* SFX_CALL cti_op_get_by_id(CTI_ARGS);
    179         static JSValue* SFX_CALL cti_op_get_by_id_second(CTI_ARGS);
    180         static JSValue* SFX_CALL cti_op_get_by_id_generic(CTI_ARGS);
    181         static JSValue* SFX_CALL cti_op_get_by_id_fail(CTI_ARGS);
    182         static JSValue* SFX_CALL cti_op_del_by_id(CTI_ARGS);
    183         static JSValue* SFX_CALL cti_op_instanceof(CTI_ARGS);
    184         static JSValue* SFX_CALL cti_op_mul(CTI_ARGS);
    185         static JSValue* SFX_CALL cti_op_new_func(CTI_ARGS);
    186         static VoidPtrPair SFX_CALL cti_op_call_JSFunction(CTI_ARGS);
    187         static JSValue* SFX_CALL cti_op_call_NotJSFunction(CTI_ARGS);
    188         static void SFX_CALL cti_op_create_arguments(CTI_ARGS);
    189         static void SFX_CALL cti_op_tear_off_activation(CTI_ARGS);
    190         static void SFX_CALL cti_op_tear_off_arguments(CTI_ARGS);
    191         static void SFX_CALL cti_op_ret_profiler(CTI_ARGS);
    192         static void SFX_CALL cti_op_ret_scopeChain(CTI_ARGS);
    193         static JSValue* SFX_CALL cti_op_new_array(CTI_ARGS);
    194         static JSValue* SFX_CALL cti_op_resolve(CTI_ARGS);
    195         static JSValue* SFX_CALL cti_op_resolve_global(CTI_ARGS);
    196         static VoidPtrPair SFX_CALL cti_op_construct_JSConstruct(CTI_ARGS);
    197         static JSValue* SFX_CALL cti_op_construct_NotJSConstruct(CTI_ARGS);
    198         static JSValue* SFX_CALL cti_op_get_by_val(CTI_ARGS);
    199         static VoidPtrPair SFX_CALL cti_op_resolve_func(CTI_ARGS);
    200         static JSValue* SFX_CALL cti_op_sub(CTI_ARGS);
    201         static void SFX_CALL cti_op_put_by_val(CTI_ARGS);
    202         static void SFX_CALL cti_op_put_by_val_array(CTI_ARGS);
    203         static JSValue* SFX_CALL cti_op_lesseq(CTI_ARGS);
    204         static int SFX_CALL cti_op_loop_if_true(CTI_ARGS);
    205         static JSValue* SFX_CALL cti_op_resolve_base(CTI_ARGS);
    206         static JSValue* SFX_CALL cti_op_negate(CTI_ARGS);
    207         static JSValue* SFX_CALL cti_op_resolve_skip(CTI_ARGS);
    208         static JSValue* SFX_CALL cti_op_div(CTI_ARGS);
    209         static JSValue* SFX_CALL cti_op_pre_dec(CTI_ARGS);
    210         static int SFX_CALL cti_op_jless(CTI_ARGS);
    211         static JSValue* SFX_CALL cti_op_not(CTI_ARGS);
    212         static int SFX_CALL cti_op_jtrue(CTI_ARGS);
    213         static VoidPtrPair SFX_CALL cti_op_post_inc(CTI_ARGS);
    214         static JSValue* SFX_CALL cti_op_eq(CTI_ARGS);
    215         static JSValue* SFX_CALL cti_op_lshift(CTI_ARGS);
    216         static JSValue* SFX_CALL cti_op_bitand(CTI_ARGS);
    217         static JSValue* SFX_CALL cti_op_rshift(CTI_ARGS);
    218         static JSValue* SFX_CALL cti_op_bitnot(CTI_ARGS);
    219         static VoidPtrPair SFX_CALL cti_op_resolve_with_base(CTI_ARGS);
    220         static JSValue* SFX_CALL cti_op_new_func_exp(CTI_ARGS);
    221         static JSValue* SFX_CALL cti_op_mod(CTI_ARGS);
    222         static JSValue* SFX_CALL cti_op_less(CTI_ARGS);
    223         static JSValue* SFX_CALL cti_op_neq(CTI_ARGS);
    224         static VoidPtrPair SFX_CALL cti_op_post_dec(CTI_ARGS);
    225         static JSValue* SFX_CALL cti_op_urshift(CTI_ARGS);
    226         static JSValue* SFX_CALL cti_op_bitxor(CTI_ARGS);
    227         static JSValue* SFX_CALL cti_op_new_regexp(CTI_ARGS);
    228         static JSValue* SFX_CALL cti_op_bitor(CTI_ARGS);
    229         static JSValue* SFX_CALL cti_op_call_eval(CTI_ARGS);
    230         static void* SFX_CALL cti_op_throw(CTI_ARGS);
    231         static JSPropertyNameIterator* SFX_CALL cti_op_get_pnames(CTI_ARGS);
    232         static JSValue* SFX_CALL cti_op_next_pname(CTI_ARGS);
    233         static void SFX_CALL cti_op_push_scope(CTI_ARGS);
    234         static void SFX_CALL cti_op_pop_scope(CTI_ARGS);
    235         static JSValue* SFX_CALL cti_op_typeof(CTI_ARGS);
    236         static JSValue* SFX_CALL cti_op_is_undefined(CTI_ARGS);
    237         static JSValue* SFX_CALL cti_op_is_boolean(CTI_ARGS);
    238         static JSValue* SFX_CALL cti_op_is_number(CTI_ARGS);
    239         static JSValue* SFX_CALL cti_op_is_string(CTI_ARGS);
    240         static JSValue* SFX_CALL cti_op_is_object(CTI_ARGS);
    241         static JSValue* SFX_CALL cti_op_is_function(CTI_ARGS);
    242         static JSValue* SFX_CALL cti_op_stricteq(CTI_ARGS);
    243         static JSValue* SFX_CALL cti_op_nstricteq(CTI_ARGS);
    244         static JSValue* SFX_CALL cti_op_to_jsnumber(CTI_ARGS);
    245         static JSValue* SFX_CALL cti_op_in(CTI_ARGS);
    246         static JSValue* SFX_CALL cti_op_push_new_scope(CTI_ARGS);
    247         static void SFX_CALL cti_op_jmp_scopes(CTI_ARGS);
    248         static void SFX_CALL cti_op_put_by_index(CTI_ARGS);
    249         static void* SFX_CALL cti_op_switch_imm(CTI_ARGS);
    250         static void* SFX_CALL cti_op_switch_char(CTI_ARGS);
    251         static void* SFX_CALL cti_op_switch_string(CTI_ARGS);
    252         static JSValue* SFX_CALL cti_op_del_by_val(CTI_ARGS);
    253         static void SFX_CALL cti_op_put_getter(CTI_ARGS);
    254         static void SFX_CALL cti_op_put_setter(CTI_ARGS);
    255         static JSValue* SFX_CALL cti_op_new_error(CTI_ARGS);
    256         static void SFX_CALL cti_op_debug(CTI_ARGS);
    257 
    258         static void* SFX_CALL cti_vm_throw(CTI_ARGS);
    259         static void* SFX_CALL cti_vm_compile(CTI_ARGS);
    260         static JSValue* SFX_CALL cti_op_push_activation(CTI_ARGS);
     144        static void SFX_CALL cti_timeout_check(void** args);
     145        static void SFX_CALL cti_register_file_check(void** args);
     146
     147        static JSValue* SFX_CALL cti_op_convert_this(void** args);
     148        static void SFX_CALL cti_op_end(void** args);
     149        static JSValue* SFX_CALL cti_op_add(void** args);
     150        static JSValue* SFX_CALL cti_op_pre_inc(void** args);
     151        static int SFX_CALL cti_op_loop_if_less(void** args);
     152        static int SFX_CALL cti_op_loop_if_lesseq(void** args);
     153        static JSValue* SFX_CALL cti_op_new_object(void** args);
     154        static void SFX_CALL cti_op_put_by_id(void** args);
     155        static void SFX_CALL cti_op_put_by_id_second(void** args);
     156        static void SFX_CALL cti_op_put_by_id_generic(void** args);
     157        static void SFX_CALL cti_op_put_by_id_fail(void** args);
     158        static JSValue* SFX_CALL cti_op_get_by_id(void** args);
     159        static JSValue* SFX_CALL cti_op_get_by_id_second(void** args);
     160        static JSValue* SFX_CALL cti_op_get_by_id_generic(void** args);
     161        static JSValue* SFX_CALL cti_op_get_by_id_fail(void** args);
     162        static JSValue* SFX_CALL cti_op_del_by_id(void** args);
     163        static JSValue* SFX_CALL cti_op_instanceof(void** args);
     164        static JSValue* SFX_CALL cti_op_mul(void** args);
     165        static JSValue* SFX_CALL cti_op_new_func(void** args);
     166        static VoidPtrPair SFX_CALL cti_op_call_JSFunction(void** args);
     167        static JSValue* SFX_CALL cti_op_call_NotJSFunction(void** args);
     168        static void SFX_CALL cti_op_create_arguments(void** args);
     169        static void SFX_CALL cti_op_tear_off_activation(void** args);
     170        static void SFX_CALL cti_op_tear_off_arguments(void** args);
     171        static void SFX_CALL cti_op_ret_profiler(void** args);
     172        static void SFX_CALL cti_op_ret_scopeChain(void** args);
     173        static JSValue* SFX_CALL cti_op_new_array(void** args);
     174        static JSValue* SFX_CALL cti_op_resolve(void** args);
     175        static JSValue* SFX_CALL cti_op_resolve_global(void** args);
     176        static VoidPtrPair SFX_CALL cti_op_construct_JSConstruct(void** args);
     177        static JSValue* SFX_CALL cti_op_construct_NotJSConstruct(void** args);
     178        static JSValue* SFX_CALL cti_op_get_by_val(void** args);
     179        static VoidPtrPair SFX_CALL cti_op_resolve_func(void** args);
     180        static JSValue* SFX_CALL cti_op_sub(void** args);
     181        static void SFX_CALL cti_op_put_by_val(void** args);
     182        static void SFX_CALL cti_op_put_by_val_array(void** args);
     183        static JSValue* SFX_CALL cti_op_lesseq(void** args);
     184        static int SFX_CALL cti_op_loop_if_true(void** args);
     185        static JSValue* SFX_CALL cti_op_resolve_base(void** args);
     186        static JSValue* SFX_CALL cti_op_negate(void** args);
     187        static JSValue* SFX_CALL cti_op_resolve_skip(void** args);
     188        static JSValue* SFX_CALL cti_op_div(void** args);
     189        static JSValue* SFX_CALL cti_op_pre_dec(void** args);
     190        static int SFX_CALL cti_op_jless(void** args);
     191        static JSValue* SFX_CALL cti_op_not(void** args);
     192        static int SFX_CALL cti_op_jtrue(void** args);
     193        static VoidPtrPair SFX_CALL cti_op_post_inc(void** args);
     194        static JSValue* SFX_CALL cti_op_eq(void** args);
     195        static JSValue* SFX_CALL cti_op_lshift(void** args);
     196        static JSValue* SFX_CALL cti_op_bitand(void** args);
     197        static JSValue* SFX_CALL cti_op_rshift(void** args);
     198        static JSValue* SFX_CALL cti_op_bitnot(void** args);
     199        static VoidPtrPair SFX_CALL cti_op_resolve_with_base(void** args);
     200        static JSValue* SFX_CALL cti_op_new_func_exp(void** args);
     201        static JSValue* SFX_CALL cti_op_mod(void** args);
     202        static JSValue* SFX_CALL cti_op_less(void** args);
     203        static JSValue* SFX_CALL cti_op_neq(void** args);
     204        static VoidPtrPair SFX_CALL cti_op_post_dec(void** args);
     205        static JSValue* SFX_CALL cti_op_urshift(void** args);
     206        static JSValue* SFX_CALL cti_op_bitxor(void** args);
     207        static JSValue* SFX_CALL cti_op_new_regexp(void** args);
     208        static JSValue* SFX_CALL cti_op_bitor(void** args);
     209        static JSValue* SFX_CALL cti_op_call_eval(void** args);
     210        static void* SFX_CALL cti_op_throw(void** args);
     211        static JSPropertyNameIterator* SFX_CALL cti_op_get_pnames(void** args);
     212        static JSValue* SFX_CALL cti_op_next_pname(void** args);
     213        static void SFX_CALL cti_op_push_scope(void** args);
     214        static void SFX_CALL cti_op_pop_scope(void** args);
     215        static JSValue* SFX_CALL cti_op_typeof(void** args);
     216        static JSValue* SFX_CALL cti_op_is_undefined(void** args);
     217        static JSValue* SFX_CALL cti_op_is_boolean(void** args);
     218        static JSValue* SFX_CALL cti_op_is_number(void** args);
     219        static JSValue* SFX_CALL cti_op_is_string(void** args);
     220        static JSValue* SFX_CALL cti_op_is_object(void** args);
     221        static JSValue* SFX_CALL cti_op_is_function(void** args);
     222        static JSValue* SFX_CALL cti_op_stricteq(void** args);
     223        static JSValue* SFX_CALL cti_op_nstricteq(void** args);
     224        static JSValue* SFX_CALL cti_op_to_jsnumber(void** args);
     225        static JSValue* SFX_CALL cti_op_in(void** args);
     226        static JSValue* SFX_CALL cti_op_push_new_scope(void** args);
     227        static void SFX_CALL cti_op_jmp_scopes(void** args);
     228        static void SFX_CALL cti_op_put_by_index(void** args);
     229        static void* SFX_CALL cti_op_switch_imm(void** args);
     230        static void* SFX_CALL cti_op_switch_char(void** args);
     231        static void* SFX_CALL cti_op_switch_string(void** args);
     232        static JSValue* SFX_CALL cti_op_del_by_val(void** args);
     233        static void SFX_CALL cti_op_put_getter(void** args);
     234        static void SFX_CALL cti_op_put_setter(void** args);
     235        static JSValue* SFX_CALL cti_op_new_error(void** args);
     236        static void SFX_CALL cti_op_debug(void** args);
     237
     238        static void* SFX_CALL cti_vm_throw(void** args);
     239        static void* SFX_CALL cti_vm_compile(void** args);
     240        static JSValue* SFX_CALL cti_op_push_activation(void** args);
    261241       
    262242#endif // ENABLE(CTI)
Note: See TracChangeset for help on using the changeset viewer.