OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 } | 1626 } |
1627 | 1627 |
1628 | 1628 |
1629 template<> | 1629 template<> |
1630 inline HInstruction* HGraphBuilder::AddUncasted<HReturn>(HConstant* value) { | 1630 inline HInstruction* HGraphBuilder::AddUncasted<HReturn>(HConstant* value) { |
1631 return AddUncasted<HReturn>(static_cast<HValue*>(value)); | 1631 return AddUncasted<HReturn>(static_cast<HValue*>(value)); |
1632 } | 1632 } |
1633 | 1633 |
1634 | 1634 |
1635 template<> | 1635 template<> |
| 1636 inline HInstruction* HGraphBuilder::AddUncasted<HCallRuntime>( |
| 1637 Handle<String> name, |
| 1638 const Runtime::Function* c_function, |
| 1639 int argument_count) { |
| 1640 HCallRuntime* instr = New<HCallRuntime>(name, c_function, argument_count); |
| 1641 if (graph()->info()->IsStub()) { |
| 1642 // When compiling code stubs, we don't want to save all double registers |
| 1643 // upon entry to the stub, but instead have the call runtime instruction |
| 1644 // save the double registers only on-demand (in the fallback case). |
| 1645 instr->set_save_doubles(kSaveFPRegs); |
| 1646 } |
| 1647 AddInstruction(instr); |
| 1648 return instr; |
| 1649 } |
| 1650 |
| 1651 |
| 1652 template<> |
1636 inline HInstruction* HGraphBuilder::NewUncasted<HContext>() { | 1653 inline HInstruction* HGraphBuilder::NewUncasted<HContext>() { |
1637 return HContext::New(zone()); | 1654 return HContext::New(zone()); |
1638 } | 1655 } |
1639 | 1656 |
1640 | 1657 |
1641 class HOptimizedGraphBuilder V8_FINAL | 1658 class HOptimizedGraphBuilder V8_FINAL |
1642 : public HGraphBuilder, public AstVisitor { | 1659 : public HGraphBuilder, public AstVisitor { |
1643 public: | 1660 public: |
1644 // A class encapsulating (lazily-allocated) break and continue blocks for | 1661 // A class encapsulating (lazily-allocated) break and continue blocks for |
1645 // a breakable statement. Separated from BreakAndContinueScope so that it | 1662 // a breakable statement. Separated from BreakAndContinueScope so that it |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 } | 2382 } |
2366 | 2383 |
2367 private: | 2384 private: |
2368 HGraphBuilder* builder_; | 2385 HGraphBuilder* builder_; |
2369 }; | 2386 }; |
2370 | 2387 |
2371 | 2388 |
2372 } } // namespace v8::internal | 2389 } } // namespace v8::internal |
2373 | 2390 |
2374 #endif // V8_HYDROGEN_H_ | 2391 #endif // V8_HYDROGEN_H_ |
OLD | NEW |