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

Side by Side Diff: src/lookup.cc

Issue 1021163002: Revert of Add debug checks to catch PropertyCell::cast failures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | src/lookup-inl.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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return false; 249 return false;
250 } 250 }
251 251
252 252
253 Handle<Object> LookupIterator::FetchValue() const { 253 Handle<Object> LookupIterator::FetchValue() const {
254 Object* result = NULL; 254 Object* result = NULL;
255 Handle<JSObject> holder = GetHolder<JSObject>(); 255 Handle<JSObject> holder = GetHolder<JSObject>();
256 if (holder_map_->is_dictionary_map()) { 256 if (holder_map_->is_dictionary_map()) {
257 result = holder->property_dictionary()->ValueAt(number_); 257 result = holder->property_dictionary()->ValueAt(number_);
258 if (holder_map_->IsGlobalObjectMap()) { 258 if (holder_map_->IsGlobalObjectMap()) {
259 DCHECK(result->IsPropertyCell());
260 result = PropertyCell::cast(result)->value(); 259 result = PropertyCell::cast(result)->value();
261 } 260 }
262 } else if (property_details_.type() == v8::internal::DATA) { 261 } else if (property_details_.type() == v8::internal::DATA) {
263 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_); 262 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_);
264 return JSObject::FastPropertyAt(holder, property_details_.representation(), 263 return JSObject::FastPropertyAt(holder, property_details_.representation(),
265 field_index); 264 field_index);
266 } else { 265 } else {
267 result = holder_map_->instance_descriptors()->GetValue(number_); 266 result = holder_map_->instance_descriptors()->GetValue(number_);
268 } 267 }
269 return handle(result, isolate_); 268 return handle(result, isolate_);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 return handle( 303 return handle(
305 holder_map_->instance_descriptors()->GetFieldType(descriptor_number()), 304 holder_map_->instance_descriptors()->GetFieldType(descriptor_number()),
306 isolate_); 305 isolate_);
307 } 306 }
308 307
309 308
310 Handle<PropertyCell> LookupIterator::GetPropertyCell() const { 309 Handle<PropertyCell> LookupIterator::GetPropertyCell() const {
311 Handle<JSObject> holder = GetHolder<JSObject>(); 310 Handle<JSObject> holder = GetHolder<JSObject>();
312 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); 311 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
313 Object* value = global->property_dictionary()->ValueAt(dictionary_entry()); 312 Object* value = global->property_dictionary()->ValueAt(dictionary_entry());
314 DCHECK(value->IsPropertyCell());
315 return Handle<PropertyCell>(PropertyCell::cast(value)); 313 return Handle<PropertyCell>(PropertyCell::cast(value));
316 } 314 }
317 315
318 316
319 Handle<Object> LookupIterator::GetAccessors() const { 317 Handle<Object> LookupIterator::GetAccessors() const {
320 DCHECK_EQ(ACCESSOR, state_); 318 DCHECK_EQ(ACCESSOR, state_);
321 return FetchValue(); 319 return FetchValue();
322 } 320 }
323 321
324 322
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // Fall through. 384 // Fall through.
387 case InterceptorState::kSkipNonMasking: 385 case InterceptorState::kSkipNonMasking:
388 return true; 386 return true;
389 case InterceptorState::kProcessNonMasking: 387 case InterceptorState::kProcessNonMasking:
390 return false; 388 return false;
391 } 389 }
392 } 390 }
393 return interceptor_state_ == InterceptorState::kProcessNonMasking; 391 return interceptor_state_ == InterceptorState::kProcessNonMasking;
394 } 392 }
395 } } // namespace v8::internal 393 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/lookup-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698