| 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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 ZoneList<Expression*>* arguments() const { return arguments_; } | 1588 ZoneList<Expression*>* arguments() const { return arguments_; } |
| 1589 virtual int position() const { return pos_; } | 1589 virtual int position() const { return pos_; } |
| 1590 | 1590 |
| 1591 // Type feedback information. | 1591 // Type feedback information. |
| 1592 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } | 1592 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } |
| 1593 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1593 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 1594 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1594 virtual bool IsMonomorphic() { return is_monomorphic_; } |
| 1595 Handle<JSFunction> target() { return target_; } | 1595 Handle<JSFunction> target() { return target_; } |
| 1596 | 1596 |
| 1597 BailoutId ReturnId() const { return return_id_; } | 1597 BailoutId ReturnId() const { return return_id_; } |
| 1598 ElementsKind elements_kind() const { return elements_kind_; } |
| 1598 | 1599 |
| 1599 protected: | 1600 protected: |
| 1600 CallNew(Isolate* isolate, | 1601 CallNew(Isolate* isolate, |
| 1601 Expression* expression, | 1602 Expression* expression, |
| 1602 ZoneList<Expression*>* arguments, | 1603 ZoneList<Expression*>* arguments, |
| 1603 int pos) | 1604 int pos) |
| 1604 : Expression(isolate), | 1605 : Expression(isolate), |
| 1605 expression_(expression), | 1606 expression_(expression), |
| 1606 arguments_(arguments), | 1607 arguments_(arguments), |
| 1607 pos_(pos), | 1608 pos_(pos), |
| 1608 is_monomorphic_(false), | 1609 is_monomorphic_(false), |
| 1609 return_id_(GetNextId(isolate)) { } | 1610 return_id_(GetNextId(isolate)), |
| 1611 elements_kind_(GetInitialFastElementsKind()) { } |
| 1610 | 1612 |
| 1611 private: | 1613 private: |
| 1612 Expression* expression_; | 1614 Expression* expression_; |
| 1613 ZoneList<Expression*>* arguments_; | 1615 ZoneList<Expression*>* arguments_; |
| 1614 int pos_; | 1616 int pos_; |
| 1615 | 1617 |
| 1616 bool is_monomorphic_; | 1618 bool is_monomorphic_; |
| 1617 Handle<JSFunction> target_; | 1619 Handle<JSFunction> target_; |
| 1618 | 1620 |
| 1619 const BailoutId return_id_; | 1621 const BailoutId return_id_; |
| 1622 ElementsKind elements_kind_; |
| 1620 }; | 1623 }; |
| 1621 | 1624 |
| 1622 | 1625 |
| 1623 // The CallRuntime class does not represent any official JavaScript | 1626 // The CallRuntime class does not represent any official JavaScript |
| 1624 // language construct. Instead it is used to call a C or JS function | 1627 // language construct. Instead it is used to call a C or JS function |
| 1625 // with a set of arguments. This is used from the builtins that are | 1628 // with a set of arguments. This is used from the builtins that are |
| 1626 // implemented in JavaScript (see "v8natives.js"). | 1629 // implemented in JavaScript (see "v8natives.js"). |
| 1627 class CallRuntime: public Expression { | 1630 class CallRuntime: public Expression { |
| 1628 public: | 1631 public: |
| 1629 DECLARE_NODE_TYPE(CallRuntime) | 1632 DECLARE_NODE_TYPE(CallRuntime) |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2932 private: | 2935 private: |
| 2933 Isolate* isolate_; | 2936 Isolate* isolate_; |
| 2934 Zone* zone_; | 2937 Zone* zone_; |
| 2935 Visitor visitor_; | 2938 Visitor visitor_; |
| 2936 }; | 2939 }; |
| 2937 | 2940 |
| 2938 | 2941 |
| 2939 } } // namespace v8::internal | 2942 } } // namespace v8::internal |
| 2940 | 2943 |
| 2941 #endif // V8_AST_H_ | 2944 #endif // V8_AST_H_ |
| OLD | NEW |