| 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 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 Operand OutputOperand() { return ToOperand(instr_->Output()); } | 39 Operand OutputOperand() { return ToOperand(instr_->Output()); } |
| 40 | 40 |
| 41 Immediate ToImmediate(InstructionOperand* operand) { | 41 Immediate ToImmediate(InstructionOperand* operand) { |
| 42 Constant constant = ToConstant(operand); | 42 Constant constant = ToConstant(operand); |
| 43 if (constant.type() == Constant::kFloat64) { | 43 if (constant.type() == Constant::kFloat64) { |
| 44 DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64())); | 44 DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64())); |
| 45 return Immediate(0); | 45 return Immediate(0); |
| 46 } | 46 } |
| 47 if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 48 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
| 49 return Immediate(constant.ToInt32(), constant.rmode()); |
| 50 } |
| 47 return Immediate(constant.ToInt32()); | 51 return Immediate(constant.ToInt32()); |
| 48 } | 52 } |
| 49 | 53 |
| 50 Operand ToOperand(InstructionOperand* op, int extra = 0) { | 54 Operand ToOperand(InstructionOperand* op, int extra = 0) { |
| 51 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); | 55 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); |
| 52 return SlotToOperand(AllocatedOperand::cast(op)->index(), extra); | 56 return SlotToOperand(AllocatedOperand::cast(op)->index(), extra); |
| 53 } | 57 } |
| 54 | 58 |
| 55 Operand SlotToOperand(int slot_index, int extra = 0) { | 59 Operand SlotToOperand(int slot_index, int extra = 0) { |
| 56 FrameOffset offset = frame_access_state()->GetFrameOffset(slot_index); | 60 FrameOffset offset = frame_access_state()->GetFrameOffset(slot_index); |
| (...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2293 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2290 __ Nop(padding_size); | 2294 __ Nop(padding_size); |
| 2291 } | 2295 } |
| 2292 } | 2296 } |
| 2293 | 2297 |
| 2294 #undef __ | 2298 #undef __ |
| 2295 | 2299 |
| 2296 } // namespace compiler | 2300 } // namespace compiler |
| 2297 } // namespace internal | 2301 } // namespace internal |
| 2298 } // namespace v8 | 2302 } // namespace v8 |
| OLD | NEW |