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 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 | 1833 |
1834 class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface { | 1834 class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface { |
1835 public: | 1835 public: |
1836 DECLARE_NODE_TYPE(CallNew) | 1836 DECLARE_NODE_TYPE(CallNew) |
1837 | 1837 |
1838 Expression* expression() const { return expression_; } | 1838 Expression* expression() const { return expression_; } |
1839 ZoneList<Expression*>* arguments() const { return arguments_; } | 1839 ZoneList<Expression*>* arguments() const { return arguments_; } |
1840 | 1840 |
1841 // Type feedback information. | 1841 // Type feedback information. |
1842 virtual ComputablePhase GetComputablePhase() { return DURING_PARSE; } | 1842 virtual ComputablePhase GetComputablePhase() { return DURING_PARSE; } |
1843 virtual int ComputeFeedbackSlotCount(Isolate* isolate) { return 1; } | 1843 virtual int ComputeFeedbackSlotCount(Isolate* isolate) { return 2; } |
1844 virtual void SetFirstFeedbackSlot(int slot) { | 1844 virtual void SetFirstFeedbackSlot(int slot) { |
1845 callnew_feedback_slot_ = slot; | 1845 callnew_feedback_slot_ = slot; |
1846 } | 1846 } |
1847 | 1847 |
1848 int CallNewFeedbackSlot() { | 1848 int CallNewFeedbackSlot() { |
1849 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot); | 1849 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot); |
1850 return callnew_feedback_slot_; | 1850 return callnew_feedback_slot_; |
1851 } | 1851 } |
| 1852 int AllocationSiteFeedbackSlot() { |
| 1853 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot); |
| 1854 return callnew_feedback_slot_ + 1; |
| 1855 } |
1852 | 1856 |
1853 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } | |
1854 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1857 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
1855 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } | 1858 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } |
1856 Handle<JSFunction> target() const { return target_; } | 1859 Handle<JSFunction> target() const { return target_; } |
1857 ElementsKind elements_kind() const { return elements_kind_; } | 1860 ElementsKind elements_kind() const { return elements_kind_; } |
1858 Handle<AllocationSite> allocation_site() const { | 1861 Handle<AllocationSite> allocation_site() const { |
1859 return allocation_site_; | 1862 return allocation_site_; |
1860 } | 1863 } |
1861 | 1864 |
1862 static int feedback_slots() { return 1; } | 1865 static int feedback_slots() { return 1; } |
1863 | 1866 |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3357 | 3360 |
3358 private: | 3361 private: |
3359 Zone* zone_; | 3362 Zone* zone_; |
3360 Visitor visitor_; | 3363 Visitor visitor_; |
3361 }; | 3364 }; |
3362 | 3365 |
3363 | 3366 |
3364 } } // namespace v8::internal | 3367 } } // namespace v8::internal |
3365 | 3368 |
3366 #endif // V8_AST_H_ | 3369 #endif // V8_AST_H_ |
OLD | NEW |