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

Side by Side Diff: src/builtins/ia32/builtins-ia32.cc

Issue 2658573008: Convert the array iterator protector to a PropertyCell. (Closed)
Patch Set: Created 3 years, 10 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 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 // Check that we have the original ArrayPrototype. 2782 // Check that we have the original ArrayPrototype.
2783 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); 2783 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset));
2784 __ mov(scratch2, NativeContextOperand()); 2784 __ mov(scratch2, NativeContextOperand());
2785 __ cmp(scratch, 2785 __ cmp(scratch,
2786 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2786 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2787 __ j(not_equal, &runtime_call); 2787 __ j(not_equal, &runtime_call);
2788 2788
2789 // Check that the ArrayPrototype hasn't been modified in a way that would 2789 // Check that the ArrayPrototype hasn't been modified in a way that would
2790 // affect iteration. 2790 // affect iteration.
2791 __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex); 2791 __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex);
2792 __ cmp(FieldOperand(scratch, Cell::kValueOffset), 2792 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
2793 Immediate(Smi::FromInt(Isolate::kProtectorValid))); 2793 Immediate(Smi::FromInt(Isolate::kProtectorValid)));
2794 __ j(not_equal, &runtime_call); 2794 __ j(not_equal, &runtime_call);
2795 2795
2796 // Check that the map of the initial array iterator hasn't changed. 2796 // Check that the map of the initial array iterator hasn't changed.
2797 __ mov(scratch2, NativeContextOperand()); 2797 __ mov(scratch2, NativeContextOperand());
2798 __ mov(scratch, 2798 __ mov(scratch,
2799 ContextOperand(scratch2, 2799 ContextOperand(scratch2,
2800 Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX)); 2800 Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX));
2801 __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); 2801 __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset));
2802 __ cmp(scratch, 2802 __ cmp(scratch,
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 3373
3374 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3374 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3375 Generate_OnStackReplacementHelper(masm, true); 3375 Generate_OnStackReplacementHelper(masm, true);
3376 } 3376 }
3377 3377
3378 #undef __ 3378 #undef __
3379 } // namespace internal 3379 } // namespace internal
3380 } // namespace v8 3380 } // namespace v8
3381 3381
3382 #endif // V8_TARGET_ARCH_IA32 3382 #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