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 #include "src/compilation-info.h" | 6 #include "src/compilation-info.h" |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 break; | 2325 break; |
2326 case Constant::kFloat64: | 2326 case Constant::kFloat64: |
2327 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2327 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
2328 break; | 2328 break; |
2329 case Constant::kExternalReference: | 2329 case Constant::kExternalReference: |
2330 __ li(dst, Operand(src.ToExternalReference())); | 2330 __ li(dst, Operand(src.ToExternalReference())); |
2331 break; | 2331 break; |
2332 case Constant::kHeapObject: { | 2332 case Constant::kHeapObject: { |
2333 Handle<HeapObject> src_object = src.ToHeapObject(); | 2333 Handle<HeapObject> src_object = src.ToHeapObject(); |
2334 Heap::RootListIndex index; | 2334 Heap::RootListIndex index; |
2335 int slot; | 2335 if (IsMaterializableFromRoot(src_object, &index)) { |
2336 if (IsMaterializableFromFrame(src_object, &slot)) { | |
2337 __ ld(dst, g.SlotToMemOperand(slot)); | |
2338 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
2339 __ LoadRoot(dst, index); | 2336 __ LoadRoot(dst, index); |
2340 } else { | 2337 } else { |
2341 __ li(dst, src_object); | 2338 __ li(dst, src_object); |
2342 } | 2339 } |
2343 break; | 2340 break; |
2344 } | 2341 } |
2345 case Constant::kRpoNumber: | 2342 case Constant::kRpoNumber: |
2346 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips64. | 2343 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips64. |
2347 break; | 2344 break; |
2348 } | 2345 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 padding_size -= v8::internal::Assembler::kInstrSize; | 2481 padding_size -= v8::internal::Assembler::kInstrSize; |
2485 } | 2482 } |
2486 } | 2483 } |
2487 } | 2484 } |
2488 | 2485 |
2489 #undef __ | 2486 #undef __ |
2490 | 2487 |
2491 } // namespace compiler | 2488 } // namespace compiler |
2492 } // namespace internal | 2489 } // namespace internal |
2493 } // namespace v8 | 2490 } // namespace v8 |
OLD | NEW |