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

Unified Diff: runtime/vm/ast.h

Issue 10831142: Associate the correct type to method receivers (instead of Dynamic type). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | runtime/vm/code_descriptors_test.cc » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 10199)
+++ runtime/vm/ast.h (working copy)
@@ -308,16 +308,16 @@
public:
LiteralNode(intptr_t token_pos, const Instance& literal)
: AstNode(token_pos), literal_(literal) {
- ASSERT(literal.IsZoneHandle());
- ASSERT(literal.IsSmi() || literal.IsOld());
+ ASSERT(literal_.IsZoneHandle());
+ ASSERT(literal_.IsSmi() || literal_.IsOld());
#if defined(DEBUG)
- if (literal.IsString()) {
- ASSERT(String::Cast(literal).IsSymbol());
+ if (literal_.IsString()) {
+ ASSERT(String::Cast(literal_).IsSymbol());
}
#endif // defined(DEBUG)
- ASSERT(literal.IsNull() ||
- Class::Handle(literal.clazz()).is_finalized() ||
- Class::Handle(literal.clazz()).is_prefinalized());
+ ASSERT(literal_.IsNull() ||
+ Class::Handle(literal_.clazz()).is_finalized() ||
+ Class::Handle(literal_.clazz()).is_prefinalized());
}
const Instance& literal() const { return literal_; }
@@ -343,9 +343,9 @@
public:
TypeNode(intptr_t token_pos, const AbstractType& type)
: AstNode(token_pos), type_(type) {
- ASSERT(type.IsZoneHandle());
- ASSERT(!type.IsNull());
- ASSERT(type.IsFinalized());
+ ASSERT(type_.IsZoneHandle());
+ ASSERT(!type_.IsNull());
+ ASSERT(type_.IsFinalized());
}
const AbstractType& type() const { return type_; }
@@ -404,12 +404,12 @@
function_(function),
receiver_(receiver),
scope_(scope) {
- ASSERT(function.IsZoneHandle());
- ASSERT((function.IsNonImplicitClosureFunction() &&
+ ASSERT(function_.IsZoneHandle());
+ ASSERT((function_.IsNonImplicitClosureFunction() &&
(receiver_ == NULL) && (scope_ != NULL)) ||
- (function.IsImplicitInstanceClosureFunction() &&
+ (function_.IsImplicitInstanceClosureFunction() &&
(receiver_ != NULL) && (scope_ == NULL)) ||
- (function.IsImplicitStaticClosureFunction() &&
+ (function_.IsImplicitStaticClosureFunction() &&
(receiver_ == NULL) && (scope_ == NULL)));
}
@@ -442,7 +442,7 @@
public:
PrimaryNode(intptr_t token_pos, const Object& primary)
: AstNode(token_pos), primary_(primary) {
- ASSERT(primary.IsZoneHandle());
+ ASSERT(primary_.IsZoneHandle());
}
const Object& primary() const { return primary_; }
@@ -929,13 +929,17 @@
class LoadLocalNode : public AstNode {
public:
LoadLocalNode(intptr_t token_pos, const LocalVariable& local)
- : AstNode(token_pos), local_(local), pseudo_(NULL) { }
+ : AstNode(token_pos), local_(local), pseudo_(NULL) {
+ ASSERT(&local_ != NULL);
srdjan 2012/08/02 22:29:46 That can't be, can it? You can't pass *NULL to it?
regis 2012/08/02 23:01:26 Actually, yes, you can pass *receiver with receive
+ }
// The pseudo node does not produce input but must be visited before
// completing local load.
LoadLocalNode(intptr_t token_pos,
const LocalVariable& local,
AstNode* pseudo)
- : AstNode(token_pos), local_(local), pseudo_(pseudo) {}
+ : AstNode(token_pos), local_(local), pseudo_(pseudo) {
+ ASSERT(&local_ != NULL);
+ }
const LocalVariable& local() const { return local_; }
AstNode* pseudo() const { return pseudo_; } // Can be NULL.
@@ -965,6 +969,7 @@
const LocalVariable& local,
AstNode* value)
: AstNode(token_pos), local_(local), value_(value) {
+ ASSERT(&local_ != NULL);
ASSERT(value_ != NULL);
}
@@ -993,7 +998,7 @@
const Field& field)
: AstNode(token_pos), instance_(instance), field_(field) {
ASSERT(instance_ != NULL);
- ASSERT(field.IsZoneHandle());
+ ASSERT(field_.IsZoneHandle());
}
AstNode* instance() const { return instance_; }
@@ -1024,7 +1029,7 @@
field_(field),
value_(value) {
ASSERT(instance_ != NULL);
- ASSERT(field.IsZoneHandle());
+ ASSERT(field_.IsZoneHandle());
ASSERT(value_ != NULL);
}
@@ -1052,7 +1057,7 @@
public:
LoadStaticFieldNode(intptr_t token_pos, const Field& field)
: AstNode(token_pos), field_(field) {
- ASSERT(field.IsZoneHandle());
+ ASSERT(field_.IsZoneHandle());
}
const Field& field() const { return field_; }
@@ -1079,7 +1084,7 @@
public:
StoreStaticFieldNode(intptr_t token_pos, const Field& field, AstNode* value)
: AstNode(token_pos), field_(field), value_(value) {
- ASSERT(field.IsZoneHandle());
+ ASSERT(field_.IsZoneHandle());
ASSERT(value_ != NULL);
}
@@ -1342,7 +1347,7 @@
: AstNode(token_pos),
function_(function),
arguments_(arguments) {
- ASSERT(function.IsZoneHandle());
+ ASSERT(function_.IsZoneHandle());
ASSERT(arguments_ != NULL);
}
« no previous file with comments | « no previous file | runtime/vm/code_descriptors_test.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698