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

Side by Side Diff: src/objects.cc

Issue 1145693002: Remove undefined-check from GetElementWithReceiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 isolate->ReportFailedAccessCheck(object); 653 isolate->ReportFailedAccessCheck(object);
654 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<PropertyAttributes>()); 654 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<PropertyAttributes>());
655 return Just(ABSENT); 655 return Just(ABSENT);
656 } 656 }
657 657
658 658
659 MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate, 659 MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate,
660 Handle<Object> object, 660 Handle<Object> object,
661 Handle<Object> receiver, 661 Handle<Object> receiver,
662 uint32_t index) { 662 uint32_t index) {
663 if (object->IsUndefined()) { 663 DCHECK(!object->IsUndefined());
664 // TODO(verwaest): Why is this check here?
665 UNREACHABLE();
666 return isolate->factory()->undefined_value();
667 }
668 664
669 // Iterate up the prototype chain until an element is found or the null 665 // Iterate up the prototype chain until an element is found or the null
670 // prototype is encountered. 666 // prototype is encountered.
671 for (PrototypeIterator iter(isolate, object, 667 for (PrototypeIterator iter(isolate, object,
672 object->IsJSProxy() || object->IsJSObject() 668 object->IsJSProxy() || object->IsJSObject()
673 ? PrototypeIterator::START_AT_RECEIVER 669 ? PrototypeIterator::START_AT_RECEIVER
674 : PrototypeIterator::START_AT_PROTOTYPE); 670 : PrototypeIterator::START_AT_PROTOTYPE);
675 !iter.IsAtEnd(); iter.Advance()) { 671 !iter.IsAtEnd(); iter.Advance()) {
676 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) { 672 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
677 return JSProxy::GetElementWithHandler( 673 return JSProxy::GetElementWithHandler(
(...skipping 16569 matching lines...) Expand 10 before | Expand all | Expand 10 after
17247 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17243 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17248 Handle<Object> new_value) { 17244 Handle<Object> new_value) {
17249 if (cell->value() != *new_value) { 17245 if (cell->value() != *new_value) {
17250 cell->set_value(*new_value); 17246 cell->set_value(*new_value);
17251 Isolate* isolate = cell->GetIsolate(); 17247 Isolate* isolate = cell->GetIsolate();
17252 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17248 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17253 isolate, DependentCode::kPropertyCellChangedGroup); 17249 isolate, DependentCode::kPropertyCellChangedGroup);
17254 } 17250 }
17255 } 17251 }
17256 } } // namespace v8::internal 17252 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698