| 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/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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 Operand HighOperand(InstructionOperand* op) { | 55 Operand HighOperand(InstructionOperand* op) { |
| 56 DCHECK(op->IsFPStackSlot()); | 56 DCHECK(op->IsFPStackSlot()); |
| 57 return ToOperand(op, kPointerSize); | 57 return ToOperand(op, kPointerSize); |
| 58 } | 58 } |
| 59 | 59 |
| 60 Immediate ToImmediate(InstructionOperand* operand) { | 60 Immediate ToImmediate(InstructionOperand* operand) { |
| 61 Constant constant = ToConstant(operand); | 61 Constant constant = ToConstant(operand); |
| 62 if (constant.type() == Constant::kInt32 && | 62 if (constant.type() == Constant::kInt32 && |
| 63 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 63 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 64 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || |
| 64 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) { | 65 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) { |
| 65 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), | 66 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), |
| 66 constant.rmode()); | 67 constant.rmode()); |
| 67 } | 68 } |
| 68 switch (constant.type()) { | 69 switch (constant.type()) { |
| 69 case Constant::kInt32: | 70 case Constant::kInt32: |
| 70 return Immediate(constant.ToInt32()); | 71 return Immediate(constant.ToInt32()); |
| 71 case Constant::kFloat32: | 72 case Constant::kFloat32: |
| 72 return Immediate( | 73 return Immediate( |
| 73 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 74 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
| (...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2581 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2581 __ Nop(padding_size); | 2582 __ Nop(padding_size); |
| 2582 } | 2583 } |
| 2583 } | 2584 } |
| 2584 | 2585 |
| 2585 #undef __ | 2586 #undef __ |
| 2586 | 2587 |
| 2587 } // namespace compiler | 2588 } // namespace compiler |
| 2588 } // namespace internal | 2589 } // namespace internal |
| 2589 } // namespace v8 | 2590 } // namespace v8 |
| OLD | NEW |