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

Side by Side Diff: src/builtins/x87/builtins-x87.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/x64/builtins-x64.cc ('k') | src/heap/heap.h » ('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_X87 5 #if V8_TARGET_ARCH_X87
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 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 // Check that we have the original ArrayPrototype. 2734 // Check that we have the original ArrayPrototype.
2735 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); 2735 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset));
2736 __ mov(scratch2, NativeContextOperand()); 2736 __ mov(scratch2, NativeContextOperand());
2737 __ cmp(scratch, 2737 __ cmp(scratch,
2738 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2738 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2739 __ j(not_equal, &runtime_call); 2739 __ j(not_equal, &runtime_call);
2740 2740
2741 // Check that the ArrayPrototype hasn't been modified in a way that would 2741 // Check that the ArrayPrototype hasn't been modified in a way that would
2742 // affect iteration. 2742 // affect iteration.
2743 __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex); 2743 __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex);
2744 __ cmp(FieldOperand(scratch, Cell::kValueOffset), 2744 __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
2745 Immediate(Smi::FromInt(Isolate::kProtectorValid))); 2745 Immediate(Smi::FromInt(Isolate::kProtectorValid)));
2746 __ j(not_equal, &runtime_call); 2746 __ j(not_equal, &runtime_call);
2747 2747
2748 // Check that the map of the initial array iterator hasn't changed. 2748 // Check that the map of the initial array iterator hasn't changed.
2749 __ mov(scratch2, NativeContextOperand()); 2749 __ mov(scratch2, NativeContextOperand());
2750 __ mov(scratch, 2750 __ mov(scratch,
2751 ContextOperand(scratch2, 2751 ContextOperand(scratch2,
2752 Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX)); 2752 Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX));
2753 __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); 2753 __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset));
2754 __ cmp(scratch, 2754 __ cmp(scratch,
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
3343 3343
3344 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3344 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3345 Generate_OnStackReplacementHelper(masm, true); 3345 Generate_OnStackReplacementHelper(masm, true);
3346 } 3346 }
3347 3347
3348 #undef __ 3348 #undef __
3349 } // namespace internal 3349 } // namespace internal
3350 } // namespace v8 3350 } // namespace v8
3351 3351
3352 #endif // V8_TARGET_ARCH_X87 3352 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/builtins/x64/builtins-x64.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698