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

Unified Diff: frog/frogsh

Issue 8536056: better errors and error locations (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | frog/member.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frogsh
diff --git a/frog/frogsh b/frog/frogsh
index 1d26d2aac877cb1a5421a53bba6ca359484822ca..4e2d34c0b2c37ced6db17eda72a0c28ecaca87e1 100755
--- a/frog/frogsh
+++ b/frog/frogsh
@@ -13341,7 +13341,7 @@ Member.prototype.override = function(other) {
return true;
}
Member.prototype.get$generatedFactoryName = function() {
- $assert(this.get$isFactory(), "this.isFactory", "member.dart", 201, 12);
+ $assert(this.get$isFactory(), "this.isFactory", "member.dart", 203, 12);
var prefix = ('' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$');
if (this.name == '') {
return ('' + prefix + 'factory');
@@ -13421,10 +13421,10 @@ TypeMember.prototype._get = function(context, node, target, isDynamic) {
return new Value.type$ctor(this.type, node.span);
}
TypeMember.prototype._set = function(context, node, target, value, isDynamic) {
- $globals.world.error('can not set type', node.span);
+ $globals.world.error('cannot set type', node.span);
}
TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) {
- $globals.world.error('can not invoke type', node.span);
+ $globals.world.error('cannot invoke type', node.span);
}
TypeMember.prototype._get$3 = function($0, $1, $2) {
return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
@@ -14010,8 +14010,8 @@ MethodMember.prototype.provideFieldSyntax = function() {
MethodMember.prototype.providePropertySyntax = function() {
this._providePropertySyntax = true;
}
-MethodMember.prototype._set = function(context, Node, target, value, isDynamic) {
- $globals.world.error('can not set method', this.definition.span);
+MethodMember.prototype._set = function(context, node, target, value, isDynamic) {
+ $globals.world.error('cannot set method', node.span);
}
MethodMember.prototype._get = function(context, node, target, isDynamic) {
this.declaringType.genMethod(this);
@@ -14166,7 +14166,7 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
return this._invokeBuiltin(context, node, target, args, argsCode, isDynamic);
}
if ($notnull_bool(this.isFactory)) {
- $assert(target.isType, "target.isType", "member.dart", 958, 14);
+ $assert(target.isType, "target.isType", "member.dart", 960, 14);
return new Value(target.type, ('' + this.get$generatedFactoryName() + '(' + argsString + ')'), node.span, true);
}
if ($notnull_bool(this.isStatic)) {
@@ -14601,7 +14601,7 @@ MethodMember.prototype._get$3 = function($0, $1, $2) {
return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
};
MethodMember.prototype._set$4 = function($0, $1, $2, $3) {
- return this._set(($0 && $0.is$MethodGenerator()), $1, ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
+ return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
};
MethodMember.prototype.canInvoke$2 = function($0, $1) {
return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
@@ -20471,14 +20471,16 @@ DefinedType.prototype.resolveMember = function(memberName) {
var $list = this.get$subtypes();
for (var $i = this.get$subtypes().iterator(); $i.hasNext$0(); ) {
var t = $i.next$0();
- var m = null;
if (!$notnull_bool(this.isClass) && $notnull_bool(t.get$isClass())) {
- m = t.getMember$1(memberName);
+ var m = t.getMember$1(memberName);
+ if ($notnull_bool($ne(m, null)) && ret.members.indexOf(m) == -1) {
+ ret.add((m && m.is$Member()));
+ }
}
else {
- m = t.get$members().$index(memberName);
+ var m = t.get$members().$index(memberName);
+ if ($notnull_bool($ne(m, null))) ret.add((m && m.is$Member()));
}
- if ($notnull_bool($ne(m, null))) ret.add((m && m.is$Member()));
}
return ret;
}
@@ -20570,7 +20572,7 @@ DefinedType.prototype.resolveTypeParams = function(inType) {
return this;
}
DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) {
- $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1248, 12);
+ $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1251, 12);
var names = [this.name];
var typeMap = $map([]);
for (var i = 0;
@@ -20588,7 +20590,7 @@ DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) {
return (ret && ret.is$lang_Type());
}
DefinedType.prototype.getCallStub = function(args) {
- $assert(this.get$isFunction(), "isFunction", "type.dart", 1268, 12);
+ $assert(this.get$isFunction(), "isFunction", "type.dart", 1271, 12);
var name = _getCallStubName('call', args);
if (this.varStubs == null) this.varStubs = $map([]);
var stub = this.varStubs.$index(name);
@@ -21360,13 +21362,12 @@ World.prototype._addMember = function(member) {
}
}
World.prototype._addTopName = function(named) {
- var $0;
var existing = this._topNames.$index(named.get$name());
if ($notnull_bool($ne(existing, null))) {
this.info(('mangling matching top level name "' + named.get$name() + '" in ') + ('both "' + named.get$library().name + '" and "' + existing.get$library().get$name() + '"'));
if ($notnull_bool(named.get$isNative())) {
if ($notnull_bool(existing.get$isNative())) {
- $globals.world.internalError(('conflicting native names "' + named.get$name() + '" ') + ('(already defined in ' + existing.get$span().get$locationText() + ')'), (($0 = named.get$span()) && $0.is$SourceSpan()));
+ $globals.world.internalError(('conflicting native names "' + named.get$name() + '" ') + ('(already defined in ' + existing.get$span().get$locationText() + ')'), named.get$span());
}
else {
this._topNames.$setindex(named.get$name(), named);
@@ -21375,7 +21376,7 @@ World.prototype._addTopName = function(named) {
}
else if ($notnull_bool(named.get$library().get$isCore())) {
if ($notnull_bool(existing.get$library().get$isCore())) {
- $globals.world.internalError(('conflicting top-level names in core "' + named.get$name() + '" ') + ('(previously defined in ' + existing.get$span().get$locationText() + ')'), (($0 = named.get$span()) && $0.is$SourceSpan()));
+ $globals.world.internalError(('conflicting top-level names in core "' + named.get$name() + '" ') + ('(previously defined in ' + existing.get$span().get$locationText() + ')'), named.get$span());
}
else {
this._topNames.$setindex(named.get$name(), named);
@@ -21391,11 +21392,10 @@ World.prototype._addTopName = function(named) {
}
}
World.prototype._addJavascriptTopName = function(named) {
- var $0;
named.set$jsname(('' + named.get$library().get$jsname() + '_' + named.get$name()));
var existing = this._topNames.$index(named.get$jsname());
if ($notnull_bool($ne(existing, null)) && $notnull_bool($ne(existing, named))) {
- $globals.world.internalError(('name mangling failed for "' + named.get$jsname() + '" ') + ('("' + named.get$jsname() + '" defined also in ' + existing.get$span().get$locationText() + ')'), (($0 = named.get$span()) && $0.is$SourceSpan()));
+ $globals.world.internalError(('name mangling failed for "' + named.get$jsname() + '" ') + ('("' + named.get$jsname() + '" defined also in ' + existing.get$span().get$locationText() + ')'), named.get$span());
}
this._topNames.$setindex(named.get$jsname(), named);
}
« no previous file with comments | « no previous file | frog/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698