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

Unified Diff: src/ast.h

Issue 633373003: Simplify AST ID generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 6 years, 2 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/parser.h » ('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 c75938e22d8689010a630ddbfd804a6093d59384..a5c7cb145a408876a7f8b8f0eb75f91b1e7c7533 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -184,7 +184,7 @@ class AstNode: public ZoneObject {
// For generating IDs for AstNodes.
class IdGen {
public:
- explicit IdGen(int id = 0) : id_(id) {}
+ IdGen() : id_(BailoutId::FirstUsable().ToInt()) {}
wingo 2014/10/08 13:34:46 What is the plan with bailout ids -- still a per-f
int GetNextId() { return ReserveIdRange(1); }
int ReserveIdRange(int n) {
@@ -195,6 +195,8 @@ class AstNode: public ZoneObject {
private:
int id_;
+
+ DISALLOW_COPY_AND_ASSIGN(IdGen);
};
#define DECLARE_TYPE_ENUM(type) k##type,
« no previous file with comments | « no previous file | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698