Index: src/assembler.cc |
=================================================================== |
--- src/assembler.cc (revision 2053) |
+++ src/assembler.cc (working copy) |
@@ -504,7 +504,7 @@ |
// Implementation of ExternalReference |
ExternalReference::ExternalReference(Builtins::CFunctionId id) |
- : address_(Builtins::c_function_address(id)) {} |
+ : address_(Redirect(Builtins::c_function_address(id))) {} |
ExternalReference::ExternalReference(Builtins::Name name) |
@@ -512,15 +512,15 @@ |
ExternalReference::ExternalReference(Runtime::FunctionId id) |
- : address_(Runtime::FunctionForId(id)->entry) {} |
+ : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} |
ExternalReference::ExternalReference(Runtime::Function* f) |
- : address_(f->entry) {} |
+ : address_(Redirect(f->entry)) {} |
ExternalReference::ExternalReference(const IC_Utility& ic_utility) |
- : address_(ic_utility.address()) {} |
+ : address_(Redirect(ic_utility.address())) {} |
#ifdef ENABLE_DEBUGGER_SUPPORT |
ExternalReference::ExternalReference(const Debug_Address& debug_address) |
@@ -539,10 +539,16 @@ |
: address_(table_ref.address()) {} |
+ExternalReference ExternalReference::perform_gc_function() { |
+ return ExternalReference(Redirect(FUNCTION_ADDR(Runtime::PerformGC))); |
+} |
+ |
+ |
ExternalReference ExternalReference::builtin_passed_function() { |
return ExternalReference(&Builtins::builtin_passed_function); |
} |
+ |
ExternalReference ExternalReference::the_hole_value_location() { |
return ExternalReference(Factory::the_hole_value().location()); |
} |
@@ -610,13 +616,17 @@ |
default: |
UNREACHABLE(); |
} |
- return ExternalReference(FUNCTION_ADDR(function)); |
+ // Passing true as 2nd parameter indicates that they return an fp value. |
+ return ExternalReference(Redirect(FUNCTION_ADDR(function), true)); |
} |
+ExternalReferenceRedirector* ExternalReference::redirector_ = NULL; |
+ |
+ |
#ifdef ENABLE_DEBUGGER_SUPPORT |
ExternalReference ExternalReference::debug_break() { |
- return ExternalReference(FUNCTION_ADDR(Debug::Break)); |
+ return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); |
} |