| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 Operand HighOperand(InstructionOperand* op) { | 61 Operand HighOperand(InstructionOperand* op) { |
| 62 DCHECK(op->IsFPStackSlot()); | 62 DCHECK(op->IsFPStackSlot()); |
| 63 return ToOperand(op, kPointerSize); | 63 return ToOperand(op, kPointerSize); |
| 64 } | 64 } |
| 65 | 65 |
| 66 Immediate ToImmediate(InstructionOperand* operand) { | 66 Immediate ToImmediate(InstructionOperand* operand) { |
| 67 Constant constant = ToConstant(operand); | 67 Constant constant = ToConstant(operand); |
| 68 if (constant.type() == Constant::kInt32 && | 68 if (constant.type() == Constant::kInt32 && |
| 69 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 69 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 70 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || | 70 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || |
| 71 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) { | 71 RelocInfo::IsWasmMemorySizeReference(constant.rmode()))) { |
| 72 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), | 72 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), |
| 73 constant.rmode()); | 73 constant.rmode()); |
| 74 } | 74 } |
| 75 switch (constant.type()) { | 75 switch (constant.type()) { |
| 76 case Constant::kInt32: | 76 case Constant::kInt32: |
| 77 return Immediate(constant.ToInt32()); | 77 return Immediate(constant.ToInt32()); |
| 78 case Constant::kFloat32: | 78 case Constant::kFloat32: |
| 79 return Immediate( | 79 return Immediate( |
| 80 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 80 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
| 81 case Constant::kFloat64: | 81 case Constant::kFloat64: |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2255 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2256 __ Nop(padding_size); | 2256 __ Nop(padding_size); |
| 2257 } | 2257 } |
| 2258 } | 2258 } |
| 2259 | 2259 |
| 2260 #undef __ | 2260 #undef __ |
| 2261 | 2261 |
| 2262 } // namespace compiler | 2262 } // namespace compiler |
| 2263 } // namespace internal | 2263 } // namespace internal |
| 2264 } // namespace v8 | 2264 } // namespace v8 |
| OLD | NEW |