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

Side by Side Diff: src/builtins/arm64/builtins-arm64.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 unified diff | Download patch
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 Register new_target = x3; 2704 Register new_target = x3;
2705 2705
2706 Register scratch = x2; 2706 Register scratch = x2;
2707 Register scratch2 = x6; 2707 Register scratch2 = x6;
2708 2708
2709 Register spread = x4; 2709 Register spread = x4;
2710 Register spread_map = x5; 2710 Register spread_map = x5;
2711 2711
2712 Register spread_len = x5; 2712 Register spread_len = x5;
2713 2713
2714 Label runtime_call, push_args;
2714 __ Peek(spread, 0); 2715 __ Peek(spread, 0);
2716 __ JumpIfSmi(spread, &runtime_call);
2715 __ Ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); 2717 __ Ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset));
2716 2718
2717 Label runtime_call, push_args;
2718 // Check that the spread is an array. 2719 // Check that the spread is an array.
2719 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE); 2720 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE);
2720 __ B(ne, &runtime_call); 2721 __ B(ne, &runtime_call);
2721 2722
2722 // Check that we have the original ArrayPrototype. 2723 // Check that we have the original ArrayPrototype.
2723 __ Ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); 2724 __ Ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset));
2724 __ Ldr(scratch2, NativeContextMemOperand()); 2725 __ Ldr(scratch2, NativeContextMemOperand());
2725 __ Ldr(scratch2, 2726 __ Ldr(scratch2,
2726 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2727 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2727 __ Cmp(scratch, scratch2); 2728 __ Cmp(scratch, scratch2);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
3160 __ Unreachable(); 3161 __ Unreachable();
3161 } 3162 }
3162 } 3163 }
3163 3164
3164 #undef __ 3165 #undef __
3165 3166
3166 } // namespace internal 3167 } // namespace internal
3167 } // namespace v8 3168 } // namespace v8
3168 3169
3169 #endif // V8_TARGET_ARCH_ARM 3170 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698