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

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

Issue 8761011: Renaming type classes as discussed: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 private: 347 private:
348 const Instance& literal_; 348 const Instance& literal_;
349 349
350 DISALLOW_IMPLICIT_CONSTRUCTORS(LiteralNode); 350 DISALLOW_IMPLICIT_CONSTRUCTORS(LiteralNode);
351 }; 351 };
352 352
353 353
354 class TypeNode : public AstNode { 354 class TypeNode : public AstNode {
355 public: 355 public:
356 TypeNode(intptr_t token_index, const Type& type) 356 TypeNode(intptr_t token_index, const AbstractType& type)
357 : AstNode(token_index), type_(type) { 357 : AstNode(token_index), type_(type) {
358 ASSERT(type.IsZoneHandle()); 358 ASSERT(type.IsZoneHandle());
359 ASSERT(!type.IsNull()); 359 ASSERT(!type.IsNull());
360 ASSERT(type.IsFinalized()); 360 ASSERT(type.IsFinalized());
361 } 361 }
362 362
363 const Type& type() const { return type_; } 363 const AbstractType& type() const { return type_; }
364 364
365 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 365 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
366 366
367 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode); 367 DECLARE_COMMON_NODE_FUNCTIONS(TypeNode);
368 368
369 private: 369 private:
370 const Type& type_; 370 const AbstractType& type_;
371 371
372 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeNode); 372 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeNode);
373 }; 373 };
374 374
375 375
376 class AssignableNode : public AstNode { 376 class AssignableNode : public AstNode {
377 public: 377 public:
378 AssignableNode(intptr_t token_index, 378 AssignableNode(intptr_t token_index,
379 AstNode* expr, 379 AstNode* expr,
380 const Type& type, 380 const AbstractType& type,
381 const String& dst_name) 381 const String& dst_name)
382 : AstNode(token_index), expr_(expr), type_(type), dst_name_(dst_name) { 382 : AstNode(token_index), expr_(expr), type_(type), dst_name_(dst_name) {
383 ASSERT(expr_ != NULL); 383 ASSERT(expr_ != NULL);
384 ASSERT(type_.IsZoneHandle()); 384 ASSERT(type_.IsZoneHandle());
385 ASSERT(!type_.IsNull()); 385 ASSERT(!type_.IsNull());
386 ASSERT(type_.IsFinalized()); 386 ASSERT(type_.IsFinalized());
387 ASSERT(dst_name_.IsZoneHandle()); 387 ASSERT(dst_name_.IsZoneHandle());
388 } 388 }
389 389
390 AstNode* expr() const { return expr_; } 390 AstNode* expr() const { return expr_; }
391 const Type& type() const { return type_; } 391 const AbstractType& type() const { return type_; }
392 const String& dst_name() const { return dst_name_; } 392 const String& dst_name() const { return dst_name_; }
393 393
394 virtual void VisitChildren(AstNodeVisitor* visitor) const { 394 virtual void VisitChildren(AstNodeVisitor* visitor) const {
395 expr()->Visit(visitor); 395 expr()->Visit(visitor);
396 } 396 }
397 397
398 DECLARE_COMMON_NODE_FUNCTIONS(AssignableNode); 398 DECLARE_COMMON_NODE_FUNCTIONS(AssignableNode);
399 399
400 private: 400 private:
401 AstNode* expr_; 401 AstNode* expr_;
402 const Type& type_; 402 const AbstractType& type_;
403 const String& dst_name_; 403 const String& dst_name_;
404 404
405 DISALLOW_IMPLICIT_CONSTRUCTORS(AssignableNode); 405 DISALLOW_IMPLICIT_CONSTRUCTORS(AssignableNode);
406 }; 406 };
407 407
408 408
409 class ClosureNode : public AstNode { 409 class ClosureNode : public AstNode {
410 public: 410 public:
411 ClosureNode(intptr_t token_index, 411 ClosureNode(intptr_t token_index,
412 const Function& function, 412 const Function& function,
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 const LocalVariable& context_var_; 1913 const LocalVariable& context_var_;
1914 1914
1915 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1915 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1916 }; 1916 };
1917 1917
1918 } // namespace dart 1918 } // namespace dart
1919 1919
1920 #undef DECLARE_COMMON_NODE_FUNCTIONS 1920 #undef DECLARE_COMMON_NODE_FUNCTIONS
1921 1921
1922 #endif // VM_AST_H_ 1922 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/vm/ast_printer.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698