| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compilation-info.h" | 7 #include "src/compilation-info.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 case Constant::kFloat64: | 2372 case Constant::kFloat64: |
| 2373 __ Move(dst, | 2373 __ Move(dst, |
| 2374 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2374 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
| 2375 break; | 2375 break; |
| 2376 case Constant::kExternalReference: | 2376 case Constant::kExternalReference: |
| 2377 __ mov(dst, Operand(src.ToExternalReference())); | 2377 __ mov(dst, Operand(src.ToExternalReference())); |
| 2378 break; | 2378 break; |
| 2379 case Constant::kHeapObject: { | 2379 case Constant::kHeapObject: { |
| 2380 Handle<HeapObject> src_object = src.ToHeapObject(); | 2380 Handle<HeapObject> src_object = src.ToHeapObject(); |
| 2381 Heap::RootListIndex index; | 2381 Heap::RootListIndex index; |
| 2382 int slot; | 2382 if (IsMaterializableFromRoot(src_object, &index)) { |
| 2383 if (IsMaterializableFromFrame(src_object, &slot)) { | |
| 2384 __ LoadP(dst, g.SlotToMemOperand(slot)); | |
| 2385 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
| 2386 __ LoadRoot(dst, index); | 2383 __ LoadRoot(dst, index); |
| 2387 } else { | 2384 } else { |
| 2388 __ Move(dst, src_object); | 2385 __ Move(dst, src_object); |
| 2389 } | 2386 } |
| 2390 break; | 2387 break; |
| 2391 } | 2388 } |
| 2392 case Constant::kRpoNumber: | 2389 case Constant::kRpoNumber: |
| 2393 UNREACHABLE(); // TODO(dcarney): loading RPO constants on S390. | 2390 UNREACHABLE(); // TODO(dcarney): loading RPO constants on S390. |
| 2394 break; | 2391 break; |
| 2395 } | 2392 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 padding_size -= 2; | 2541 padding_size -= 2; |
| 2545 } | 2542 } |
| 2546 } | 2543 } |
| 2547 } | 2544 } |
| 2548 | 2545 |
| 2549 #undef __ | 2546 #undef __ |
| 2550 | 2547 |
| 2551 } // namespace compiler | 2548 } // namespace compiler |
| 2552 } // namespace internal | 2549 } // namespace internal |
| 2553 } // namespace v8 | 2550 } // namespace v8 |
| OLD | NEW |