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

Side by Side Diff: src/builtins/ia32/builtins-ia32.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/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 Register argc = eax; 2683 Register argc = eax;
2684 2684
2685 Register scratch = ecx; 2685 Register scratch = ecx;
2686 Register scratch2 = edi; 2686 Register scratch2 = edi;
2687 2687
2688 Register spread = ebx; 2688 Register spread = ebx;
2689 Register spread_map = edx; 2689 Register spread_map = edx;
2690 2690
2691 Register spread_len = edx; 2691 Register spread_len = edx;
2692 2692
2693 Label runtime_call, push_args;
2693 __ mov(spread, Operand(esp, kPointerSize)); 2694 __ mov(spread, Operand(esp, kPointerSize));
2695 __ JumpIfSmi(spread, &runtime_call);
2694 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); 2696 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset));
2695 2697
2696 Label runtime_call, push_args;
2697 // Check that the spread is an array. 2698 // Check that the spread is an array.
2698 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); 2699 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE);
2699 __ j(not_equal, &runtime_call); 2700 __ j(not_equal, &runtime_call);
2700 2701
2701 // Check that we have the original ArrayPrototype. 2702 // Check that we have the original ArrayPrototype.
2702 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); 2703 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset));
2703 __ mov(scratch2, NativeContextOperand()); 2704 __ mov(scratch2, NativeContextOperand());
2704 __ cmp(scratch, 2705 __ cmp(scratch,
2705 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2706 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2706 __ j(not_equal, &runtime_call); 2707 __ j(not_equal, &runtime_call);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 3293
3293 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3294 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3294 Generate_OnStackReplacementHelper(masm, true); 3295 Generate_OnStackReplacementHelper(masm, true);
3295 } 3296 }
3296 3297
3297 #undef __ 3298 #undef __
3298 } // namespace internal 3299 } // namespace internal
3299 } // namespace v8 3300 } // namespace v8
3300 3301
3301 #endif // V8_TARGET_ARCH_IA32 3302 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698