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/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 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2267 case Constant::kFloat64: | 2267 case Constant::kFloat64: |
2268 __ Move(dst, | 2268 __ Move(dst, |
2269 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2269 isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
2270 break; | 2270 break; |
2271 case Constant::kExternalReference: | 2271 case Constant::kExternalReference: |
2272 __ mov(dst, Operand(src.ToExternalReference())); | 2272 __ mov(dst, Operand(src.ToExternalReference())); |
2273 break; | 2273 break; |
2274 case Constant::kHeapObject: { | 2274 case Constant::kHeapObject: { |
2275 Handle<HeapObject> src_object = src.ToHeapObject(); | 2275 Handle<HeapObject> src_object = src.ToHeapObject(); |
2276 Heap::RootListIndex index; | 2276 Heap::RootListIndex index; |
2277 int slot; | 2277 if (IsMaterializableFromRoot(src_object, &index)) { |
2278 if (IsMaterializableFromFrame(src_object, &slot)) { | |
2279 __ LoadP(dst, g.SlotToMemOperand(slot)); | |
2280 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
2281 __ LoadRoot(dst, index); | 2278 __ LoadRoot(dst, index); |
2282 } else { | 2279 } else { |
2283 __ Move(dst, src_object); | 2280 __ Move(dst, src_object); |
2284 } | 2281 } |
2285 break; | 2282 break; |
2286 } | 2283 } |
2287 case Constant::kRpoNumber: | 2284 case Constant::kRpoNumber: |
2288 UNREACHABLE(); // TODO(dcarney): loading RPO constants on PPC. | 2285 UNREACHABLE(); // TODO(dcarney): loading RPO constants on PPC. |
2289 break; | 2286 break; |
2290 } | 2287 } |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2439 padding_size -= v8::internal::Assembler::kInstrSize; | 2436 padding_size -= v8::internal::Assembler::kInstrSize; |
2440 } | 2437 } |
2441 } | 2438 } |
2442 } | 2439 } |
2443 | 2440 |
2444 #undef __ | 2441 #undef __ |
2445 | 2442 |
2446 } // namespace compiler | 2443 } // namespace compiler |
2447 } // namespace internal | 2444 } // namespace internal |
2448 } // namespace v8 | 2445 } // namespace v8 |
OLD | NEW |