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

Unified Diff: src/assembler.cc

Issue 1604653006: Introduce BUILTIN_CALL_PAIR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Changes based on review comments. 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/assembler.h ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 784331738ee23f47cb9bc5cf9b796304f3e9a6d5..4099e1febcfc5272953c43fc3abaede1f024da80 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -942,6 +942,20 @@ void RelocInfo::Verify(Isolate* isolate) {
// Implementation of ExternalReference
+static ExternalReference::Type BuiltinCallTypeForResultSize(int result_size) {
+ switch (result_size) {
+ case 1:
+ return ExternalReference::BUILTIN_CALL;
+ case 2:
+ return ExternalReference::BUILTIN_CALL_PAIR;
+ case 3:
+ return ExternalReference::BUILTIN_CALL_TRIPLE;
+ }
+ UNREACHABLE();
+ return ExternalReference::BUILTIN_CALL;
+}
+
+
void ExternalReference::SetUp() {
double_constants.min_int = kMinInt;
double_constants.one_half = 0.5;
@@ -1029,9 +1043,8 @@ ExternalReference::ExternalReference(Runtime::FunctionId id, Isolate* isolate)
ExternalReference::ExternalReference(const Runtime::Function* f,
Isolate* isolate)
- : address_(Redirect(isolate, f->entry, f->result_size == 3
- ? BUILTIN_CALL_TRIPLE
- : BUILTIN_CALL)) {}
+ : address_(Redirect(isolate, f->entry,
+ BuiltinCallTypeForResultSize(f->result_size))) {}
ExternalReference ExternalReference::isolate_address(Isolate* isolate) {
« no previous file with comments | « src/assembler.h ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698