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

Side by Side Diff: runtime/vm/ast.h

Issue 8475013: Emit node id at every call to runtime. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/code_generator.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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 #define DECLARE_COMMON_NODE_FUNCTIONS(type) \ 90 #define DECLARE_COMMON_NODE_FUNCTIONS(type) \
91 virtual void Visit(AstNodeVisitor* visitor); \ 91 virtual void Visit(AstNodeVisitor* visitor); \
92 virtual const char* ShortName() const; \ 92 virtual const char* ShortName() const; \
93 virtual bool Is##type() const { return true; } \ 93 virtual bool Is##type() const { return true; } \
94 virtual type* As##type() { return this; } 94 virtual type* As##type() { return this; }
95 95
96 96
97 class AstNode : public ZoneAllocated { 97 class AstNode : public ZoneAllocated {
98 public: 98 public:
99 static const int kInvalidId = -1; 99 static const int kNoId = -1;
100 100
101 explicit AstNode(intptr_t token_index) 101 explicit AstNode(intptr_t token_index)
102 : token_index_(token_index), 102 : token_index_(token_index),
103 id_(GetNextId()), 103 id_(GetNextId()),
104 ic_data_(Array::ZoneHandle()), 104 ic_data_(Array::ZoneHandle()),
105 info_(NULL) { 105 info_(NULL) {
106 ASSERT(token_index >= 0); 106 ASSERT(token_index >= 0);
107 } 107 }
108 108
109 intptr_t token_index() const { return token_index_; } 109 intptr_t token_index() const { return token_index_; }
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 const LocalVariable& context_var_; 1866 const LocalVariable& context_var_;
1867 1867
1868 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1868 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1869 }; 1869 };
1870 1870
1871 } // namespace dart 1871 } // namespace dart
1872 1872
1873 #undef DECLARE_COMMON_NODE_FUNCTIONS 1873 #undef DECLARE_COMMON_NODE_FUNCTIONS
1874 1874
1875 #endif // VM_AST_H_ 1875 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698