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 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 __ sw(temp, g.ToMemOperand(destination)); | 1846 __ sw(temp, g.ToMemOperand(destination)); |
1847 } | 1847 } |
1848 } else if (source->IsConstant()) { | 1848 } else if (source->IsConstant()) { |
1849 Constant src = g.ToConstant(source); | 1849 Constant src = g.ToConstant(source); |
1850 if (destination->IsRegister() || destination->IsStackSlot()) { | 1850 if (destination->IsRegister() || destination->IsStackSlot()) { |
1851 Register dst = | 1851 Register dst = |
1852 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1852 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1853 switch (src.type()) { | 1853 switch (src.type()) { |
1854 case Constant::kInt32: | 1854 case Constant::kInt32: |
1855 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 1855 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 1856 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || |
1856 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | 1857 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
1857 __ li(dst, Operand(src.ToInt32(), src.rmode())); | 1858 __ li(dst, Operand(src.ToInt32(), src.rmode())); |
1858 } else { | 1859 } else { |
1859 __ li(dst, Operand(src.ToInt32())); | 1860 __ li(dst, Operand(src.ToInt32())); |
1860 } | 1861 } |
1861 break; | 1862 break; |
1862 case Constant::kFloat32: | 1863 case Constant::kFloat32: |
1863 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 1864 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
1864 break; | 1865 break; |
1865 case Constant::kInt64: | 1866 case Constant::kInt64: |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 padding_size -= v8::internal::Assembler::kInstrSize; | 2033 padding_size -= v8::internal::Assembler::kInstrSize; |
2033 } | 2034 } |
2034 } | 2035 } |
2035 } | 2036 } |
2036 | 2037 |
2037 #undef __ | 2038 #undef __ |
2038 | 2039 |
2039 } // namespace compiler | 2040 } // namespace compiler |
2040 } // namespace internal | 2041 } // namespace internal |
2041 } // namespace v8 | 2042 } // namespace v8 |
OLD | NEW |