| 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 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 Register dst = | 2006 Register dst = |
| 2007 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 2007 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
| 2008 switch (src.type()) { | 2008 switch (src.type()) { |
| 2009 case Constant::kInt32: | 2009 case Constant::kInt32: |
| 2010 __ li(dst, Operand(src.ToInt32())); | 2010 __ li(dst, Operand(src.ToInt32())); |
| 2011 break; | 2011 break; |
| 2012 case Constant::kFloat32: | 2012 case Constant::kFloat32: |
| 2013 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 2013 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
| 2014 break; | 2014 break; |
| 2015 case Constant::kInt64: | 2015 case Constant::kInt64: |
| 2016 __ li(dst, Operand(src.ToInt64())); | 2016 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { |
| 2017 __ li(dst, Operand(src.ToInt64(), src.rmode())); |
| 2018 } else { |
| 2019 __ li(dst, Operand(src.ToInt64())); |
| 2020 } |
| 2017 break; | 2021 break; |
| 2018 case Constant::kFloat64: | 2022 case Constant::kFloat64: |
| 2019 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2023 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
| 2020 break; | 2024 break; |
| 2021 case Constant::kExternalReference: | 2025 case Constant::kExternalReference: |
| 2022 __ li(dst, Operand(src.ToExternalReference())); | 2026 __ li(dst, Operand(src.ToExternalReference())); |
| 2023 break; | 2027 break; |
| 2024 case Constant::kHeapObject: { | 2028 case Constant::kHeapObject: { |
| 2025 Handle<HeapObject> src_object = src.ToHeapObject(); | 2029 Handle<HeapObject> src_object = src.ToHeapObject(); |
| 2026 Heap::RootListIndex index; | 2030 Heap::RootListIndex index; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2183 padding_size -= v8::internal::Assembler::kInstrSize; | 2187 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2184 } | 2188 } |
| 2185 } | 2189 } |
| 2186 } | 2190 } |
| 2187 | 2191 |
| 2188 #undef __ | 2192 #undef __ |
| 2189 | 2193 |
| 2190 } // namespace compiler | 2194 } // namespace compiler |
| 2191 } // namespace internal | 2195 } // namespace internal |
| 2192 } // namespace v8 | 2196 } // namespace v8 |
| OLD | NEW |