| 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/ast/scopes.h" | 7 #include "src/ast/scopes.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 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 case Constant::kFloat64: | 2375 case Constant::kFloat64: |
| 2376 __ Move(dst, | 2376 __ Move(dst, |
| 2377 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2377 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
| 2378 break; | 2378 break; |
| 2379 case Constant::kExternalReference: | 2379 case Constant::kExternalReference: |
| 2380 __ mov(dst, Operand(src.ToExternalReference())); | 2380 __ mov(dst, Operand(src.ToExternalReference())); |
| 2381 break; | 2381 break; |
| 2382 case Constant::kHeapObject: { | 2382 case Constant::kHeapObject: { |
| 2383 Handle<HeapObject> src_object = src.ToHeapObject(); | 2383 Handle<HeapObject> src_object = src.ToHeapObject(); |
| 2384 Heap::RootListIndex index; | 2384 Heap::RootListIndex index; |
| 2385 int slot; | 2385 if (IsMaterializableFromRoot(src_object, &index)) { |
| 2386 if (IsMaterializableFromFrame(src_object, &slot)) { | |
| 2387 __ LoadP(dst, g.SlotToMemOperand(slot)); | |
| 2388 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
| 2389 __ LoadRoot(dst, index); | 2386 __ LoadRoot(dst, index); |
| 2390 } else { | 2387 } else { |
| 2391 __ Move(dst, src_object); | 2388 __ Move(dst, src_object); |
| 2392 } | 2389 } |
| 2393 break; | 2390 break; |
| 2394 } | 2391 } |
| 2395 case Constant::kRpoNumber: | 2392 case Constant::kRpoNumber: |
| 2396 UNREACHABLE(); // TODO(dcarney): loading RPO constants on S390. | 2393 UNREACHABLE(); // TODO(dcarney): loading RPO constants on S390. |
| 2397 break; | 2394 break; |
| 2398 } | 2395 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2547 padding_size -= 2; | 2544 padding_size -= 2; |
| 2548 } | 2545 } |
| 2549 } | 2546 } |
| 2550 } | 2547 } |
| 2551 | 2548 |
| 2552 #undef __ | 2549 #undef __ |
| 2553 | 2550 |
| 2554 } // namespace compiler | 2551 } // namespace compiler |
| 2555 } // namespace internal | 2552 } // namespace internal |
| 2556 } // namespace v8 | 2553 } // namespace v8 |
| OLD | NEW |