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

Side by Side Diff: src/ast.h

Issue 1104673004: [turbofan] Fix frame state for class literal definition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/compiler/ast-graph-builder.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 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 VariableProxy* class_variable_proxy() const { return class_variable_proxy_; } 2692 VariableProxy* class_variable_proxy() const { return class_variable_proxy_; }
2693 Expression* extends() const { return extends_; } 2693 Expression* extends() const { return extends_; }
2694 FunctionLiteral* constructor() const { return constructor_; } 2694 FunctionLiteral* constructor() const { return constructor_; }
2695 ZoneList<Property*>* properties() const { return properties_; } 2695 ZoneList<Property*>* properties() const { return properties_; }
2696 int start_position() const { return position(); } 2696 int start_position() const { return position(); }
2697 int end_position() const { return end_position_; } 2697 int end_position() const { return end_position_; }
2698 2698
2699 BailoutId EntryId() const { return BailoutId(local_id(0)); } 2699 BailoutId EntryId() const { return BailoutId(local_id(0)); }
2700 BailoutId DeclsId() const { return BailoutId(local_id(1)); } 2700 BailoutId DeclsId() const { return BailoutId(local_id(1)); }
2701 BailoutId ExitId() { return BailoutId(local_id(2)); } 2701 BailoutId ExitId() { return BailoutId(local_id(2)); }
2702 BailoutId CreateLiteralId() const { return BailoutId(local_id(3)); }
2702 2703
2703 // Return an AST id for a property that is used in simulate instructions. 2704 // Return an AST id for a property that is used in simulate instructions.
2704 BailoutId GetIdForProperty(int i) { return BailoutId(local_id(i + 3)); } 2705 BailoutId GetIdForProperty(int i) { return BailoutId(local_id(i + 4)); }
2705 2706
2706 // Unlike other AST nodes, this number of bailout IDs allocated for an 2707 // Unlike other AST nodes, this number of bailout IDs allocated for an
2707 // ClassLiteral can vary, so num_ids() is not a static method. 2708 // ClassLiteral can vary, so num_ids() is not a static method.
2708 int num_ids() const { return parent_num_ids() + 3 + properties()->length(); } 2709 int num_ids() const { return parent_num_ids() + 4 + properties()->length(); }
2709 2710
2710 protected: 2711 protected:
2711 ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope, 2712 ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope,
2712 VariableProxy* class_variable_proxy, Expression* extends, 2713 VariableProxy* class_variable_proxy, Expression* extends,
2713 FunctionLiteral* constructor, ZoneList<Property*>* properties, 2714 FunctionLiteral* constructor, ZoneList<Property*>* properties,
2714 int start_position, int end_position) 2715 int start_position, int end_position)
2715 : Expression(zone, start_position), 2716 : Expression(zone, start_position),
2716 raw_name_(name), 2717 raw_name_(name),
2717 scope_(scope), 2718 scope_(scope),
2718 class_variable_proxy_(class_variable_proxy), 2719 class_variable_proxy_(class_variable_proxy),
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
3594 3595
3595 private: 3596 private:
3596 Zone* zone_; 3597 Zone* zone_;
3597 AstValueFactory* ast_value_factory_; 3598 AstValueFactory* ast_value_factory_;
3598 }; 3599 };
3599 3600
3600 3601
3601 } } // namespace v8::internal 3602 } } // namespace v8::internal
3602 3603
3603 #endif // V8_AST_H_ 3604 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698