| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return Operand(offset.from_stack_pointer() ? esp : ebp, offset.offset()); | 61 return Operand(offset.from_stack_pointer() ? esp : ebp, offset.offset()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 Operand HighOperand(InstructionOperand* op) { | 64 Operand HighOperand(InstructionOperand* op) { |
| 65 DCHECK(op->IsDoubleStackSlot()); | 65 DCHECK(op->IsDoubleStackSlot()); |
| 66 return ToOperand(op, kPointerSize); | 66 return ToOperand(op, kPointerSize); |
| 67 } | 67 } |
| 68 | 68 |
| 69 Immediate ToImmediate(InstructionOperand* operand) { | 69 Immediate ToImmediate(InstructionOperand* operand) { |
| 70 Constant constant = ToConstant(operand); | 70 Constant constant = ToConstant(operand); |
| 71 if (constant.type() == Constant::kInt32 && |
| 72 constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { |
| 73 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), |
| 74 constant.rmode()); |
| 75 } |
| 71 switch (constant.type()) { | 76 switch (constant.type()) { |
| 72 case Constant::kInt32: | 77 case Constant::kInt32: |
| 73 return Immediate(constant.ToInt32()); | 78 return Immediate(constant.ToInt32()); |
| 74 case Constant::kFloat32: | 79 case Constant::kFloat32: |
| 75 return Immediate( | 80 return Immediate( |
| 76 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 81 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
| 77 case Constant::kFloat64: | 82 case Constant::kFloat64: |
| 78 return Immediate( | 83 return Immediate( |
| 79 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); | 84 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); |
| 80 case Constant::kExternalReference: | 85 case Constant::kExternalReference: |
| (...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1756 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1761 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 1757 __ Nop(padding_size); | 1762 __ Nop(padding_size); |
| 1758 } | 1763 } |
| 1759 } | 1764 } |
| 1760 | 1765 |
| 1761 #undef __ | 1766 #undef __ |
| 1762 | 1767 |
| 1763 } // namespace compiler | 1768 } // namespace compiler |
| 1764 } // namespace internal | 1769 } // namespace internal |
| 1765 } // namespace v8 | 1770 } // namespace v8 |
| OLD | NEW |