| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
| 10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 case Constant::kFloat64: | 1871 case Constant::kFloat64: |
| 1872 __ Move(dst, | 1872 __ Move(dst, |
| 1873 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 1873 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
| 1874 break; | 1874 break; |
| 1875 case Constant::kExternalReference: | 1875 case Constant::kExternalReference: |
| 1876 __ mov(dst, Operand(src.ToExternalReference())); | 1876 __ mov(dst, Operand(src.ToExternalReference())); |
| 1877 break; | 1877 break; |
| 1878 case Constant::kHeapObject: { | 1878 case Constant::kHeapObject: { |
| 1879 Handle<HeapObject> src_object = src.ToHeapObject(); | 1879 Handle<HeapObject> src_object = src.ToHeapObject(); |
| 1880 Heap::RootListIndex index; | 1880 Heap::RootListIndex index; |
| 1881 int slot; | 1881 if (IsMaterializableFromRoot(src_object, &index)) { |
| 1882 if (IsMaterializableFromFrame(src_object, &slot)) { | |
| 1883 __ ldr(dst, g.SlotToMemOperand(slot)); | |
| 1884 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
| 1885 __ LoadRoot(dst, index); | 1882 __ LoadRoot(dst, index); |
| 1886 } else { | 1883 } else { |
| 1887 __ Move(dst, src_object); | 1884 __ Move(dst, src_object); |
| 1888 } | 1885 } |
| 1889 break; | 1886 break; |
| 1890 } | 1887 } |
| 1891 case Constant::kRpoNumber: | 1888 case Constant::kRpoNumber: |
| 1892 UNREACHABLE(); // TODO(dcarney): loading RPO constants on arm. | 1889 UNREACHABLE(); // TODO(dcarney): loading RPO constants on arm. |
| 1893 break; | 1890 break; |
| 1894 } | 1891 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 padding_size -= v8::internal::Assembler::kInstrSize; | 2026 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2030 } | 2027 } |
| 2031 } | 2028 } |
| 2032 } | 2029 } |
| 2033 | 2030 |
| 2034 #undef __ | 2031 #undef __ |
| 2035 | 2032 |
| 2036 } // namespace compiler | 2033 } // namespace compiler |
| 2037 } // namespace internal | 2034 } // namespace internal |
| 2038 } // namespace v8 | 2035 } // namespace v8 |
| OLD | NEW |