Index: src/assembler.h |
diff --git a/src/assembler.h b/src/assembler.h |
index fd7b16134b4ba645212b86adf45f77e99d417f45..6a1e4c320ef787d9bb0edf0f647d1991e6568641 100644 |
--- a/src/assembler.h |
+++ b/src/assembler.h |
@@ -814,10 +814,13 @@ class ExternalReference BASE_EMBEDDED { |
// Used in the simulator to support different native api calls. |
enum Type { |
// Builtin call. |
- // Object* f(v8::internal::Arguments) or |
- // ObjectPair f(v8::internal::Arguments). |
+ // Object* f(v8::internal::Arguments). |
BUILTIN_CALL, // default |
+ // Builtin call returning object pair. |
+ // ObjectPair f(v8::internal::Arguments). |
+ BUILTIN_CALL_PAIR, |
+ |
// Builtin call that returns . |
// ObjectTriple f(v8::internal::Arguments). |
BUILTIN_CALL_TRIPLE, |
@@ -1041,6 +1044,24 @@ class ExternalReference BASE_EMBEDDED { |
return answer; |
} |
+ static Type builtin_call_type(int size) { |
rmcilroy
2016/01/22 11:13:52
/s/size/result_size
rmcilroy
2016/01/22 11:13:52
Just call this BuiltinCallTypeForResultSize and ma
MTBrandyberry
2016/01/22 14:53:53
Done.
MTBrandyberry
2016/01/22 14:53:53
Done.
|
+ Type type; |
+ switch (size) { |
+ case 1: |
+ type = BUILTIN_CALL; |
+ break; |
rmcilroy
2016/01/22 11:13:52
nit - just "return BUILTIN_CALL" directly, no need
MTBrandyberry
2016/01/22 14:53:53
Done.
|
+ case 2: |
+ type = BUILTIN_CALL_PAIR; |
+ break; |
+ case 3: |
+ type = BUILTIN_CALL_TRIPLE; |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ } |
+ return type; |
+ } |
+ |
void* address_; |
}; |