| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/ast.h" | 10 #include "src/ast.h" |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 | 1996 |
| 1997 | 1997 |
| 1998 template<> | 1998 template<> |
| 1999 inline HInstruction* HGraphBuilder::AddUncasted<HReturn>(HConstant* value) { | 1999 inline HInstruction* HGraphBuilder::AddUncasted<HReturn>(HConstant* value) { |
| 2000 return Add<HReturn>(value); | 2000 return Add<HReturn>(value); |
| 2001 } | 2001 } |
| 2002 | 2002 |
| 2003 | 2003 |
| 2004 template<> | 2004 template<> |
| 2005 inline HCallRuntime* HGraphBuilder::Add<HCallRuntime>( | 2005 inline HCallRuntime* HGraphBuilder::Add<HCallRuntime>( |
| 2006 Handle<String> name, | |
| 2007 const Runtime::Function* c_function, | 2006 const Runtime::Function* c_function, |
| 2008 int argument_count) { | 2007 int argument_count) { |
| 2009 HCallRuntime* instr = New<HCallRuntime>(name, c_function, argument_count); | 2008 HCallRuntime* instr = New<HCallRuntime>(c_function, argument_count); |
| 2010 if (graph()->info()->IsStub()) { | 2009 if (graph()->info()->IsStub()) { |
| 2011 // When compiling code stubs, we don't want to save all double registers | 2010 // When compiling code stubs, we don't want to save all double registers |
| 2012 // upon entry to the stub, but instead have the call runtime instruction | 2011 // upon entry to the stub, but instead have the call runtime instruction |
| 2013 // save the double registers only on-demand (in the fallback case). | 2012 // save the double registers only on-demand (in the fallback case). |
| 2014 instr->set_save_doubles(kSaveFPRegs); | 2013 instr->set_save_doubles(kSaveFPRegs); |
| 2015 } | 2014 } |
| 2016 AddInstruction(instr); | 2015 AddInstruction(instr); |
| 2017 return instr; | 2016 return instr; |
| 2018 } | 2017 } |
| 2019 | 2018 |
| 2020 | 2019 |
| 2021 template<> | 2020 template<> |
| 2022 inline HInstruction* HGraphBuilder::AddUncasted<HCallRuntime>( | 2021 inline HInstruction* HGraphBuilder::AddUncasted<HCallRuntime>( |
| 2023 Handle<String> name, | 2022 Handle<String> name, |
| 2024 const Runtime::Function* c_function, | 2023 const Runtime::Function* c_function, |
| 2025 int argument_count) { | 2024 int argument_count) { |
| 2026 return Add<HCallRuntime>(name, c_function, argument_count); | 2025 return Add<HCallRuntime>(c_function, argument_count); |
| 2027 } | 2026 } |
| 2028 | 2027 |
| 2029 | 2028 |
| 2030 template<> | 2029 template<> |
| 2031 inline HContext* HGraphBuilder::New<HContext>() { | 2030 inline HContext* HGraphBuilder::New<HContext>() { |
| 2032 return HContext::New(zone()); | 2031 return HContext::New(zone()); |
| 2033 } | 2032 } |
| 2034 | 2033 |
| 2035 | 2034 |
| 2036 template<> | 2035 template<> |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 } | 3043 } |
| 3045 | 3044 |
| 3046 private: | 3045 private: |
| 3047 HGraphBuilder* builder_; | 3046 HGraphBuilder* builder_; |
| 3048 }; | 3047 }; |
| 3049 | 3048 |
| 3050 | 3049 |
| 3051 } } // namespace v8::internal | 3050 } } // namespace v8::internal |
| 3052 | 3051 |
| 3053 #endif // V8_HYDROGEN_H_ | 3052 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |