| 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 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 Expression* expression() const { return expression_; } | 1666 Expression* expression() const { return expression_; } |
| 1667 ZoneList<Expression*>* arguments() const { return arguments_; } | 1667 ZoneList<Expression*>* arguments() const { return arguments_; } |
| 1668 virtual int position() const { return pos_; } | 1668 virtual int position() const { return pos_; } |
| 1669 | 1669 |
| 1670 // Type feedback information. | 1670 // Type feedback information. |
| 1671 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } | 1671 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } |
| 1672 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1672 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1673 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1673 virtual bool IsMonomorphic() { return is_monomorphic_; } |
| 1674 Handle<JSFunction> target() const { return target_; } | 1674 Handle<JSFunction> target() const { return target_; } |
| 1675 ElementsKind elements_kind() const { return elements_kind_; } | 1675 ElementsKind elements_kind() const { return elements_kind_; } |
| 1676 Handle<Smi> allocation_elements_kind() const { return alloc_elements_kind_; } | 1676 Handle<JSGlobalPropertyCell> allocation_info_cell() const { |
| 1677 return allocation_info_cell_; |
| 1678 } |
| 1677 | 1679 |
| 1678 BailoutId ReturnId() const { return return_id_; } | 1680 BailoutId ReturnId() const { return return_id_; } |
| 1679 | 1681 |
| 1680 protected: | 1682 protected: |
| 1681 CallNew(Isolate* isolate, | 1683 CallNew(Isolate* isolate, |
| 1682 Expression* expression, | 1684 Expression* expression, |
| 1683 ZoneList<Expression*>* arguments, | 1685 ZoneList<Expression*>* arguments, |
| 1684 int pos) | 1686 int pos) |
| 1685 : Expression(isolate), | 1687 : Expression(isolate), |
| 1686 expression_(expression), | 1688 expression_(expression), |
| 1687 arguments_(arguments), | 1689 arguments_(arguments), |
| 1688 pos_(pos), | 1690 pos_(pos), |
| 1689 is_monomorphic_(false), | 1691 is_monomorphic_(false), |
| 1690 elements_kind_(GetInitialFastElementsKind()), | 1692 elements_kind_(GetInitialFastElementsKind()), |
| 1691 return_id_(GetNextId(isolate)) { } | 1693 return_id_(GetNextId(isolate)) { } |
| 1692 | 1694 |
| 1693 private: | 1695 private: |
| 1694 Expression* expression_; | 1696 Expression* expression_; |
| 1695 ZoneList<Expression*>* arguments_; | 1697 ZoneList<Expression*>* arguments_; |
| 1696 int pos_; | 1698 int pos_; |
| 1697 | 1699 |
| 1698 bool is_monomorphic_; | 1700 bool is_monomorphic_; |
| 1699 Handle<JSFunction> target_; | 1701 Handle<JSFunction> target_; |
| 1700 ElementsKind elements_kind_; | 1702 ElementsKind elements_kind_; |
| 1701 Handle<Smi> alloc_elements_kind_; | 1703 Handle<JSGlobalPropertyCell> allocation_info_cell_; |
| 1702 | 1704 |
| 1703 const BailoutId return_id_; | 1705 const BailoutId return_id_; |
| 1704 }; | 1706 }; |
| 1705 | 1707 |
| 1706 | 1708 |
| 1707 // The CallRuntime class does not represent any official JavaScript | 1709 // The CallRuntime class does not represent any official JavaScript |
| 1708 // language construct. Instead it is used to call a C or JS function | 1710 // language construct. Instead it is used to call a C or JS function |
| 1709 // with a set of arguments. This is used from the builtins that are | 1711 // with a set of arguments. This is used from the builtins that are |
| 1710 // implemented in JavaScript (see "v8natives.js"). | 1712 // implemented in JavaScript (see "v8natives.js"). |
| 1711 class CallRuntime: public Expression { | 1713 class CallRuntime: public Expression { |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3119 private: | 3121 private: |
| 3120 Isolate* isolate_; | 3122 Isolate* isolate_; |
| 3121 Zone* zone_; | 3123 Zone* zone_; |
| 3122 Visitor visitor_; | 3124 Visitor visitor_; |
| 3123 }; | 3125 }; |
| 3124 | 3126 |
| 3125 | 3127 |
| 3126 } } // namespace v8::internal | 3128 } } // namespace v8::internal |
| 3127 | 3129 |
| 3128 #endif // V8_AST_H_ | 3130 #endif // V8_AST_H_ |
| OLD | NEW |