| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/field-index.h" | 8 #include "src/field-index.h" |
| 9 #include "src/hydrogen.h" | 9 #include "src/hydrogen.h" |
| 10 #include "src/lithium.h" | 10 #include "src/lithium.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 556 |
| 557 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( | 557 HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( |
| 558 HValue* object, FieldIndex index) { | 558 HValue* object, FieldIndex index) { |
| 559 Representation representation = index.is_double() | 559 Representation representation = index.is_double() |
| 560 ? Representation::Double() | 560 ? Representation::Double() |
| 561 : Representation::Tagged(); | 561 : Representation::Tagged(); |
| 562 int offset = index.offset(); | 562 int offset = index.offset(); |
| 563 HObjectAccess access = index.is_inobject() | 563 HObjectAccess access = index.is_inobject() |
| 564 ? HObjectAccess::ForObservableJSObjectOffset(offset, representation) | 564 ? HObjectAccess::ForObservableJSObjectOffset(offset, representation) |
| 565 : HObjectAccess::ForBackingStoreOffset(offset, representation); | 565 : HObjectAccess::ForBackingStoreOffset(offset, representation); |
| 566 if (index.is_double()) { | 566 if (index.is_double() && |
| 567 (!FLAG_unbox_double_fields || !index.is_inobject())) { |
| 567 // Load the heap number. | 568 // Load the heap number. |
| 568 object = Add<HLoadNamedField>( | 569 object = Add<HLoadNamedField>( |
| 569 object, static_cast<HValue*>(NULL), | 570 object, static_cast<HValue*>(NULL), |
| 570 access.WithRepresentation(Representation::Tagged())); | 571 access.WithRepresentation(Representation::Tagged())); |
| 571 // Load the double value from it. | 572 // Load the double value from it. |
| 572 access = HObjectAccess::ForHeapNumberValue(); | 573 access = HObjectAccess::ForHeapNumberValue(); |
| 573 } | 574 } |
| 574 return Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), access); | 575 return Add<HLoadNamedField>(object, static_cast<HValue*>(NULL), access); |
| 575 } | 576 } |
| 576 | 577 |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 return Pop(); | 1726 return Pop(); |
| 1726 } | 1727 } |
| 1727 | 1728 |
| 1728 | 1729 |
| 1729 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { | 1730 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { |
| 1730 return DoGenerateCode(this); | 1731 return DoGenerateCode(this); |
| 1731 } | 1732 } |
| 1732 | 1733 |
| 1733 | 1734 |
| 1734 } } // namespace v8::internal | 1735 } } // namespace v8::internal |
| OLD | NEW |