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

Side by Side Diff: src/builtins/x64/builtins-x64.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/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.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_X64 5 #if V8_TARGET_ARCH_X64
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 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 __ j(not_equal, &runtime_call); 2842 __ j(not_equal, &runtime_call);
2843 2843
2844 // Check that we have the original ArrayPrototype. 2844 // Check that we have the original ArrayPrototype.
2845 __ movp(rcx, FieldOperand(r15, Map::kPrototypeOffset)); 2845 __ movp(rcx, FieldOperand(r15, Map::kPrototypeOffset));
2846 __ cmpp(rcx, ContextOperand(r14, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); 2846 __ cmpp(rcx, ContextOperand(r14, Context::INITIAL_ARRAY_PROTOTYPE_INDEX));
2847 __ j(not_equal, &runtime_call); 2847 __ j(not_equal, &runtime_call);
2848 2848
2849 // Check that the ArrayPrototype hasn't been modified in a way that would 2849 // Check that the ArrayPrototype hasn't been modified in a way that would
2850 // affect iteration. 2850 // affect iteration.
2851 __ LoadRoot(rcx, Heap::kArrayIteratorProtectorRootIndex); 2851 __ LoadRoot(rcx, Heap::kArrayIteratorProtectorRootIndex);
2852 __ Cmp(FieldOperand(rcx, Cell::kValueOffset), 2852 __ Cmp(FieldOperand(rcx, PropertyCell::kValueOffset),
2853 Smi::FromInt(Isolate::kProtectorValid)); 2853 Smi::FromInt(Isolate::kProtectorValid));
2854 __ j(not_equal, &runtime_call); 2854 __ j(not_equal, &runtime_call);
2855 2855
2856 // Check that the map of the initial array iterator hasn't changed. 2856 // Check that the map of the initial array iterator hasn't changed.
2857 __ movp(rcx, 2857 __ movp(rcx,
2858 ContextOperand(r14, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX)); 2858 ContextOperand(r14, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX));
2859 __ movp(rcx, FieldOperand(rcx, HeapObject::kMapOffset)); 2859 __ movp(rcx, FieldOperand(rcx, HeapObject::kMapOffset));
2860 __ cmpp(rcx, ContextOperand( 2860 __ cmpp(rcx, ContextOperand(
2861 r14, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX)); 2861 r14, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX));
2862 __ j(not_equal, &runtime_call); 2862 __ j(not_equal, &runtime_call);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3265 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3266 Generate_OnStackReplacementHelper(masm, true); 3266 Generate_OnStackReplacementHelper(masm, true);
3267 } 3267 }
3268 3268
3269 #undef __ 3269 #undef __
3270 3270
3271 } // namespace internal 3271 } // namespace internal
3272 } // namespace v8 3272 } // namespace v8
3273 3273
3274 #endif // V8_TARGET_ARCH_X64 3274 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698