OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |