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

Side by Side Diff: src/lookup.cc

Issue 1234553002: Reload the map of typed arrays after performing ToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/lookup.h ('k') | src/objects.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 95
96 void LookupIterator::ReloadPropertyInformation() { 96 void LookupIterator::ReloadPropertyInformation() {
97 state_ = BEFORE_PROPERTY; 97 state_ = BEFORE_PROPERTY;
98 interceptor_state_ = InterceptorState::kUninitialized; 98 interceptor_state_ = InterceptorState::kUninitialized;
99 state_ = LookupInHolder(*holder_map_, *holder_); 99 state_ = LookupInHolder(*holder_map_, *holder_);
100 DCHECK(IsFound() || holder_map_->is_dictionary_map()); 100 DCHECK(IsFound() || holder_map_->is_dictionary_map());
101 } 101 }
102 102
103 103
104 void LookupIterator::ReloadHolderMap() {
105 DCHECK_EQ(DATA, state_);
106 DCHECK(IsElement());
107 DCHECK(JSObject::cast(*holder_)->HasExternalArrayElements() ||
108 JSObject::cast(*holder_)->HasFixedTypedArrayElements());
109 if (*holder_map_ != holder_->map()) {
110 holder_map_ = handle(holder_->map(), isolate_);
111 }
112 }
113
114
104 void LookupIterator::PrepareForDataProperty(Handle<Object> value) { 115 void LookupIterator::PrepareForDataProperty(Handle<Object> value) {
105 DCHECK(state_ == DATA || state_ == ACCESSOR); 116 DCHECK(state_ == DATA || state_ == ACCESSOR);
106 DCHECK(HolderIsReceiverOrHiddenPrototype()); 117 DCHECK(HolderIsReceiverOrHiddenPrototype());
107 118
108 Handle<JSObject> holder = GetHolder<JSObject>(); 119 Handle<JSObject> holder = GetHolder<JSObject>();
109 120
110 if (IsElement()) { 121 if (IsElement()) {
111 ElementsKind old_kind = holder_map_->elements_kind(); 122 ElementsKind old_kind = holder_map_->elements_kind();
112 holder_map_ = Map::PrepareForDataElement(holder_map_, value); 123 holder_map_ = Map::PrepareForDataElement(holder_map_, value);
113 ElementsKind new_kind = holder_map_->elements_kind(); 124 ElementsKind new_kind = holder_map_->elements_kind();
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 case InterceptorState::kSkipNonMasking: 503 case InterceptorState::kSkipNonMasking:
493 return true; 504 return true;
494 case InterceptorState::kProcessNonMasking: 505 case InterceptorState::kProcessNonMasking:
495 return false; 506 return false;
496 } 507 }
497 } 508 }
498 return interceptor_state_ == InterceptorState::kProcessNonMasking; 509 return interceptor_state_ == InterceptorState::kProcessNonMasking;
499 } 510 }
500 } // namespace internal 511 } // namespace internal
501 } // namespace v8 512 } // namespace v8
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698