OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 __ lw(temp, src); | 1796 __ lw(temp, src); |
1797 __ sw(temp, g.ToMemOperand(destination)); | 1797 __ sw(temp, g.ToMemOperand(destination)); |
1798 } | 1798 } |
1799 } else if (source->IsConstant()) { | 1799 } else if (source->IsConstant()) { |
1800 Constant src = g.ToConstant(source); | 1800 Constant src = g.ToConstant(source); |
1801 if (destination->IsRegister() || destination->IsStackSlot()) { | 1801 if (destination->IsRegister() || destination->IsStackSlot()) { |
1802 Register dst = | 1802 Register dst = |
1803 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1803 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1804 switch (src.type()) { | 1804 switch (src.type()) { |
1805 case Constant::kInt32: | 1805 case Constant::kInt32: |
1806 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 1806 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 1807 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
1807 __ li(dst, Operand(src.ToInt32(), src.rmode())); | 1808 __ li(dst, Operand(src.ToInt32(), src.rmode())); |
1808 } else { | 1809 } else { |
1809 __ li(dst, Operand(src.ToInt32())); | 1810 __ li(dst, Operand(src.ToInt32())); |
1810 } | 1811 } |
1811 break; | 1812 break; |
1812 case Constant::kFloat32: | 1813 case Constant::kFloat32: |
1813 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 1814 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
1814 break; | 1815 break; |
1815 case Constant::kInt64: | 1816 case Constant::kInt64: |
1816 UNREACHABLE(); | 1817 UNREACHABLE(); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1976 padding_size -= v8::internal::Assembler::kInstrSize; | 1977 padding_size -= v8::internal::Assembler::kInstrSize; |
1977 } | 1978 } |
1978 } | 1979 } |
1979 } | 1980 } |
1980 | 1981 |
1981 #undef __ | 1982 #undef __ |
1982 | 1983 |
1983 } // namespace compiler | 1984 } // namespace compiler |
1984 } // namespace internal | 1985 } // namespace internal |
1985 } // namespace v8 | 1986 } // namespace v8 |
OLD | NEW |