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

Side by Side Diff: src/lookup.cc

Issue 1123163005: Mark internal AccessorInfo properties as "special data properties" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 5 years, 7 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/accessors.cc ('k') | src/objects.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 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 ReloadPropertyInformation(); 137 ReloadPropertyInformation();
138 } 138 }
139 139
140 140
141 void LookupIterator::PrepareTransitionToDataProperty( 141 void LookupIterator::PrepareTransitionToDataProperty(
142 Handle<Object> value, PropertyAttributes attributes, 142 Handle<Object> value, PropertyAttributes attributes,
143 Object::StoreFromKeyed store_mode) { 143 Object::StoreFromKeyed store_mode) {
144 if (state_ == TRANSITION) return; 144 if (state_ == TRANSITION) return;
145 DCHECK_NE(LookupIterator::ACCESSOR, state_); 145 DCHECK(state_ != LookupIterator::ACCESSOR ||
146 (GetAccessors()->IsAccessorInfo() &&
147 AccessorInfo::cast(*GetAccessors())->is_special_data_property()));
146 DCHECK_NE(LookupIterator::INTEGER_INDEXED_EXOTIC, state_); 148 DCHECK_NE(LookupIterator::INTEGER_INDEXED_EXOTIC, state_);
147 DCHECK(state_ == NOT_FOUND || !HolderIsReceiverOrHiddenPrototype()); 149 DCHECK(state_ == NOT_FOUND || !HolderIsReceiverOrHiddenPrototype());
148 // Can only be called when the receiver is a JSObject. JSProxy has to be 150 // Can only be called when the receiver is a JSObject. JSProxy has to be
149 // handled via a trap. Adding properties to primitive values is not 151 // handled via a trap. Adding properties to primitive values is not
150 // observable. 152 // observable.
151 Handle<JSObject> receiver = GetStoreTarget(); 153 Handle<JSObject> receiver = GetStoreTarget();
152 154
153 if (!isolate()->IsInternallyUsedPropertyName(name()) && 155 if (!isolate()->IsInternallyUsedPropertyName(name()) &&
154 !receiver->map()->is_extensible()) { 156 !receiver->map()->is_extensible()) {
155 return; 157 return;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // Fall through. 390 // Fall through.
389 case InterceptorState::kSkipNonMasking: 391 case InterceptorState::kSkipNonMasking:
390 return true; 392 return true;
391 case InterceptorState::kProcessNonMasking: 393 case InterceptorState::kProcessNonMasking:
392 return false; 394 return false;
393 } 395 }
394 } 396 }
395 return interceptor_state_ == InterceptorState::kProcessNonMasking; 397 return interceptor_state_ == InterceptorState::kProcessNonMasking;
396 } 398 }
397 } } // namespace v8::internal 399 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698