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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 #include "src/compilation-info.h" | 6 #include "src/compilation-info.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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 break; | 2003 break; |
2004 case Constant::kFloat64: | 2004 case Constant::kFloat64: |
2005 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); | 2005 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); |
2006 break; | 2006 break; |
2007 case Constant::kExternalReference: | 2007 case Constant::kExternalReference: |
2008 __ li(dst, Operand(src.ToExternalReference())); | 2008 __ li(dst, Operand(src.ToExternalReference())); |
2009 break; | 2009 break; |
2010 case Constant::kHeapObject: { | 2010 case Constant::kHeapObject: { |
2011 Handle<HeapObject> src_object = src.ToHeapObject(); | 2011 Handle<HeapObject> src_object = src.ToHeapObject(); |
2012 Heap::RootListIndex index; | 2012 Heap::RootListIndex index; |
2013 int slot; | 2013 if (IsMaterializableFromRoot(src_object, &index)) { |
2014 if (IsMaterializableFromFrame(src_object, &slot)) { | |
2015 __ lw(dst, g.SlotToMemOperand(slot)); | |
2016 } else if (IsMaterializableFromRoot(src_object, &index)) { | |
2017 __ LoadRoot(dst, index); | 2014 __ LoadRoot(dst, index); |
2018 } else { | 2015 } else { |
2019 __ li(dst, src_object); | 2016 __ li(dst, src_object); |
2020 } | 2017 } |
2021 break; | 2018 break; |
2022 } | 2019 } |
2023 case Constant::kRpoNumber: | 2020 case Constant::kRpoNumber: |
2024 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips. | 2021 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips. |
2025 break; | 2022 break; |
2026 } | 2023 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2209 padding_size -= v8::internal::Assembler::kInstrSize; | 2206 padding_size -= v8::internal::Assembler::kInstrSize; |
2210 } | 2207 } |
2211 } | 2208 } |
2212 } | 2209 } |
2213 | 2210 |
2214 #undef __ | 2211 #undef __ |
2215 | 2212 |
2216 } // namespace compiler | 2213 } // namespace compiler |
2217 } // namespace internal | 2214 } // namespace internal |
2218 } // namespace v8 | 2215 } // namespace v8 |
OLD | NEW |