Chromium Code Reviews| Index: src/assembler.h |
| diff --git a/src/assembler.h b/src/assembler.h |
| index d3207040b3e55c986c1ccca4f3dbd240c4bfbfff..7e023e6ea9be28dce78fc7c34c2d753eac89ecdc 100644 |
| --- a/src/assembler.h |
| +++ b/src/assembler.h |
| @@ -501,25 +501,26 @@ class ExternalReference BASE_EMBEDDED { |
| typedef void* ExternalReferenceRedirector(void* original, Type type); |
| - explicit ExternalReference(Builtins::CFunctionId id); |
| + explicit ExternalReference(Builtins::CFunctionId id, Isolate* isolate); |
|
Vitaly Repeshko
2011/03/21 17:06:57
I think these should be moved to some class that a
Mads Ager (chromium)
2011/03/22 08:42:37
I sort of agree. However, looking into it more, ex
|
| - explicit ExternalReference(ApiFunction* ptr, Type type); |
| + explicit ExternalReference(ApiFunction* ptr, Type type, Isolate* isolate); |
| - explicit ExternalReference(Builtins::Name name); |
| + explicit ExternalReference(Builtins::Name name, Isolate* isolate); |
| - explicit ExternalReference(Runtime::FunctionId id); |
| + explicit ExternalReference(Runtime::FunctionId id, Isolate* isolate); |
| - explicit ExternalReference(const Runtime::Function* f); |
| + explicit ExternalReference(const Runtime::Function* f, Isolate* isolate); |
| - explicit ExternalReference(const IC_Utility& ic_utility); |
| + explicit ExternalReference(const IC_Utility& ic_utility, Isolate* isolate); |
| #ifdef ENABLE_DEBUGGER_SUPPORT |
| - explicit ExternalReference(const Debug_Address& debug_address); |
| + explicit ExternalReference(const Debug_Address& debug_address, |
| + Isolate* isolate); |
| #endif |
| explicit ExternalReference(StatsCounter* counter); |
| - explicit ExternalReference(Isolate::AddressId id); |
| + explicit ExternalReference(Isolate::AddressId id, Isolate* isolate); |
| explicit ExternalReference(const SCTableReference& table_ref); |
| @@ -530,63 +531,67 @@ class ExternalReference BASE_EMBEDDED { |
| // pattern. This means that they have to be added to the |
| // ExternalReferenceTable in serialize.cc manually. |
| - static ExternalReference perform_gc_function(); |
| - static ExternalReference fill_heap_number_with_random_function(); |
| - static ExternalReference random_uint32_function(); |
| - static ExternalReference transcendental_cache_array_address(); |
| - static ExternalReference delete_handle_scope_extensions(); |
| + static ExternalReference perform_gc_function(Isolate* isolate); |
| + static ExternalReference fill_heap_number_with_random_function( |
| + Isolate* isolate); |
| + static ExternalReference random_uint32_function(Isolate* isolate); |
| + static ExternalReference transcendental_cache_array_address(Isolate* isolate); |
| + static ExternalReference delete_handle_scope_extensions(Isolate* isolate); |
| // Deoptimization support. |
| - static ExternalReference new_deoptimizer_function(); |
| - static ExternalReference compute_output_frames_function(); |
| - static ExternalReference global_contexts_list(); |
| + static ExternalReference new_deoptimizer_function(Isolate* isolate); |
| + static ExternalReference compute_output_frames_function(Isolate* isolate); |
| + static ExternalReference global_contexts_list(Isolate* isolate); |
| // Static data in the keyed lookup cache. |
| - static ExternalReference keyed_lookup_cache_keys(); |
| - static ExternalReference keyed_lookup_cache_field_offsets(); |
| + static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); |
| + static ExternalReference keyed_lookup_cache_field_offsets(Isolate* isolate); |
| // Static variable Factory::the_hole_value.location() |
| - static ExternalReference the_hole_value_location(); |
| + static ExternalReference the_hole_value_location(Isolate* isolate); |
| // Static variable Factory::arguments_marker.location() |
| - static ExternalReference arguments_marker_location(); |
| + static ExternalReference arguments_marker_location(Isolate* isolate); |
| // Static variable Heap::roots_address() |
| - static ExternalReference roots_address(); |
| + static ExternalReference roots_address(Isolate* isolate); |
| // Static variable StackGuard::address_of_jslimit() |
| - static ExternalReference address_of_stack_limit(); |
| + static ExternalReference address_of_stack_limit(Isolate* isolate); |
| // Static variable StackGuard::address_of_real_jslimit() |
| - static ExternalReference address_of_real_stack_limit(); |
| + static ExternalReference address_of_real_stack_limit(Isolate* isolate); |
| // Static variable RegExpStack::limit_address() |
| - static ExternalReference address_of_regexp_stack_limit(); |
| + static ExternalReference address_of_regexp_stack_limit(Isolate* isolate); |
| // Static variables for RegExp. |
| - static ExternalReference address_of_static_offsets_vector(); |
| - static ExternalReference address_of_regexp_stack_memory_address(); |
| - static ExternalReference address_of_regexp_stack_memory_size(); |
| + static ExternalReference address_of_static_offsets_vector(Isolate* isolate); |
| + static ExternalReference address_of_regexp_stack_memory_address( |
| + Isolate* isolate); |
| + static ExternalReference address_of_regexp_stack_memory_size( |
| + Isolate* isolate); |
| // Static variable Heap::NewSpaceStart() |
| - static ExternalReference new_space_start(); |
| - static ExternalReference new_space_mask(); |
| - static ExternalReference heap_always_allocate_scope_depth(); |
| + static ExternalReference new_space_start(Isolate* isolate); |
| + static ExternalReference new_space_mask(Isolate* isolate); |
| + static ExternalReference heap_always_allocate_scope_depth(Isolate* isolate); |
| // Used for fast allocation in generated code. |
| - static ExternalReference new_space_allocation_top_address(); |
| - static ExternalReference new_space_allocation_limit_address(); |
| + static ExternalReference new_space_allocation_top_address(Isolate* isolate); |
| + static ExternalReference new_space_allocation_limit_address(Isolate* isolate); |
| - static ExternalReference double_fp_operation(Token::Value operation); |
| - static ExternalReference compare_doubles(); |
| - static ExternalReference power_double_double_function(); |
| - static ExternalReference power_double_int_function(); |
| + static ExternalReference double_fp_operation(Token::Value operation, |
| + Isolate* isolate); |
| + static ExternalReference compare_doubles(Isolate* isolate); |
| + static ExternalReference power_double_double_function(Isolate* isolate); |
| + static ExternalReference power_double_int_function(Isolate* isolate); |
| static ExternalReference handle_scope_next_address(); |
| static ExternalReference handle_scope_limit_address(); |
| static ExternalReference handle_scope_level_address(); |
| - static ExternalReference scheduled_exception_address(); |
| + static ExternalReference scheduled_exception_address(Isolate* isolate); |
| // Static variables containing common double constants. |
| static ExternalReference address_of_min_int(); |
| @@ -595,31 +600,31 @@ class ExternalReference BASE_EMBEDDED { |
| static ExternalReference address_of_negative_infinity(); |
| static ExternalReference address_of_nan(); |
| - static ExternalReference math_sin_double_function(); |
| - static ExternalReference math_cos_double_function(); |
| - static ExternalReference math_log_double_function(); |
| + static ExternalReference math_sin_double_function(Isolate* isolate); |
| + static ExternalReference math_cos_double_function(Isolate* isolate); |
| + static ExternalReference math_log_double_function(Isolate* isolate); |
| Address address() const {return reinterpret_cast<Address>(address_);} |
| #ifdef ENABLE_DEBUGGER_SUPPORT |
| // Function Debug::Break() |
| - static ExternalReference debug_break(); |
| + static ExternalReference debug_break(Isolate* isolate); |
| // Used to check if single stepping is enabled in generated code. |
| - static ExternalReference debug_step_in_fp_address(); |
| + static ExternalReference debug_step_in_fp_address(Isolate* isolate); |
| #endif |
| #ifndef V8_INTERPRETED_REGEXP |
| // C functions called from RegExp generated code. |
| // Function NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16() |
| - static ExternalReference re_case_insensitive_compare_uc16(); |
| + static ExternalReference re_case_insensitive_compare_uc16(Isolate* isolate); |
| // Function RegExpMacroAssembler*::CheckStackGuardState() |
| - static ExternalReference re_check_stack_guard_state(); |
| + static ExternalReference re_check_stack_guard_state(Isolate* isolate); |
| // Function NativeRegExpMacroAssembler::GrowStack() |
| - static ExternalReference re_grow_stack(); |
| + static ExternalReference re_grow_stack(Isolate* isolate); |
| // byte NativeRegExpMacroAssembler::word_character_bitmap |
| static ExternalReference re_word_character_map(); |
| @@ -639,21 +644,23 @@ class ExternalReference BASE_EMBEDDED { |
| explicit ExternalReference(void* address) |
| : address_(address) {} |
| - static void* Redirect(void* address, |
| + static void* Redirect(Isolate* isolate, |
| + void* address, |
| Type type = ExternalReference::BUILTIN_CALL) { |
| ExternalReferenceRedirector* redirector = |
| reinterpret_cast<ExternalReferenceRedirector*>( |
| - Isolate::Current()->external_reference_redirector()); |
| + isolate->external_reference_redirector()); |
| if (redirector == NULL) return address; |
| void* answer = (*redirector)(address, type); |
| return answer; |
| } |
| - static void* Redirect(Address address_arg, |
| + static void* Redirect(Isolate* isolate, |
| + Address address_arg, |
| Type type = ExternalReference::BUILTIN_CALL) { |
| ExternalReferenceRedirector* redirector = |
| reinterpret_cast<ExternalReferenceRedirector*>( |
| - Isolate::Current()->external_reference_redirector()); |
| + isolate->external_reference_redirector()); |
| void* address = reinterpret_cast<void*>(address_arg); |
| void* answer = (redirector == NULL) ? |
| address : |