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

Side by Side Diff: src/ast.h

Issue 924453002: Fix invalid use of int in Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Windows again... Created 5 years, 10 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.h » ('j') | src/zone.cc » ('J')
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 class AstNode: public ZoneObject { 194 class AstNode: public ZoneObject {
195 public: 195 public:
196 #define DECLARE_TYPE_ENUM(type) k##type, 196 #define DECLARE_TYPE_ENUM(type) k##type,
197 enum NodeType { 197 enum NodeType {
198 AST_NODE_LIST(DECLARE_TYPE_ENUM) 198 AST_NODE_LIST(DECLARE_TYPE_ENUM)
199 kInvalid = -1 199 kInvalid = -1
200 }; 200 };
201 #undef DECLARE_TYPE_ENUM 201 #undef DECLARE_TYPE_ENUM
202 202
203 void* operator new(size_t size, Zone* zone) { 203 void* operator new(size_t size, Zone* zone) { return zone->New(size); }
204 return zone->New(static_cast<int>(size));
205 }
206 204
207 explicit AstNode(int position): position_(position) {} 205 explicit AstNode(int position): position_(position) {}
208 virtual ~AstNode() {} 206 virtual ~AstNode() {}
209 207
210 virtual void Accept(AstVisitor* v) = 0; 208 virtual void Accept(AstVisitor* v) = 0;
211 virtual NodeType node_type() const = 0; 209 virtual NodeType node_type() const = 0;
212 int position() const { return position_; } 210 int position() const { return position_; }
213 211
214 // Type testing & conversion functions overridden by concrete subclasses. 212 // Type testing & conversion functions overridden by concrete subclasses.
215 #define DECLARE_NODE_FUNCTIONS(type) \ 213 #define DECLARE_NODE_FUNCTIONS(type) \
(...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after
3540 3538
3541 private: 3539 private:
3542 Zone* zone_; 3540 Zone* zone_;
3543 AstValueFactory* ast_value_factory_; 3541 AstValueFactory* ast_value_factory_;
3544 }; 3542 };
3545 3543
3546 3544
3547 } } // namespace v8::internal 3545 } } // namespace v8::internal
3548 3546
3549 #endif // V8_AST_H_ 3547 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.h » ('j') | src/zone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698