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

Unified Diff: src/assembler.h

Issue 1604653006: Introduce BUILTIN_CALL_PAIR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add builtin_call_type helper. Created 4 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/arm64/simulator-arm64.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 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_;
};
« no previous file with comments | « src/arm64/simulator-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698