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 279423005: Customized support for feedback on calls to Array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase and comments. Created 6 years, 7 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/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "assembler.h" 10 #include "assembler.h"
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 return NULL; 1755 return NULL;
1756 } 1756 }
1757 1757
1758 virtual bool IsMonomorphic() V8_OVERRIDE { 1758 virtual bool IsMonomorphic() V8_OVERRIDE {
1759 if (expression()->IsProperty()) { 1759 if (expression()->IsProperty()) {
1760 return expression()->AsProperty()->IsMonomorphic(); 1760 return expression()->AsProperty()->IsMonomorphic();
1761 } 1761 }
1762 return !target_.is_null(); 1762 return !target_.is_null();
1763 } 1763 }
1764 1764
1765 bool global_call() const {
1766 VariableProxy* proxy = expression_->AsVariableProxy();
1767 return proxy != NULL && proxy->var()->IsUnallocated();
1768 }
1769
1770 bool known_global_function() const {
1771 return global_call() && !target_.is_null();
1772 }
1773
1765 Handle<JSFunction> target() { return target_; } 1774 Handle<JSFunction> target() { return target_; }
1766 1775
1767 Handle<Cell> cell() { return cell_; } 1776 Handle<Cell> cell() { return cell_; }
1768 1777
1778 Handle<AllocationSite> allocation_site() { return allocation_site_; }
1779
1769 void set_target(Handle<JSFunction> target) { target_ = target; } 1780 void set_target(Handle<JSFunction> target) { target_ = target; }
1781 void set_allocation_site(Handle<AllocationSite> site) {
1782 allocation_site_ = site;
1783 }
1770 bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup); 1784 bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup);
1771 1785
1772 BailoutId ReturnId() const { return return_id_; } 1786 BailoutId ReturnId() const { return return_id_; }
1773 1787
1774 enum CallType { 1788 enum CallType {
1775 POSSIBLY_EVAL_CALL, 1789 POSSIBLY_EVAL_CALL,
1776 GLOBAL_CALL, 1790 GLOBAL_CALL,
1777 LOOKUP_SLOT_CALL, 1791 LOOKUP_SLOT_CALL,
1778 PROPERTY_CALL, 1792 PROPERTY_CALL,
1779 OTHER_CALL 1793 OTHER_CALL
(...skipping 22 matching lines...) Expand all
1802 expression->AsProperty()->mark_for_call(); 1816 expression->AsProperty()->mark_for_call();
1803 } 1817 }
1804 } 1818 }
1805 1819
1806 private: 1820 private:
1807 Expression* expression_; 1821 Expression* expression_;
1808 ZoneList<Expression*>* arguments_; 1822 ZoneList<Expression*>* arguments_;
1809 1823
1810 Handle<JSFunction> target_; 1824 Handle<JSFunction> target_;
1811 Handle<Cell> cell_; 1825 Handle<Cell> cell_;
1826 Handle<AllocationSite> allocation_site_;
1812 int call_feedback_slot_; 1827 int call_feedback_slot_;
1813 1828
1814 const BailoutId return_id_; 1829 const BailoutId return_id_;
1815 }; 1830 };
1816 1831
1817 1832
1818 class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface { 1833 class CallNew V8_FINAL : public Expression, public FeedbackSlotInterface {
1819 public: 1834 public:
1820 DECLARE_NODE_TYPE(CallNew) 1835 DECLARE_NODE_TYPE(CallNew)
1821 1836
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 3348
3334 private: 3349 private:
3335 Zone* zone_; 3350 Zone* zone_;
3336 Visitor visitor_; 3351 Visitor visitor_;
3337 }; 3352 };
3338 3353
3339 3354
3340 } } // namespace v8::internal 3355 } } // namespace v8::internal
3341 3356
3342 #endif // V8_AST_H_ 3357 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698