Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: src/assembler.h

Issue 6286078: Landing for Zaheer Ahmad. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Using __ str(pc, ...) Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index a29aa064b876b2504108cfe4e8a0576c21dfc387..e8bc5d6caa675366cb3d895e59aafb3c62c85d36 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -459,9 +459,6 @@ class Debug_Address;
#endif
-typedef void* ExternalReferenceRedirector(void* original, bool fp_return);
-
-
// An ExternalReference represents a C++ address used in the generated
// code. All references to C++ functions and variables must be encapsulated in
// an ExternalReference instance. This is done in order to track the origin of
@@ -469,9 +466,29 @@ typedef void* ExternalReferenceRedirector(void* original, bool fp_return);
// addresses when deserializing a heap.
class ExternalReference BASE_EMBEDDED {
public:
+ // Used in the simulator to support different native api calls.
+ //
+ // BUILTIN_CALL - builtin call.
+ // MaybeObject* f(v8::internal::Arguments).
+ //
+ // FP_RETURN_CALL - builtin call that returns floating point.
+ // double f(double, double).
+ //
+ // DIRECT_CALL - direct call to API function native callback
+ // from generated code.
+ // Handle<Value> f(v8::Arguments&)
+ //
+ enum Type {
+ BUILTIN_CALL, // default
+ FP_RETURN_CALL,
+ DIRECT_CALL
+ };
+
+ typedef void* ExternalReferenceRedirector(void* original, Type type);
+
explicit ExternalReference(Builtins::CFunctionId id);
- explicit ExternalReference(ApiFunction* ptr);
+ explicit ExternalReference(ApiFunction* ptr, Type type);
explicit ExternalReference(Builtins::Name name);
@@ -599,17 +616,19 @@ class ExternalReference BASE_EMBEDDED {
static ExternalReferenceRedirector* redirector_;
- static void* Redirect(void* address, bool fp_return = false) {
+ static void* Redirect(void* address,
+ Type type = ExternalReference::BUILTIN_CALL) {
if (redirector_ == NULL) return address;
- void* answer = (*redirector_)(address, fp_return);
+ void* answer = (*redirector_)(address, type);
return answer;
}
- static void* Redirect(Address address_arg, bool fp_return = false) {
+ static void* Redirect(Address address_arg,
+ Type type = ExternalReference::BUILTIN_CALL) {
void* address = reinterpret_cast<void*>(address_arg);
void* answer = (redirector_ == NULL) ?
address :
- (*redirector_)(address, fp_return);
+ (*redirector_)(address, type);
return answer;
}
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698