Commit cf1e7cdf authored by mjs@apple.com's avatar mjs@apple.com

2008-10-17 Maciej Stachowiak <mjs@apple.com>

        Reviewed by Cameron Zwarich.
        
        - in debug builds, alter the stack to avoid blowing out MallocStackLogging
        
        (In essence, while executing a CTI function we alter the return
        address to jscGeneratedNativeCode so that a single consistent
        function is on the stack instead of many random functions without
        symbols.)

        * VM/CTI.h:
        * VM/Machine.cpp:
        (JSC::doSetReturnAddress):
        (JSC::):
        (JSC::StackHack::StackHack):
        (JSC::StackHack::~StackHack):
        (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_profiler):
        (JSC::Machine::cti_op_call_JSFunction):
        (JSC::Machine::cti_vm_lazyLinkCall):
        (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_JSConstructFast):
        (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):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8bdf69e6
2008-10-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Cameron Zwarich.
- in debug builds, alter the stack to avoid blowing out MallocStackLogging
(In essence, while executing a CTI function we alter the return
address to jscGeneratedNativeCode so that a single consistent
function is on the stack instead of many random functions without
symbols.)
* VM/CTI.h:
* VM/Machine.cpp:
(JSC::doSetReturnAddress):
(JSC::):
(JSC::StackHack::StackHack):
(JSC::StackHack::~StackHack):
(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_profiler):
(JSC::Machine::cti_op_call_JSFunction):
(JSC::Machine::cti_vm_lazyLinkCall):
(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_JSConstructFast):
(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):
2008-10-17 Gavin Barraclough <barraclough@apple.com>
Optimize op_call by allowing call sites to be directly linked to callees.
......
......@@ -79,7 +79,7 @@
#define ARG_instr5 ((Instruction*)((ARGS)[5]))
#define ARG_instr6 ((Instruction*)((ARGS)[6]))
#define CTI_RETURN_ADDRESS ((ARGS)[-1])
#define CTI_RETURN_ADDRESS_SLOT ((ARGS)[-1])
namespace JSC {
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment