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

Side by Side Diff: src/builtins/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 Register scratch = t0; 2662 Register scratch = t0;
2663 Register scratch2 = t1; 2663 Register scratch2 = t1;
2664 2664
2665 Register spread = a2; 2665 Register spread = a2;
2666 Register spread_map = a4; 2666 Register spread_map = a4;
2667 2667
2668 Register spread_len = a4; 2668 Register spread_len = a4;
2669 2669
2670 Register native_context = a5; 2670 Register native_context = a5;
2671 2671
2672 Label runtime_call, push_args;
2672 __ ld(spread, MemOperand(sp, 0)); 2673 __ ld(spread, MemOperand(sp, 0));
2674 __ JumpIfSmi(spread, &runtime_call);
2673 __ ld(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); 2675 __ ld(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset));
2674 __ ld(native_context, NativeContextMemOperand()); 2676 __ ld(native_context, NativeContextMemOperand());
2675 2677
2676 Label runtime_call, push_args;
2677 // Check that the spread is an array. 2678 // Check that the spread is an array.
2678 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset)); 2679 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset));
2679 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE)); 2680 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE));
2680 2681
2681 // Check that we have the original ArrayPrototype. 2682 // Check that we have the original ArrayPrototype.
2682 __ ld(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); 2683 __ ld(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset));
2683 __ ld(scratch2, ContextMemOperand(native_context, 2684 __ ld(scratch2, ContextMemOperand(native_context,
2684 Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2685 Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2685 __ Branch(&runtime_call, ne, scratch, Operand(scratch2)); 2686 __ Branch(&runtime_call, ne, scratch, Operand(scratch2));
2686 2687
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3152 __ break_(0xCC); 3153 __ break_(0xCC);
3153 } 3154 }
3154 } 3155 }
3155 3156
3156 #undef __ 3157 #undef __
3157 3158
3158 } // namespace internal 3159 } // namespace internal
3159 } // namespace v8 3160 } // namespace v8
3160 3161
3161 #endif // V8_TARGET_ARCH_MIPS64 3162 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698