Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: src/ast.h

Issue 132963012: Pretenure call new support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) {
1844 return FLAG_pretenuring_call_new ? 2 : 1;
1845 }
1844 virtual void SetFirstFeedbackSlot(int slot) { 1846 virtual void SetFirstFeedbackSlot(int slot) {
1845 callnew_feedback_slot_ = slot; 1847 callnew_feedback_slot_ = slot;
1846 } 1848 }
1847 1849
1848 int CallNewFeedbackSlot() { 1850 int CallNewFeedbackSlot() {
1849 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot); 1851 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1850 return callnew_feedback_slot_; 1852 return callnew_feedback_slot_;
1851 } 1853 }
1854 int AllocationSiteFeedbackSlot() {
1855 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1856 ASSERT(FLAG_pretenuring_call_new);
1857 return callnew_feedback_slot_ + 1;
1858 }
1852 1859
1853 TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); }
1854 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 1860 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1855 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } 1861 virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
1856 Handle<JSFunction> target() const { return target_; } 1862 Handle<JSFunction> target() const { return target_; }
1857 ElementsKind elements_kind() const { return elements_kind_; } 1863 ElementsKind elements_kind() const { return elements_kind_; }
1858 Handle<AllocationSite> allocation_site() const { 1864 Handle<AllocationSite> allocation_site() const {
1859 return allocation_site_; 1865 return allocation_site_;
1860 } 1866 }
1861 1867
1862 static int feedback_slots() { return 1; } 1868 static int feedback_slots() { return 1; }
1863 1869
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 3362
3357 private: 3363 private:
3358 Zone* zone_; 3364 Zone* zone_;
3359 Visitor visitor_; 3365 Visitor visitor_;
3360 }; 3366 };
3361 3367
3362 3368
3363 } } // namespace v8::internal 3369 } } // namespace v8::internal
3364 3370
3365 #endif // V8_AST_H_ 3371 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698