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

Unified Diff: src/ast.h

Issue 880963002: Add missing FrameState to JSToName nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ported to other architectures. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 4903928456dd540cce2cfbdae6f17e3c058b731e..6da9a5f57bee1393b83985601b37e9c07112dbfd 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1530,7 +1530,12 @@ class ObjectLiteral FINAL : public MaterializedLiteral {
BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); }
- static int num_ids() { return parent_num_ids() + 1; }
+ // Return an AST id for a property that is used in simulate instructions.
+ BailoutId GetIdForProperty(int i) { return BailoutId(local_id(i + 1)); }
+
+ // Unlike other AST nodes, this number of bailout IDs allocated for an
+ // ObjectLiteral can vary, so num_ids() is not a static method.
+ int num_ids() const { return parent_num_ids() + 1 + properties()->length(); }
protected:
ObjectLiteral(Zone* zone, ZoneList<Property*>* properties, int literal_index,
@@ -2641,11 +2646,17 @@ class ClassLiteral FINAL : public Expression {
int start_position() const { return position(); }
int end_position() const { return end_position_; }
- static int num_ids() { return parent_num_ids() + 3; }
BailoutId EntryId() const { return BailoutId(local_id(0)); }
BailoutId DeclsId() const { return BailoutId(local_id(1)); }
BailoutId ExitId() { return BailoutId(local_id(2)); }
+ // Return an AST id for a property that is used in simulate instructions.
+ BailoutId GetIdForProperty(int i) { return BailoutId(local_id(i + 3)); }
+
+ // Unlike other AST nodes, this number of bailout IDs allocated for an
+ // ClassLiteral can vary, so num_ids() is not a static method.
+ int num_ids() const { return parent_num_ids() + 3 + properties()->length(); }
+
protected:
ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope,
VariableProxy* class_variable_proxy, Expression* extends,
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698