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 "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 Loading... |
5785 info->lookup()->IsCacheable() && | 5785 info->lookup()->IsCacheable() && |
5786 info->lookup()->IsReadOnly() && info->lookup()->IsDontDelete()) { | 5786 info->lookup()->IsReadOnly() && info->lookup()->IsDontDelete()) { |
5787 Handle<Object> object( | 5787 Handle<Object> object( |
5788 HConstant::cast(checked_object->ActualValue())->handle(isolate())); | 5788 HConstant::cast(checked_object->ActualValue())->handle(isolate())); |
5789 | 5789 |
5790 if (object->IsJSObject()) { | 5790 if (object->IsJSObject()) { |
5791 LookupResult lookup(isolate()); | 5791 LookupResult lookup(isolate()); |
5792 Handle<JSObject>::cast(object)->Lookup(info->name(), &lookup); | 5792 Handle<JSObject>::cast(object)->Lookup(info->name(), &lookup); |
5793 Handle<Object> value(lookup.GetLazyValue(), isolate()); | 5793 Handle<Object> value(lookup.GetLazyValue(), isolate()); |
5794 | 5794 |
5795 if (!value->IsTheHole()) { | 5795 ASSERT(!value->IsTheHole()); |
5796 return New<HConstant>(value); | 5796 return New<HConstant>(value); |
5797 } | |
5798 } | 5797 } |
5799 } | 5798 } |
5800 | 5799 |
5801 HObjectAccess access = info->access(); | 5800 HObjectAccess access = info->access(); |
5802 if (access.representation().IsDouble()) { | 5801 if (access.representation().IsDouble()) { |
5803 // Load the heap number. | 5802 // Load the heap number. |
5804 checked_object = Add<HLoadNamedField>( | 5803 checked_object = Add<HLoadNamedField>( |
5805 checked_object, static_cast<HValue*>(NULL), | 5804 checked_object, static_cast<HValue*>(NULL), |
5806 access.WithRepresentation(Representation::Tagged())); | 5805 access.WithRepresentation(Representation::Tagged())); |
5807 // Load the double value from it. | 5806 // Load the double value from it. |
(...skipping 6616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12424 if (ShouldProduceTraceOutput()) { | 12423 if (ShouldProduceTraceOutput()) { |
12425 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12424 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12426 } | 12425 } |
12427 | 12426 |
12428 #ifdef DEBUG | 12427 #ifdef DEBUG |
12429 graph_->Verify(false); // No full verify. | 12428 graph_->Verify(false); // No full verify. |
12430 #endif | 12429 #endif |
12431 } | 12430 } |
12432 | 12431 |
12433 } } // namespace v8::internal | 12432 } } // namespace v8::internal |
OLD | NEW |