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 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2115 if (src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | 2115 if (src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
2116 __ li(dst, Operand(src.ToInt32(), src.rmode())); | 2116 __ li(dst, Operand(src.ToInt32(), src.rmode())); |
2117 } else { | 2117 } else { |
2118 __ li(dst, Operand(src.ToInt32())); | 2118 __ li(dst, Operand(src.ToInt32())); |
2119 } | 2119 } |
2120 break; | 2120 break; |
2121 case Constant::kFloat32: | 2121 case Constant::kFloat32: |
2122 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 2122 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
2123 break; | 2123 break; |
2124 case Constant::kInt64: | 2124 case Constant::kInt64: |
2125 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 2125 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 2126 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) { |
2126 __ li(dst, Operand(src.ToInt64(), src.rmode())); | 2127 __ li(dst, Operand(src.ToInt64(), src.rmode())); |
2127 } else { | 2128 } else { |
2128 DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); | 2129 DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); |
2129 __ li(dst, Operand(src.ToInt64())); | 2130 __ li(dst, Operand(src.ToInt64())); |
2130 } | 2131 } |
2131 break; | 2132 break; |
2132 case Constant::kFloat64: | 2133 case Constant::kFloat64: |
2133 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2134 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
2134 break; | 2135 break; |
2135 case Constant::kExternalReference: | 2136 case Constant::kExternalReference: |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 padding_size -= v8::internal::Assembler::kInstrSize; | 2291 padding_size -= v8::internal::Assembler::kInstrSize; |
2291 } | 2292 } |
2292 } | 2293 } |
2293 } | 2294 } |
2294 | 2295 |
2295 #undef __ | 2296 #undef __ |
2296 | 2297 |
2297 } // namespace compiler | 2298 } // namespace compiler |
2298 } // namespace internal | 2299 } // namespace internal |
2299 } // namespace v8 | 2300 } // namespace v8 |
OLD | NEW |