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

Side by Side Diff: src/ast.h

Issue 1262803002: Stop overallocating feedback vector slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nit. Created 5 years, 4 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
« no previous file with comments | « no previous file | src/ast-numbering.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 // 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 "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 return var()->IsUnallocated() || var()->IsLookupSlot(); 1677 return var()->IsUnallocated() || var()->IsLookupSlot();
1678 } 1678 }
1679 1679
1680 virtual FeedbackVectorRequirements ComputeFeedbackRequirements( 1680 virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
1681 Isolate* isolate, const ICSlotCache* cache) override; 1681 Isolate* isolate, const ICSlotCache* cache) override;
1682 1682
1683 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot, 1683 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot,
1684 ICSlotCache* cache) override; 1684 ICSlotCache* cache) override;
1685 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; } 1685 Code::Kind FeedbackICSlotKind(int index) override { return Code::LOAD_IC; }
1686 FeedbackVectorICSlot VariableFeedbackSlot() { 1686 FeedbackVectorICSlot VariableFeedbackSlot() {
1687 DCHECK(!UsesVariableFeedbackSlot() || !variable_feedback_slot_.IsInvalid());
1688 return variable_feedback_slot_; 1687 return variable_feedback_slot_;
1689 } 1688 }
1690 1689
1691 static int num_ids() { return parent_num_ids() + 1; } 1690 static int num_ids() { return parent_num_ids() + 1; }
1692 BailoutId BeforeId() const { return BailoutId(local_id(0)); } 1691 BailoutId BeforeId() const { return BailoutId(local_id(0)); }
1693 1692
1694 protected: 1693 protected:
1695 VariableProxy(Zone* zone, Variable* var, int start_position, 1694 VariableProxy(Zone* zone, Variable* var, int start_position,
1696 int end_position); 1695 int end_position);
1697 1696
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 } 1784 }
1786 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot, 1785 void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot,
1787 ICSlotCache* cache) override { 1786 ICSlotCache* cache) override {
1788 property_feedback_slot_ = slot; 1787 property_feedback_slot_ = slot;
1789 } 1788 }
1790 Code::Kind FeedbackICSlotKind(int index) override { 1789 Code::Kind FeedbackICSlotKind(int index) override {
1791 return key()->IsPropertyName() ? Code::LOAD_IC : Code::KEYED_LOAD_IC; 1790 return key()->IsPropertyName() ? Code::LOAD_IC : Code::KEYED_LOAD_IC;
1792 } 1791 }
1793 1792
1794 FeedbackVectorICSlot PropertyFeedbackSlot() const { 1793 FeedbackVectorICSlot PropertyFeedbackSlot() const {
1795 DCHECK(!property_feedback_slot_.IsInvalid());
1796 return property_feedback_slot_; 1794 return property_feedback_slot_;
1797 } 1795 }
1798 1796
1799 static LhsKind GetAssignType(Property* property) { 1797 static LhsKind GetAssignType(Property* property) {
1800 if (property == NULL) return VARIABLE; 1798 if (property == NULL) return VARIABLE;
1801 bool super_access = property->IsSuperAccess(); 1799 bool super_access = property->IsSuperAccess();
1802 return (property->key()->IsPropertyName()) 1800 return (property->key()->IsPropertyName())
1803 ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY) 1801 ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY)
1804 : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY); 1802 : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY);
1805 } 1803 }
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 3625
3628 private: 3626 private:
3629 Zone* zone_; 3627 Zone* zone_;
3630 AstValueFactory* ast_value_factory_; 3628 AstValueFactory* ast_value_factory_;
3631 }; 3629 };
3632 3630
3633 3631
3634 } } // namespace v8::internal 3632 } } // namespace v8::internal
3635 3633
3636 #endif // V8_AST_H_ 3634 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698