| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 offset.offset() + extra); | 52 offset.offset() + extra); |
| 53 } | 53 } |
| 54 | 54 |
| 55 Operand HighOperand(InstructionOperand* op) { | 55 Operand HighOperand(InstructionOperand* op) { |
| 56 DCHECK(op->IsDoubleStackSlot()); | 56 DCHECK(op->IsDoubleStackSlot()); |
| 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 && |
| 63 constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { |
| 64 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), |
| 65 constant.rmode()); |
| 66 } |
| 62 switch (constant.type()) { | 67 switch (constant.type()) { |
| 63 case Constant::kInt32: | 68 case Constant::kInt32: |
| 64 return Immediate(constant.ToInt32()); | 69 return Immediate(constant.ToInt32()); |
| 65 case Constant::kFloat32: | 70 case Constant::kFloat32: |
| 66 return Immediate( | 71 return Immediate( |
| 67 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 72 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
| 68 case Constant::kFloat64: | 73 case Constant::kFloat64: |
| 69 return Immediate( | 74 return Immediate( |
| 70 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); | 75 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); |
| 71 case Constant::kExternalReference: | 76 case Constant::kExternalReference: |
| (...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2444 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2440 __ Nop(padding_size); | 2445 __ Nop(padding_size); |
| 2441 } | 2446 } |
| 2442 } | 2447 } |
| 2443 | 2448 |
| 2444 #undef __ | 2449 #undef __ |
| 2445 | 2450 |
| 2446 } // namespace compiler | 2451 } // namespace compiler |
| 2447 } // namespace internal | 2452 } // namespace internal |
| 2448 } // namespace v8 | 2453 } // namespace v8 |
| OLD | NEW |