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

Side by Side Diff: src/hydrogen.cc

Issue 534093003: Fix loading non-configurable non-writable value from a constant with mismatching type feedback (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen-instructions.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 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 "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 5774 matching lines...) Expand 10 before | Expand all | Expand 10 after
5785 Handle<Map> map) { 5785 Handle<Map> map) {
5786 BuildCheckHeapObject(object); 5786 BuildCheckHeapObject(object);
5787 return Add<HCheckMaps>(object, map); 5787 return Add<HCheckMaps>(object, map);
5788 } 5788 }
5789 5789
5790 5790
5791 HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField( 5791 HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField(
5792 PropertyAccessInfo* info, 5792 PropertyAccessInfo* info,
5793 HValue* checked_object) { 5793 HValue* checked_object) {
5794 // See if this is a load for an immutable property 5794 // See if this is a load for an immutable property
5795 if (checked_object->ActualValue()->IsConstant() && info->IsReadOnly() && 5795 if (checked_object->ActualValue()->IsConstant()) {
5796 !info->IsConfigurable()) {
5797 Handle<Object> object( 5796 Handle<Object> object(
5798 HConstant::cast(checked_object->ActualValue())->handle(isolate())); 5797 HConstant::cast(checked_object->ActualValue())->handle(isolate()));
5799 5798
5800 if (object->IsJSObject()) { 5799 if (object->IsJSObject()) {
5801 LookupIterator it(object, info->name(), LookupIterator::OWN_PROPERTY); 5800 LookupIterator it(object, info->name(), LookupIterator::OWN_PROPERTY);
5802 Handle<Object> value = JSObject::GetDataProperty(&it); 5801 Handle<Object> value = JSObject::GetDataProperty(&it);
5803 CHECK(it.IsFound()); 5802 if (it.IsFound() && it.IsReadOnly() && !it.IsConfigurable()) {
5804 return New<HConstant>(value); 5803 return New<HConstant>(value);
5804 }
5805 } 5805 }
5806 } 5806 }
5807 5807
5808 HObjectAccess access = info->access(); 5808 HObjectAccess access = info->access();
5809 if (access.representation().IsDouble()) { 5809 if (access.representation().IsDouble()) {
5810 // Load the heap number. 5810 // Load the heap number.
5811 checked_object = Add<HLoadNamedField>( 5811 checked_object = Add<HLoadNamedField>(
5812 checked_object, static_cast<HValue*>(NULL), 5812 checked_object, static_cast<HValue*>(NULL),
5813 access.WithRepresentation(Representation::Tagged())); 5813 access.WithRepresentation(Representation::Tagged()));
5814 // Load the double value from it. 5814 // Load the double value from it.
(...skipping 6674 matching lines...) Expand 10 before | Expand all | Expand 10 after
12489 if (ShouldProduceTraceOutput()) { 12489 if (ShouldProduceTraceOutput()) {
12490 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12490 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12491 } 12491 }
12492 12492
12493 #ifdef DEBUG 12493 #ifdef DEBUG
12494 graph_->Verify(false); // No full verify. 12494 graph_->Verify(false); // No full verify.
12495 #endif 12495 #endif
12496 } 12496 }
12497 12497
12498 } } // namespace v8::internal 12498 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698