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 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 HValue* second() { return OperandAt(1); } | 1637 HValue* second() { return OperandAt(1); } |
1638 }; | 1638 }; |
1639 | 1639 |
1640 | 1640 |
1641 class HInvokeFunction: public HBinaryCall { | 1641 class HInvokeFunction: public HBinaryCall { |
1642 public: | 1642 public: |
1643 HInvokeFunction(HValue* context, HValue* function, int argument_count) | 1643 HInvokeFunction(HValue* context, HValue* function, int argument_count) |
1644 : HBinaryCall(context, function, argument_count) { | 1644 : HBinaryCall(context, function, argument_count) { |
1645 } | 1645 } |
1646 | 1646 |
| 1647 HInvokeFunction(HValue* context, |
| 1648 HValue* function, |
| 1649 Handle<JSFunction> known_function, |
| 1650 int argument_count) |
| 1651 : HBinaryCall(context, function, argument_count), |
| 1652 known_function_(known_function) { |
| 1653 } |
| 1654 |
1647 virtual Representation RequiredInputRepresentation(int index) { | 1655 virtual Representation RequiredInputRepresentation(int index) { |
1648 return Representation::Tagged(); | 1656 return Representation::Tagged(); |
1649 } | 1657 } |
1650 | 1658 |
1651 HValue* context() { return first(); } | 1659 HValue* context() { return first(); } |
1652 HValue* function() { return second(); } | 1660 HValue* function() { return second(); } |
| 1661 Handle<JSFunction> known_function() { return known_function_; } |
1653 | 1662 |
1654 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction) | 1663 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction) |
| 1664 |
| 1665 private: |
| 1666 Handle<JSFunction> known_function_; |
1655 }; | 1667 }; |
1656 | 1668 |
1657 | 1669 |
1658 class HCallConstantFunction: public HCall<0> { | 1670 class HCallConstantFunction: public HCall<0> { |
1659 public: | 1671 public: |
1660 HCallConstantFunction(Handle<JSFunction> function, int argument_count) | 1672 HCallConstantFunction(Handle<JSFunction> function, int argument_count) |
1661 : HCall<0>(argument_count), function_(function) { } | 1673 : HCall<0>(argument_count), function_(function) { } |
1662 | 1674 |
1663 Handle<JSFunction> function() const { return function_; } | 1675 Handle<JSFunction> function() const { return function_; } |
1664 | 1676 |
(...skipping 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4921 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 4933 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
4922 }; | 4934 }; |
4923 | 4935 |
4924 | 4936 |
4925 #undef DECLARE_INSTRUCTION | 4937 #undef DECLARE_INSTRUCTION |
4926 #undef DECLARE_CONCRETE_INSTRUCTION | 4938 #undef DECLARE_CONCRETE_INSTRUCTION |
4927 | 4939 |
4928 } } // namespace v8::internal | 4940 } } // namespace v8::internal |
4929 | 4941 |
4930 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4942 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |