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

Unified Diff: src/ast.h

Issue 798873006: First simple implementation of class literals in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. 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 | « no previous file | 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 6cf55c26a1124dd8d6bc6e193176e7255a05addc..716fdeda57766b83914d9d1e3d760fae9579c75b 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2628,6 +2628,11 @@ 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)); }
+
protected:
ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope,
VariableProxy* class_variable_proxy, Expression* extends,
@@ -2641,8 +2646,11 @@ class ClassLiteral FINAL : public Expression {
constructor_(constructor),
properties_(properties),
end_position_(end_position) {}
+ static int parent_num_ids() { return Expression::num_ids(); }
private:
+ int local_id(int n) const { return base_id() + parent_num_ids() + n; }
+
const AstRawString* raw_name_;
Scope* scope_;
VariableProxy* class_variable_proxy_;
« 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