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

Unified Diff: src/builtins/x64/builtins-x64.cc

Issue 2655013002: [Builtins] Smi-check the spread and go to runtime in CheckSpreadAndPushToStack. (Closed)
Patch Set: Put a try/catch in the regression test so it doesn't fail Created 3 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/builtins/mips64/builtins-mips64.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x64/builtins-x64.cc
diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc
index 58d38cf138a6236728f3a6fc9e42f971d98537c3..8aced350ec8f4d3f692c80bcdb3652bf8d176170 100644
--- a/src/builtins/x64/builtins-x64.cc
+++ b/src/builtins/x64/builtins-x64.cc
@@ -2764,14 +2764,15 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
}
static void CheckSpreadAndPushToStack(MacroAssembler* masm) {
+ Label runtime_call, push_args;
// Load the spread argument into rbx.
__ movp(rbx, Operand(rsp, kPointerSize));
+ __ JumpIfSmi(rbx, &runtime_call);
// Load the map of the spread into r15.
__ movp(r15, FieldOperand(rbx, HeapObject::kMapOffset));
// Load native context into r14.
__ movp(r14, NativeContextOperand());
- Label runtime_call, push_args;
// Check that the spread is an array.
__ CmpInstanceType(r15, JS_ARRAY_TYPE);
__ j(not_equal, &runtime_call);
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698