| Index: frog/frogsh
|
| diff --git a/frog/frogsh b/frog/frogsh
|
| index 1b9790d7c89506c6931b6ed5032d54d3a5cc7c2e..6c26c3e7645e00f2c7dc4642f633468d88f2105b 100755
|
| --- a/frog/frogsh
|
| +++ b/frog/frogsh
|
| @@ -1,18 +1,26 @@
|
| #!/usr/bin/env node
|
| // ********** Library dart:core **************
|
| // ********** Natives dart:core **************
|
| +Object.prototype.$typeNameOf = function() {
|
| + if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')
|
| + || typeof(process) != 'undefined') { // fast-path for Chrome and Node
|
| + return this.constructor.name;
|
| + }
|
| + var str = Object.prototype.toString.call(this);
|
| + str = str.substring(8, str.length - 1);
|
| + if (str == 'Window') str = 'DOMWindow';
|
| + return str;
|
| +}
|
| /**
|
| * Generates a dynamic call stub for a function.
|
| * Our goal is to create a stub method like this on-the-fly:
|
| - * function($0, $1, capture) { this($0, $1, true, capture); }
|
| + * function($0, $1, capture) { return this($0, $1, true, capture); }
|
| *
|
| * This stub then replaces the dynamic one on Function, with one that is
|
| * specialized for that particular function, taking into account its default
|
| * arguments.
|
| */
|
| Function.prototype.$genStub = function(argsLength, names) {
|
| - // TODO(jmesserly): only emit $genStub if actually needed
|
| -
|
| // Fast path: if no named arguments and arg count matches
|
| if (this.length == argsLength && !names) {
|
| return this;
|
| @@ -71,7 +79,8 @@ Function.prototype.$genStub = function(argsLength, names) {
|
| return new Function('$f', 'return ' + f + '').call(null, this);
|
| }
|
| function $notnull_bool(test) {
|
| - return (test === true || test === false) ? test : test.is$bool(); // TypeError
|
| + if (test === true || test === false) return test;
|
| + $throw(new TypeError(test, 'bool'));
|
| }
|
| function $assert(test, text, url, line, column) {
|
| if (typeof test == 'function') test = test();
|
| @@ -154,17 +163,31 @@ Clock.frequency = function() {
|
| return 1000;
|
| }
|
| // ********** Code for AssertError **************
|
| -function AssertError(failedAssertion, url, line, column) {
|
| +function AssertError() {}
|
| +AssertError._internal$ctor = function(failedAssertion, url, line, column) {
|
| this.failedAssertion = failedAssertion;
|
| this.url = url;
|
| this.line = line;
|
| this.column = column;
|
| // Initializers done
|
| }
|
| +AssertError._internal$ctor.prototype = AssertError.prototype;
|
| AssertError.prototype.toString = function() {
|
| return ("Failed assertion: '" + this.failedAssertion + "' is not true ") + ("in " + this.url + " at line " + this.line + ", column " + this.column + ".");
|
| }
|
| -AssertError.prototype.toString$0 = AssertError.prototype.toString;
|
| +AssertError.prototype.toString$0 = function() {
|
| + return this.toString();
|
| +};
|
| +// ********** Code for TypeError **************
|
| +TypeError._internal$ctor = function(src, dstType) {
|
| + this.srcType = (src == null ? "Null" : src.$typeNameOf());
|
| + this.destType = destType;
|
| + this.toString = function() {
|
| + return ("Failed type check: type " + this.srcType +
|
| + " is not assignable to type" + this.dstType);
|
| + }
|
| +}
|
| +TypeError._internal$ctor.prototype = TypeError.prototype;
|
| // ********** Code for Object **************
|
| Object.prototype.get$dynamic = function() {
|
| return this;
|
| @@ -199,6 +222,369 @@ Object.prototype.addSource$1 = function($0) {
|
| Object.prototype.appendByteStringToken$2 = function($0, $1) {
|
| return this.noSuchMethod("appendByteStringToken", [$0, $1]);
|
| };
|
| +Object.prototype.assert$ArgumentNode = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ArgumentNode"));
|
| +};
|
| +Object.prototype.assert$Arguments = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Arguments"));
|
| +};
|
| +Object.prototype.assert$BeginGroupToken = function() {
|
| + $throw(new TypeError._internal$ctor(this, "BeginGroupToken"));
|
| +};
|
| +Object.prototype.assert$BinaryExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "BinaryExpression"));
|
| +};
|
| +Object.prototype.assert$BlockScope = function() {
|
| + $throw(new TypeError._internal$ctor(this, "BlockScope"));
|
| +};
|
| +Object.prototype.assert$BlockStatement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "BlockStatement"));
|
| +};
|
| +Object.prototype.assert$CallExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "CallExpression"));
|
| +};
|
| +Object.prototype.assert$ClassElement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ClassElement"));
|
| +};
|
| +Object.prototype.assert$ClassNode = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ClassNode"));
|
| +};
|
| +Object.prototype.assert$CodeWriter = function() {
|
| + $throw(new TypeError._internal$ctor(this, "CodeWriter"));
|
| +};
|
| +Object.prototype.assert$Collection_E = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Collection<E>"));
|
| +};
|
| +Object.prototype.assert$Collection_Object = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Collection<Object>"));
|
| +};
|
| +Object.prototype.assert$Collection_Type = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Collection<Type>"));
|
| +};
|
| +Object.prototype.assert$Comparable = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Comparable"));
|
| +};
|
| +Object.prototype.assert$Compiler = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Compiler"));
|
| +};
|
| +Object.prototype.assert$ConcreteMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ConcreteMember"));
|
| +};
|
| +Object.prototype.assert$ConcreteType = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ConcreteType"));
|
| +};
|
| +Object.prototype.assert$Date = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Date"));
|
| +};
|
| +Object.prototype.assert$DeclaredIdentifier = function() {
|
| + $throw(new TypeError._internal$ctor(this, "DeclaredIdentifier"));
|
| +};
|
| +Object.prototype.assert$DefinedType = function() {
|
| + $throw(new TypeError._internal$ctor(this, "DefinedType"));
|
| +};
|
| +Object.prototype.assert$Definition = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Definition"));
|
| +};
|
| +Object.prototype.assert$DotExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "DotExpression"));
|
| +};
|
| +Object.prototype.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V = function() {
|
| + $throw(new TypeError._internal$ctor(this, "DoubleLinkedQueueEntry<KeyValuePair<K, V>>"));
|
| +};
|
| +Object.prototype.assert$Duration = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Duration"));
|
| +};
|
| +Object.prototype.assert$Element = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Element"));
|
| +};
|
| +Object.prototype.assert$Expression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Expression"));
|
| +};
|
| +Object.prototype.assert$ExpressionStatement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ExpressionStatement"));
|
| +};
|
| +Object.prototype.assert$FieldMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FieldMember"));
|
| +};
|
| +Object.prototype.assert$FunctionDefinition = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FunctionDefinition"));
|
| +};
|
| +Object.prototype.assert$FunctionElement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FunctionElement"));
|
| +};
|
| +Object.prototype.assert$FunctionExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FunctionExpression"));
|
| +};
|
| +Object.prototype.assert$FunctionType = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FunctionType"));
|
| +};
|
| +Object.prototype.assert$FunctionTypeReference = function() {
|
| + $throw(new TypeError._internal$ctor(this, "FunctionTypeReference"));
|
| +};
|
| +Object.prototype.assert$GenericTypeReference = function() {
|
| + $throw(new TypeError._internal$ctor(this, "GenericTypeReference"));
|
| +};
|
| +Object.prototype.assert$GlobalValue = function() {
|
| + $throw(new TypeError._internal$ctor(this, "GlobalValue"));
|
| +};
|
| +Object.prototype.assert$HBasicBlock = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HBasicBlock"));
|
| +};
|
| +Object.prototype.assert$HGraph = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HGraph"));
|
| +};
|
| +Object.prototype.assert$HInstruction = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HInstruction"));
|
| +};
|
| +Object.prototype.assert$HLiteral = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HLiteral"));
|
| +};
|
| +Object.prototype.assert$HLocal = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HLocal"));
|
| +};
|
| +Object.prototype.assert$HParameterValue = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HParameterValue"));
|
| +};
|
| +Object.prototype.assert$HPhi = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HPhi"));
|
| +};
|
| +Object.prototype.assert$HStatic = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HStatic"));
|
| +};
|
| +Object.prototype.assert$HTypeGuard = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HTypeGuard"));
|
| +};
|
| +Object.prototype.assert$HVisitor = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HVisitor"));
|
| +};
|
| +Object.prototype.assert$HashMapImplementation = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HashMapImplementation"));
|
| +};
|
| +Object.prototype.assert$HashSetImplementation = function() {
|
| + $throw(new TypeError._internal$ctor(this, "HashSetImplementation"));
|
| +};
|
| +Object.prototype.assert$Identifier = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Identifier"));
|
| +};
|
| +Object.prototype.assert$IndexExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "IndexExpression"));
|
| +};
|
| +Object.prototype.assert$InterpStack = function() {
|
| + $throw(new TypeError._internal$ctor(this, "InterpStack"));
|
| +};
|
| +Object.prototype.assert$Iterable = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Iterable"));
|
| +};
|
| +Object.prototype.assert$Iterator_T = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Iterator<T>"));
|
| +};
|
| +Object.prototype.assert$KeywordState = function() {
|
| + $throw(new TypeError._internal$ctor(this, "KeywordState"));
|
| +};
|
| +Object.prototype.assert$LambdaExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "LambdaExpression"));
|
| +};
|
| +Object.prototype.assert$Library = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Library"));
|
| +};
|
| +Object.prototype.assert$Link_Element = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Link<Element>"));
|
| +};
|
| +Object.prototype.assert$Link_Node = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Link<Node>"));
|
| +};
|
| +Object.prototype.assert$Link_Token = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Link<Token>"));
|
| +};
|
| +Object.prototype.assert$Link_Type = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Link<Type>"));
|
| +};
|
| +Object.prototype.assert$List = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List"));
|
| +};
|
| +Object.prototype.assert$ListFactory = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ListFactory"));
|
| +};
|
| +Object.prototype.assert$List_ArgumentNode = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<ArgumentNode>"));
|
| +};
|
| +Object.prototype.assert$List_Definition = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<Definition>"));
|
| +};
|
| +Object.prototype.assert$List_EvaluatedValue = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<EvaluatedValue>"));
|
| +};
|
| +Object.prototype.assert$List_GlobalValue = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<GlobalValue>"));
|
| +};
|
| +Object.prototype.assert$List_HInstruction = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<HInstruction>"));
|
| +};
|
| +Object.prototype.assert$List_Member = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<Member>"));
|
| +};
|
| +Object.prototype.assert$List_ParameterType = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<ParameterType>"));
|
| +};
|
| +Object.prototype.assert$List_String = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<String>"));
|
| +};
|
| +Object.prototype.assert$List_Token = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<Token>"));
|
| +};
|
| +Object.prototype.assert$List_Type = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<Type>"));
|
| +};
|
| +Object.prototype.assert$List_Value = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<Value>"));
|
| +};
|
| +Object.prototype.assert$List_int = function() {
|
| + $throw(new TypeError._internal$ctor(this, "List<int>"));
|
| +};
|
| +Object.prototype.assert$LiteralString = function() {
|
| + $throw(new TypeError._internal$ctor(this, "LiteralString"));
|
| +};
|
| +Object.prototype.assert$Map_Node$Element = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Map<Node, Element>"));
|
| +};
|
| +Object.prototype.assert$Map_String$Member = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Map<String, Member>"));
|
| +};
|
| +Object.prototype.assert$Member = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Member"));
|
| +};
|
| +Object.prototype.assert$MemberSet = function() {
|
| + $throw(new TypeError._internal$ctor(this, "MemberSet"));
|
| +};
|
| +Object.prototype.assert$MethodGenerator = function() {
|
| + $throw(new TypeError._internal$ctor(this, "MethodGenerator"));
|
| +};
|
| +Object.prototype.assert$MethodMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "MethodMember"));
|
| +};
|
| +Object.prototype.assert$NameTypeReference = function() {
|
| + $throw(new TypeError._internal$ctor(this, "NameTypeReference"));
|
| +};
|
| +Object.prototype.assert$Node = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Node"));
|
| +};
|
| +Object.prototype.assert$NodeList = function() {
|
| + $throw(new TypeError._internal$ctor(this, "NodeList"));
|
| +};
|
| +Object.prototype.assert$NumImplementation = function() {
|
| + $throw(new TypeError._internal$ctor(this, "NumImplementation"));
|
| +};
|
| +Object.prototype.assert$Operator = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Operator"));
|
| +};
|
| +Object.prototype.assert$Parameter = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Parameter"));
|
| +};
|
| +Object.prototype.assert$ParameterType = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ParameterType"));
|
| +};
|
| +Object.prototype.assert$ParenthesizedExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ParenthesizedExpression"));
|
| +};
|
| +Object.prototype.assert$Pattern = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Pattern"));
|
| +};
|
| +Object.prototype.assert$PostfixExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "PostfixExpression"));
|
| +};
|
| +Object.prototype.assert$PropertyMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "PropertyMember"));
|
| +};
|
| +Object.prototype.assert$SendSet = function() {
|
| + $throw(new TypeError._internal$ctor(this, "SendSet"));
|
| +};
|
| +Object.prototype.assert$SourceFile = function() {
|
| + $throw(new TypeError._internal$ctor(this, "SourceFile"));
|
| +};
|
| +Object.prototype.assert$SourceSpan = function() {
|
| + $throw(new TypeError._internal$ctor(this, "SourceSpan"));
|
| +};
|
| +Object.prototype.assert$SourceString = function() {
|
| + $throw(new TypeError._internal$ctor(this, "SourceString"));
|
| +};
|
| +Object.prototype.assert$Statement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Statement"));
|
| +};
|
| +Object.prototype.assert$StringBuffer = function() {
|
| + $throw(new TypeError._internal$ctor(this, "StringBuffer"));
|
| +};
|
| +Object.prototype.assert$Token = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Token"));
|
| +};
|
| +Object.prototype.assert$TreeVisitor = function() {
|
| + $throw(new TypeError._internal$ctor(this, "TreeVisitor"));
|
| +};
|
| +Object.prototype.assert$Type = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Type"));
|
| +};
|
| +Object.prototype.assert$TypeAnnotation = function() {
|
| + $throw(new TypeError._internal$ctor(this, "TypeAnnotation"));
|
| +};
|
| +Object.prototype.assert$TypeDefinition = function() {
|
| + $throw(new TypeError._internal$ctor(this, "TypeDefinition"));
|
| +};
|
| +Object.prototype.assert$TypeMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "TypeMember"));
|
| +};
|
| +Object.prototype.assert$TypeReference = function() {
|
| + $throw(new TypeError._internal$ctor(this, "TypeReference"));
|
| +};
|
| +Object.prototype.assert$Types = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Types"));
|
| +};
|
| +Object.prototype.assert$UnaryExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "UnaryExpression"));
|
| +};
|
| +Object.prototype.assert$Value = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Value"));
|
| +};
|
| +Object.prototype.assert$ValueSetNode = function() {
|
| + $throw(new TypeError._internal$ctor(this, "ValueSetNode"));
|
| +};
|
| +Object.prototype.assert$VarExpression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "VarExpression"));
|
| +};
|
| +Object.prototype.assert$VarFunctionStub = function() {
|
| + $throw(new TypeError._internal$ctor(this, "VarFunctionStub"));
|
| +};
|
| +Object.prototype.assert$VarMember = function() {
|
| + $throw(new TypeError._internal$ctor(this, "VarMember"));
|
| +};
|
| +Object.prototype.assert$VariableDefinitions = function() {
|
| + $throw(new TypeError._internal$ctor(this, "VariableDefinitions"));
|
| +};
|
| +Object.prototype.assert$VariableElement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "VariableElement"));
|
| +};
|
| +Object.prototype.assert$Visitor = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Visitor"));
|
| +};
|
| +Object.prototype.assert$lang_Element = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Element"));
|
| +};
|
| +Object.prototype.assert$lang_Expression = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Expression"));
|
| +};
|
| +Object.prototype.assert$lang_Identifier = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Identifier"));
|
| +};
|
| +Object.prototype.assert$lang_Node = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Node"));
|
| +};
|
| +Object.prototype.assert$lang_Statement = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Statement"));
|
| +};
|
| +Object.prototype.assert$lang_Token = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Token"));
|
| +};
|
| +Object.prototype.assert$lang_Type = function() {
|
| + $throw(new TypeError._internal$ctor(this, "Type"));
|
| +};
|
| Object.prototype.block$0 = function() {
|
| return this.noSuchMethod("block", []);
|
| };
|
| @@ -268,9 +654,6 @@ Object.prototype.genValue$2 = function($0, $1) {
|
| Object.prototype.generate$1 = function($0) {
|
| return this.noSuchMethod("generate", [$0]);
|
| };
|
| -Object.prototype.generateBody$2 = function($0, $1) {
|
| - return this.noSuchMethod("generateBody", [$0, $1]);
|
| -};
|
| Object.prototype.getBeginToken$0 = function() {
|
| return this.noSuchMethod("getBeginToken", []);
|
| };
|
| @@ -331,6 +714,12 @@ Object.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| Object.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| return this.noSuchMethod("invoke", [$0, $1, $2, $3, $4]);
|
| };
|
| +Object.prototype.is$List = function() {
|
| + return false;
|
| +};
|
| +Object.prototype.is$SourceString = function() {
|
| + return false;
|
| +};
|
| Object.prototype.isAssignable$1 = function($0) {
|
| return this.noSuchMethod("isAssignable", [$0]);
|
| };
|
| @@ -465,7 +854,7 @@ Object.prototype.writeDefinition$2 = function($0, $1) {
|
| };
|
| function $assert_bool(x) {
|
| if (x == null || typeof(x) == "boolean") return x;
|
| - throw new TypeError("'" + x + "' is not a bool.");
|
| + $throw(new TypeError._internal$ctor(this, "bool"))
|
| }
|
| // ********** Code for IllegalAccessException **************
|
| function IllegalAccessException() {
|
| @@ -600,11 +989,11 @@ Math.min = function(a, b) {
|
| }
|
| function $assert_num(x) {
|
| if (x == null || typeof(x) == "number") return x;
|
| - throw new TypeError("'" + x + "' is not a num.");
|
| + $throw(new TypeError._internal$ctor(this, "num"))
|
| }
|
| function $assert_String(x) {
|
| if (x == null || typeof(x) == "string") return x;
|
| - throw new TypeError("'" + x + "' is not a String.");
|
| + $throw(new TypeError._internal$ctor(this, "String"))
|
| }
|
| // ********** Code for Strings **************
|
| function Strings() {}
|
| @@ -625,86 +1014,85 @@ function print(obj) {
|
| }
|
| }
|
| function _toDartException(e) {
|
| - {
|
| - function attachStack(dartEx) {
|
| - // TODO(jmesserly): setting the stack property is not a long term solution.
|
| - var stack = e.stack;
|
| - // The stack contains the error message, and the stack is all that is
|
| - // printed (the exception's toString() is never called). Make the Dart
|
| - // exception's toString() be the dominant message.
|
| - if (typeof stack == 'string') {
|
| - var message = dartEx.toString();
|
| - if (/^(Type|Range)Error:/.test(stack)) {
|
| - // Indent JS message (it can be helpful) so new message stands out.
|
| - stack = ' (' + stack.substring(0, stack.indexOf('\n')) + ')\n' +
|
| - stack.substring(stack.indexOf('\n') + 1);
|
| + function attachStack(dartEx) {
|
| + // TODO(jmesserly): setting the stack property is not a long term solution.
|
| + var stack = e.stack;
|
| + // The stack contains the error message, and the stack is all that is
|
| + // printed (the exception's toString() is never called). Make the Dart
|
| + // exception's toString() be the dominant message.
|
| + if (typeof stack == 'string') {
|
| + var message = dartEx.toString();
|
| + if (/^(Type|Range)Error:/.test(stack)) {
|
| + // Indent JS message (it can be helpful) so new message stands out.
|
| + stack = ' (' + stack.substring(0, stack.indexOf('\n')) + ')\n' +
|
| + stack.substring(stack.indexOf('\n') + 1);
|
| + }
|
| + stack = message + '\n' + stack;
|
| + }
|
| + dartEx.stack = stack;
|
| + return dartEx;
|
| + }
|
| +
|
| + if (e instanceof TypeError) {
|
| + switch(e.type) {
|
| + case 'property_not_function':
|
| + case 'called_non_callable':
|
| + if (e.arguments[0] == null) {
|
| + return attachStack(new NullPointerException());
|
| + } else {
|
| + return attachStack(new ObjectNotClosureException());
|
| }
|
| - stack = message + '\n' + stack;
|
| - }
|
| - dartEx.stack = stack;
|
| - return dartEx;
|
| + break;
|
| + case 'non_object_property_call':
|
| + case 'non_object_property_load':
|
| + return attachStack(new NullPointerException());
|
| + break;
|
| + case 'undefined_method':
|
| + if (e.arguments[0] == 'call' || e.arguments[0] == 'apply') {
|
| + return attachStack(new ObjectNotClosureException());
|
| + } else {
|
| + // TODO(jmesserly): can this ever happen?
|
| + // sra: Yes, seen on '$add'.
|
| + return attachStack(new NoSuchMethodException('', e.arguments[0], []));
|
| + }
|
| + break;
|
| }
|
| -
|
| - if (e instanceof TypeError) {
|
| - switch(e.type) {
|
| - case 'property_not_function':
|
| - case 'called_non_callable':
|
| - if (e.arguments[0] == null) {
|
| - return attachStack(new NullPointerException());
|
| - } else {
|
| - return attachStack(new ObjectNotClosureException());
|
| - }
|
| - break;
|
| - case 'non_object_property_call':
|
| - case 'non_object_property_load':
|
| - return attachStack(new NullPointerException());
|
| - break;
|
| - case 'undefined_method':
|
| - if (e.arguments[0] == 'call' || e.arguments[0] == 'apply') {
|
| - return attachStack(new ObjectNotClosureException());
|
| - } else {
|
| - // TODO(jmesserly): can this ever happen?
|
| - // sra: Yes, seen on '$add'.
|
| - return attachStack(new NoSuchMethodException('', e.arguments[0], []));
|
| - }
|
| - break;
|
| - }
|
| - } else if (e instanceof RangeError) {
|
| - if (e.message.indexOf('call stack') >= 0) {
|
| - return attachStack(new StackOverflowException());
|
| - }
|
| + } else if (e instanceof RangeError) {
|
| + if (e.message.indexOf('call stack') >= 0) {
|
| + return attachStack(new StackOverflowException());
|
| }
|
| - return e;
|
| }
|
| + return e;
|
| }
|
| // ********** Library dart:coreimpl **************
|
| // ********** Code for ListFactory **************
|
| ListFactory = Array;
|
| -ListFactory.prototype.is$ListFactory = function(){return this;};
|
| -ListFactory.prototype.is$List = function(){return this;};
|
| -ListFactory.prototype.is$List_ArgumentNode = function(){return this;};
|
| -ListFactory.prototype.is$List_Definition = function(){return this;};
|
| -ListFactory.prototype.is$List_EvaluatedValue = function(){return this;};
|
| -ListFactory.prototype.is$List_GlobalValue = function(){return this;};
|
| -ListFactory.prototype.is$List_HInstruction = function(){return this;};
|
| -ListFactory.prototype.is$List_Member = function(){return this;};
|
| -ListFactory.prototype.is$List_ParameterType = function(){return this;};
|
| -ListFactory.prototype.is$List_String = function(){return this;};
|
| -ListFactory.prototype.is$List_Token = function(){return this;};
|
| -ListFactory.prototype.is$List_Type = function(){return this;};
|
| -ListFactory.prototype.is$List_Value = function(){return this;};
|
| -ListFactory.prototype.is$List_int = function(){return this;};
|
| -ListFactory.prototype.is$Collection_E = function(){return this;};
|
| -ListFactory.prototype.is$Collection_Object = function(){return this;};
|
| -ListFactory.prototype.is$Collection_Type = function(){return this;};
|
| -ListFactory.prototype.is$Iterable = function(){return this;};
|
| +ListFactory.prototype.assert$ListFactory = function(){return this};
|
| +ListFactory.prototype.is$List = function(){return true};
|
| +ListFactory.prototype.assert$List = function(){return this};
|
| +ListFactory.prototype.assert$List_ArgumentNode = function(){return this};
|
| +ListFactory.prototype.assert$List_Definition = function(){return this};
|
| +ListFactory.prototype.assert$List_EvaluatedValue = function(){return this};
|
| +ListFactory.prototype.assert$List_GlobalValue = function(){return this};
|
| +ListFactory.prototype.assert$List_HInstruction = function(){return this};
|
| +ListFactory.prototype.assert$List_Member = function(){return this};
|
| +ListFactory.prototype.assert$List_ParameterType = function(){return this};
|
| +ListFactory.prototype.assert$List_String = function(){return this};
|
| +ListFactory.prototype.assert$List_Token = function(){return this};
|
| +ListFactory.prototype.assert$List_Type = function(){return this};
|
| +ListFactory.prototype.assert$List_Value = function(){return this};
|
| +ListFactory.prototype.assert$List_int = function(){return this};
|
| +ListFactory.prototype.assert$Collection_E = function(){return this};
|
| +ListFactory.prototype.assert$Collection_Object = function(){return this};
|
| +ListFactory.prototype.assert$Collection_Type = function(){return this};
|
| +ListFactory.prototype.assert$Iterable = function(){return this};
|
| ListFactory.ListFactory$from$factory = function(other) {
|
| var list = [];
|
| for (var $i = other.iterator(); $i.hasNext$0(); ) {
|
| var e = $i.next$0();
|
| list.add(e);
|
| }
|
| - return (list && list.is$ListFactory());
|
| + return (list == null ? null : list.assert$ListFactory());
|
| }
|
| ListFactory.prototype.add = function(value) {
|
| this.push(value);
|
| @@ -752,7 +1140,7 @@ ListFactory.prototype.iterator = function() {
|
| }
|
| ListFactory.prototype.add$1 = ListFactory.prototype.add;
|
| ListFactory.prototype.addAll$1 = function($0) {
|
| - return this.addAll(($0 && $0.is$Collection_E()));
|
| + return this.addAll(($0 == null ? null : $0.assert$Collection_E()));
|
| };
|
| ListFactory.prototype.every$1 = function($0) {
|
| return this.every(to$call$1($0));
|
| @@ -792,7 +1180,7 @@ function ListIterator(array) {
|
| this._pos = 0;
|
| // Initializers done
|
| }
|
| -ListIterator.prototype.is$Iterator_T = function(){return this;};
|
| +ListIterator.prototype.assert$Iterator_T = function(){return this};
|
| ListIterator.prototype.hasNext = function() {
|
| return this._array.length > this._pos;
|
| }
|
| @@ -875,7 +1263,7 @@ ImmutableList.prototype.toString = function() {
|
| }
|
| ImmutableList.prototype.add$1 = ImmutableList.prototype.add;
|
| ImmutableList.prototype.addAll$1 = function($0) {
|
| - return this.addAll(($0 && $0.is$Collection_E()));
|
| + return this.addAll(($0 == null ? null : $0.assert$Collection_E()));
|
| };
|
| ImmutableList.prototype.removeLast$0 = ImmutableList.prototype.removeLast;
|
| ImmutableList.prototype.sort$1 = function($0) {
|
| @@ -891,8 +1279,8 @@ function ImmutableMap(keyValuePairs) {
|
| this._internal.$setindex(keyValuePairs.$index(i), keyValuePairs.$index(i + 1));
|
| }
|
| }
|
| -ImmutableMap.prototype.is$Map_Node$Element = function(){return this;};
|
| -ImmutableMap.prototype.is$Map_String$Member = function(){return this;};
|
| +ImmutableMap.prototype.assert$Map_Node$Element = function(){return this};
|
| +ImmutableMap.prototype.assert$Map_String$Member = function(){return this};
|
| ImmutableMap.prototype.$index = function(key) {
|
| return this._internal.$index(key);
|
| }
|
| @@ -934,8 +1322,8 @@ ImmutableMap.prototype.getValues$0 = ImmutableMap.prototype.getValues;
|
| ImmutableMap.prototype.isEmpty$0 = ImmutableMap.prototype.isEmpty;
|
| // ********** Code for NumImplementation **************
|
| NumImplementation = Number;
|
| -NumImplementation.prototype.is$NumImplementation = function(){return this;};
|
| -NumImplementation.prototype.is$Comparable = function(){return this;};
|
| +NumImplementation.prototype.assert$NumImplementation = function(){return this};
|
| +NumImplementation.prototype.assert$Comparable = function(){return this};
|
| NumImplementation.prototype.isNaN = function() {
|
| return isNaN(this);
|
| }
|
| @@ -987,7 +1375,7 @@ NumImplementation.prototype.compareTo = function(other) {
|
| }
|
| }
|
| NumImplementation.prototype.compareTo$1 = function($0) {
|
| - return this.compareTo(($0 && $0.is$NumImplementation()));
|
| + return this.compareTo(($0 == null ? null : $0.assert$NumImplementation()));
|
| };
|
| NumImplementation.prototype.hashCode$0 = NumImplementation.prototype.hashCode;
|
| // ********** Code for ExceptionImplementation **************
|
| @@ -1008,16 +1396,16 @@ function HashMapImplementation() {
|
| this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/);
|
| this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/);
|
| }
|
| -HashMapImplementation.prototype.is$HashMapImplementation = function(){return this;};
|
| -HashMapImplementation.prototype.is$Map_Node$Element = function(){return this;};
|
| -HashMapImplementation.prototype.is$Map_String$Member = function(){return this;};
|
| +HashMapImplementation.prototype.assert$HashMapImplementation = function(){return this};
|
| +HashMapImplementation.prototype.assert$Map_Node$Element = function(){return this};
|
| +HashMapImplementation.prototype.assert$Map_String$Member = function(){return this};
|
| HashMapImplementation.HashMapImplementation$from$factory = function(other) {
|
| var result = new HashMapImplementation();
|
| other.forEach((function (key, value) {
|
| result.$setindex(key, value);
|
| })
|
| );
|
| - return (result && result.is$HashMapImplementation());
|
| + return (result == null ? null : result.assert$HashMapImplementation());
|
| }
|
| HashMapImplementation._computeLoadLimit = function(capacity) {
|
| return $truncdiv((capacity * 3), 4);
|
| @@ -1194,8 +1582,8 @@ function HashMapImplementation_E$E() {
|
| this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/);
|
| }
|
| $inherits(HashMapImplementation_E$E, HashMapImplementation);
|
| -HashMapImplementation_E$E.prototype.is$Map_Node$Element = function(){return this;};
|
| -HashMapImplementation_E$E.prototype.is$Map_String$Member = function(){return this;};
|
| +HashMapImplementation_E$E.prototype.assert$Map_Node$Element = function(){return this};
|
| +HashMapImplementation_E$E.prototype.assert$Map_String$Member = function(){return this};
|
| HashMapImplementation_E$E._computeLoadLimit = function(capacity) {
|
| return $truncdiv((capacity * 3), 4);
|
| }
|
| @@ -1331,55 +1719,55 @@ HashMapImplementation_E$E.prototype.containsKey = function(key) {
|
| // ********** Code for HashMapImplementation_Element$HInstruction **************
|
| function HashMapImplementation_Element$HInstruction() {}
|
| $inherits(HashMapImplementation_Element$HInstruction, HashMapImplementation);
|
| -HashMapImplementation_Element$HInstruction.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_Element$HInstruction.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_Element$HInstruction.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_Element$HInstruction.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_Element$HLocal **************
|
| function HashMapImplementation_Element$HLocal() {}
|
| $inherits(HashMapImplementation_Element$HLocal, HashMapImplementation);
|
| -HashMapImplementation_Element$HLocal.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_Element$HLocal.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_Element$HLocal.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_Element$HLocal.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V **************
|
| function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {}
|
| $inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashMapImplementation);
|
| -HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_String$EvaluatedValue **************
|
| function HashMapImplementation_String$EvaluatedValue() {}
|
| $inherits(HashMapImplementation_String$EvaluatedValue, HashMapImplementation);
|
| -HashMapImplementation_String$EvaluatedValue.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_String$EvaluatedValue.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_String$EvaluatedValue.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_String$EvaluatedValue.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_String$int **************
|
| function HashMapImplementation_String$int() {}
|
| $inherits(HashMapImplementation_String$int, HashMapImplementation);
|
| -HashMapImplementation_String$int.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_String$int.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_String$int.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_String$int.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_int$HInstruction **************
|
| function HashMapImplementation_int$HInstruction() {}
|
| $inherits(HashMapImplementation_int$HInstruction, HashMapImplementation);
|
| -HashMapImplementation_int$HInstruction.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_int$HInstruction.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_int$HInstruction.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_int$HInstruction.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashMapImplementation_int$String **************
|
| function HashMapImplementation_int$String() {}
|
| $inherits(HashMapImplementation_int$String, HashMapImplementation);
|
| -HashMapImplementation_int$String.prototype.is$Map_Node$Element = false;
|
| -HashMapImplementation_int$String.prototype.is$Map_String$Member = false;
|
| +HashMapImplementation_int$String.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +HashMapImplementation_int$String.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for HashSetImplementation **************
|
| function HashSetImplementation() {
|
| // Initializers done
|
| this._backingMap = new HashMapImplementation_E$E();
|
| }
|
| -HashSetImplementation.prototype.is$HashSetImplementation = function(){return this;};
|
| -HashSetImplementation.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation.prototype.is$Collection_Type = function(){return this;};
|
| -HashSetImplementation.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation.prototype.assert$HashSetImplementation = function(){return this};
|
| +HashSetImplementation.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation.prototype.assert$Collection_Type = function(){return this};
|
| +HashSetImplementation.prototype.assert$Iterable = function(){return this};
|
| HashSetImplementation.HashSetImplementation$from$factory = function(other) {
|
| var set = new HashSetImplementation();
|
| for (var $i = other.iterator(); $i.hasNext$0(); ) {
|
| var e = $i.next$0();
|
| set.add(e);
|
| }
|
| - return (set && set.is$HashSetImplementation());
|
| + return (set == null ? null : set.assert$HashSetImplementation());
|
| }
|
| HashSetImplementation.prototype.clear = function() {
|
| this._backingMap.clear();
|
| @@ -1438,7 +1826,7 @@ HashSetImplementation.prototype.iterator = function() {
|
| }
|
| HashSetImplementation.prototype.add$1 = HashSetImplementation.prototype.add;
|
| HashSetImplementation.prototype.addAll$1 = function($0) {
|
| - return this.addAll(($0 && $0.is$Collection_E()));
|
| + return this.addAll(($0 == null ? null : $0.assert$Collection_E()));
|
| };
|
| HashSetImplementation.prototype.contains$1 = HashSetImplementation.prototype.contains;
|
| HashSetImplementation.prototype.every$1 = function($0) {
|
| @@ -1458,45 +1846,45 @@ HashSetImplementation.prototype.some$1 = function($0) {
|
| // ********** Code for HashSetImplementation_E **************
|
| function HashSetImplementation_E() {}
|
| $inherits(HashSetImplementation_E, HashSetImplementation);
|
| -HashSetImplementation_E.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_E.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_E.prototype.is$Collection_Type = function(){return this;};
|
| -HashSetImplementation_E.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_E.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_E.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_E.prototype.assert$Collection_Type = function(){return this};
|
| +HashSetImplementation_E.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetImplementation_HInstruction **************
|
| function HashSetImplementation_HInstruction() {}
|
| $inherits(HashSetImplementation_HInstruction, HashSetImplementation);
|
| -HashSetImplementation_HInstruction.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_HInstruction.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_HInstruction.prototype.is$Collection_Type = false;
|
| -HashSetImplementation_HInstruction.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_HInstruction.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_HInstruction.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_HInstruction.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +HashSetImplementation_HInstruction.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetImplementation_HPhi **************
|
| function HashSetImplementation_HPhi() {}
|
| $inherits(HashSetImplementation_HPhi, HashSetImplementation);
|
| -HashSetImplementation_HPhi.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_HPhi.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_HPhi.prototype.is$Collection_Type = false;
|
| -HashSetImplementation_HPhi.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_HPhi.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_HPhi.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_HPhi.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +HashSetImplementation_HPhi.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetImplementation_String **************
|
| function HashSetImplementation_String() {}
|
| $inherits(HashSetImplementation_String, HashSetImplementation);
|
| -HashSetImplementation_String.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_String.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_String.prototype.is$Collection_Type = false;
|
| -HashSetImplementation_String.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_String.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_String.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_String.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +HashSetImplementation_String.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetImplementation_lang_Type **************
|
| function HashSetImplementation_lang_Type() {}
|
| $inherits(HashSetImplementation_lang_Type, HashSetImplementation);
|
| -HashSetImplementation_lang_Type.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_lang_Type.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_lang_Type.prototype.is$Collection_Type = function(){return this;};
|
| -HashSetImplementation_lang_Type.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_lang_Type.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_lang_Type.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_lang_Type.prototype.assert$Collection_Type = function(){return this};
|
| +HashSetImplementation_lang_Type.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetImplementation_int **************
|
| function HashSetImplementation_int() {}
|
| $inherits(HashSetImplementation_int, HashSetImplementation);
|
| -HashSetImplementation_int.prototype.is$Collection_E = function(){return this;};
|
| -HashSetImplementation_int.prototype.is$Collection_Object = function(){return this;};
|
| -HashSetImplementation_int.prototype.is$Collection_Type = false;
|
| -HashSetImplementation_int.prototype.is$Iterable = function(){return this;};
|
| +HashSetImplementation_int.prototype.assert$Collection_E = function(){return this};
|
| +HashSetImplementation_int.prototype.assert$Collection_Object = function(){return this};
|
| +HashSetImplementation_int.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +HashSetImplementation_int.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for HashSetIterator **************
|
| function HashSetIterator(set_) {
|
| this._nextValidIndex = -1;
|
| @@ -1504,7 +1892,7 @@ function HashSetIterator(set_) {
|
| // Initializers done
|
| this._advance();
|
| }
|
| -HashSetIterator.prototype.is$Iterator_T = function(){return this;};
|
| +HashSetIterator.prototype.assert$Iterator_T = function(){return this};
|
| HashSetIterator.prototype.hasNext = function() {
|
| if (this._nextValidIndex >= this._entries.length) return false;
|
| if (this._entries.$index(this._nextValidIndex) === const$1/*HashMapImplementation._DELETED_KEY*/) {
|
| @@ -1540,7 +1928,7 @@ function HashSetIterator_E(set_) {
|
| this._advance();
|
| }
|
| $inherits(HashSetIterator_E, HashSetIterator);
|
| -HashSetIterator_E.prototype.is$Iterator_T = function(){return this;};
|
| +HashSetIterator_E.prototype.assert$Iterator_T = function(){return this};
|
| HashSetIterator_E.prototype._advance = function() {
|
| var length = this._entries.length;
|
| var entry;
|
| @@ -1576,8 +1964,8 @@ function LinkedHashMapImplementation() {
|
| this._map = new HashMapImplementation();
|
| this._list = new DoubleLinkedQueue_KeyValuePair_K$V();
|
| }
|
| -LinkedHashMapImplementation.prototype.is$Map_Node$Element = function(){return this;};
|
| -LinkedHashMapImplementation.prototype.is$Map_String$Member = function(){return this;};
|
| +LinkedHashMapImplementation.prototype.assert$Map_Node$Element = function(){return this};
|
| +LinkedHashMapImplementation.prototype.assert$Map_String$Member = function(){return this};
|
| LinkedHashMapImplementation.prototype.$setindex = function(key, value) {
|
| if (this._map.containsKey(key)) {
|
| this._map.$index(key).get$element().set$value(value);
|
| @@ -1589,13 +1977,13 @@ LinkedHashMapImplementation.prototype.$setindex = function(key, value) {
|
| }
|
| LinkedHashMapImplementation.prototype.$index = function(key) {
|
| var $0;
|
| - var entry = (($0 = this._map.$index(key)) && $0.is$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| + var entry = (($0 = this._map.$index(key)) == null ? null : $0.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| if (entry == null) return null;
|
| return entry.get$element().get$value();
|
| }
|
| LinkedHashMapImplementation.prototype.remove = function(key) {
|
| var $0;
|
| - var entry = (($0 = this._map.remove(key)) && $0.is$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| + var entry = (($0 = this._map.remove(key)) == null ? null : $0.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| if (entry == null) return null;
|
| entry.remove();
|
| return entry.get$element().get$value();
|
| @@ -1655,24 +2043,24 @@ LinkedHashMapImplementation.prototype.isEmpty$0 = LinkedHashMapImplementation.pr
|
| // ********** Code for LinkedHashMapImplementation_Element$String **************
|
| function LinkedHashMapImplementation_Element$String() {}
|
| $inherits(LinkedHashMapImplementation_Element$String, LinkedHashMapImplementation);
|
| -LinkedHashMapImplementation_Element$String.prototype.is$Map_Node$Element = false;
|
| -LinkedHashMapImplementation_Element$String.prototype.is$Map_String$Member = false;
|
| +LinkedHashMapImplementation_Element$String.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +LinkedHashMapImplementation_Element$String.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for LinkedHashMapImplementation_Node$Element **************
|
| function LinkedHashMapImplementation_Node$Element() {}
|
| $inherits(LinkedHashMapImplementation_Node$Element, LinkedHashMapImplementation);
|
| -LinkedHashMapImplementation_Node$Element.prototype.is$Map_Node$Element = function(){return this;};
|
| -LinkedHashMapImplementation_Node$Element.prototype.is$Map_String$Member = false;
|
| +LinkedHashMapImplementation_Node$Element.prototype.assert$Map_Node$Element = function(){return this};
|
| +LinkedHashMapImplementation_Node$Element.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for LinkedHashMapImplementation_String$Keyword **************
|
| function LinkedHashMapImplementation_String$Keyword() {}
|
| $inherits(LinkedHashMapImplementation_String$Keyword, LinkedHashMapImplementation);
|
| -LinkedHashMapImplementation_String$Keyword.prototype.is$Map_Node$Element = false;
|
| -LinkedHashMapImplementation_String$Keyword.prototype.is$Map_String$Member = false;
|
| +LinkedHashMapImplementation_String$Keyword.prototype.assert$Map_Node$Element = function(){$throw(new TypeError._internal$ctor(this, "Map<Node, Element>"))};
|
| +LinkedHashMapImplementation_String$Keyword.prototype.assert$Map_String$Member = function(){$throw(new TypeError._internal$ctor(this, "Map<String, Member>"))};
|
| // ********** Code for DoubleLinkedQueueEntry **************
|
| function DoubleLinkedQueueEntry(e) {
|
| // Initializers done
|
| this._element = e;
|
| }
|
| -DoubleLinkedQueueEntry.prototype.is$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this;};
|
| +DoubleLinkedQueueEntry.prototype.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this};
|
| DoubleLinkedQueueEntry.prototype._link = function(p, n) {
|
| this._next = n;
|
| this._previous = p;
|
| @@ -1704,7 +2092,7 @@ function DoubleLinkedQueueEntry_E(e) {
|
| this._element = e;
|
| }
|
| $inherits(DoubleLinkedQueueEntry_E, DoubleLinkedQueueEntry);
|
| -DoubleLinkedQueueEntry_E.prototype.is$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this;};
|
| +DoubleLinkedQueueEntry_E.prototype.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this};
|
| DoubleLinkedQueueEntry_E.prototype._link = function(p, n) {
|
| this._next = n;
|
| this._previous = p;
|
| @@ -1733,7 +2121,7 @@ function DoubleLinkedQueueEntry_KeyValuePair_K$V(e) {
|
| this._element = e;
|
| }
|
| $inherits(DoubleLinkedQueueEntry_KeyValuePair_K$V, DoubleLinkedQueueEntry);
|
| -DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.is$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this;};
|
| +DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V = function(){return this};
|
| DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._link = function(p, n) {
|
| this._next = n;
|
| this._previous = p;
|
| @@ -1755,7 +2143,7 @@ DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._asNonSentinelEntry = function
|
| }
|
| DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.previousEntry = function() {
|
| var $0;
|
| - return (($0 = this._previous._asNonSentinelEntry()) && $0.is$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| + return (($0 = this._previous._asNonSentinelEntry()) == null ? null : $0.assert$DoubleLinkedQueueEntry_KeyValuePair_K$V());
|
| }
|
| // ********** Code for _DoubleLinkedQueueEntrySentinel **************
|
| function _DoubleLinkedQueueEntrySentinel() {
|
| @@ -1792,10 +2180,10 @@ function DoubleLinkedQueue() {
|
| // Initializers done
|
| this._sentinel = new _DoubleLinkedQueueEntrySentinel_E();
|
| }
|
| -DoubleLinkedQueue.prototype.is$Collection_E = function(){return this;};
|
| -DoubleLinkedQueue.prototype.is$Collection_Object = function(){return this;};
|
| -DoubleLinkedQueue.prototype.is$Collection_Type = function(){return this;};
|
| -DoubleLinkedQueue.prototype.is$Iterable = function(){return this;};
|
| +DoubleLinkedQueue.prototype.assert$Collection_E = function(){return this};
|
| +DoubleLinkedQueue.prototype.assert$Collection_Object = function(){return this};
|
| +DoubleLinkedQueue.prototype.assert$Collection_Type = function(){return this};
|
| +DoubleLinkedQueue.prototype.assert$Iterable = function(){return this};
|
| DoubleLinkedQueue.prototype.addLast = function(value) {
|
| this._sentinel.prepend(value);
|
| }
|
| @@ -1875,7 +2263,7 @@ DoubleLinkedQueue.prototype.iterator = function() {
|
| }
|
| DoubleLinkedQueue.prototype.add$1 = DoubleLinkedQueue.prototype.add;
|
| DoubleLinkedQueue.prototype.addAll$1 = function($0) {
|
| - return this.addAll(($0 && $0.is$Collection_E()));
|
| + return this.addAll(($0 == null ? null : $0.assert$Collection_E()));
|
| };
|
| DoubleLinkedQueue.prototype.every$1 = function($0) {
|
| return this.every(to$call$1($0));
|
| @@ -1896,34 +2284,34 @@ DoubleLinkedQueue.prototype.some$1 = function($0) {
|
| // ********** Code for DoubleLinkedQueue_ClassElement **************
|
| function DoubleLinkedQueue_ClassElement() {}
|
| $inherits(DoubleLinkedQueue_ClassElement, DoubleLinkedQueue);
|
| -DoubleLinkedQueue_ClassElement.prototype.is$Collection_E = function(){return this;};
|
| -DoubleLinkedQueue_ClassElement.prototype.is$Collection_Object = function(){return this;};
|
| -DoubleLinkedQueue_ClassElement.prototype.is$Collection_Type = false;
|
| -DoubleLinkedQueue_ClassElement.prototype.is$Iterable = function(){return this;};
|
| +DoubleLinkedQueue_ClassElement.prototype.assert$Collection_E = function(){return this};
|
| +DoubleLinkedQueue_ClassElement.prototype.assert$Collection_Object = function(){return this};
|
| +DoubleLinkedQueue_ClassElement.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +DoubleLinkedQueue_ClassElement.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for DoubleLinkedQueue_E **************
|
| function DoubleLinkedQueue_E() {}
|
| $inherits(DoubleLinkedQueue_E, DoubleLinkedQueue);
|
| -DoubleLinkedQueue_E.prototype.is$Collection_E = function(){return this;};
|
| -DoubleLinkedQueue_E.prototype.is$Collection_Object = function(){return this;};
|
| -DoubleLinkedQueue_E.prototype.is$Collection_Type = function(){return this;};
|
| -DoubleLinkedQueue_E.prototype.is$Iterable = function(){return this;};
|
| +DoubleLinkedQueue_E.prototype.assert$Collection_E = function(){return this};
|
| +DoubleLinkedQueue_E.prototype.assert$Collection_Object = function(){return this};
|
| +DoubleLinkedQueue_E.prototype.assert$Collection_Type = function(){return this};
|
| +DoubleLinkedQueue_E.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for DoubleLinkedQueue_Element **************
|
| function DoubleLinkedQueue_Element() {}
|
| $inherits(DoubleLinkedQueue_Element, DoubleLinkedQueue);
|
| -DoubleLinkedQueue_Element.prototype.is$Collection_E = function(){return this;};
|
| -DoubleLinkedQueue_Element.prototype.is$Collection_Object = function(){return this;};
|
| -DoubleLinkedQueue_Element.prototype.is$Collection_Type = false;
|
| -DoubleLinkedQueue_Element.prototype.is$Iterable = function(){return this;};
|
| +DoubleLinkedQueue_Element.prototype.assert$Collection_E = function(){return this};
|
| +DoubleLinkedQueue_Element.prototype.assert$Collection_Object = function(){return this};
|
| +DoubleLinkedQueue_Element.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +DoubleLinkedQueue_Element.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for DoubleLinkedQueue_KeyValuePair_K$V **************
|
| function DoubleLinkedQueue_KeyValuePair_K$V() {
|
| // Initializers done
|
| this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V();
|
| }
|
| $inherits(DoubleLinkedQueue_KeyValuePair_K$V, DoubleLinkedQueue);
|
| -DoubleLinkedQueue_KeyValuePair_K$V.prototype.is$Collection_E = function(){return this;};
|
| -DoubleLinkedQueue_KeyValuePair_K$V.prototype.is$Collection_Object = function(){return this;};
|
| -DoubleLinkedQueue_KeyValuePair_K$V.prototype.is$Collection_Type = false;
|
| -DoubleLinkedQueue_KeyValuePair_K$V.prototype.is$Iterable = function(){return this;};
|
| +DoubleLinkedQueue_KeyValuePair_K$V.prototype.assert$Collection_E = function(){return this};
|
| +DoubleLinkedQueue_KeyValuePair_K$V.prototype.assert$Collection_Object = function(){return this};
|
| +DoubleLinkedQueue_KeyValuePair_K$V.prototype.assert$Collection_Type = function(){$throw(new TypeError._internal$ctor(this, "Collection<Type>"))};
|
| +DoubleLinkedQueue_KeyValuePair_K$V.prototype.assert$Iterable = function(){return this};
|
| DoubleLinkedQueue_KeyValuePair_K$V.prototype.addLast = function(value) {
|
| this._sentinel.prepend(value);
|
| }
|
| @@ -1944,7 +2332,7 @@ function _DoubleLinkedQueueIterator(_sentinel) {
|
| // Initializers done
|
| this._currentEntry = this._sentinel;
|
| }
|
| -_DoubleLinkedQueueIterator.prototype.is$Iterator_T = function(){return this;};
|
| +_DoubleLinkedQueueIterator.prototype.assert$Iterator_T = function(){return this};
|
| _DoubleLinkedQueueIterator.prototype.hasNext = function() {
|
| return this._currentEntry._next !== this._sentinel;
|
| }
|
| @@ -1964,7 +2352,7 @@ function _DoubleLinkedQueueIterator_E(_sentinel) {
|
| this._currentEntry = this._sentinel;
|
| }
|
| $inherits(_DoubleLinkedQueueIterator_E, _DoubleLinkedQueueIterator);
|
| -_DoubleLinkedQueueIterator_E.prototype.is$Iterator_T = function(){return this;};
|
| +_DoubleLinkedQueueIterator_E.prototype.assert$Iterator_T = function(){return this};
|
| // ********** Code for StopwatchImplementation **************
|
| function StopwatchImplementation() {
|
| this._start = null;
|
| @@ -2009,7 +2397,7 @@ function StringBufferImpl(content) {
|
| this.clear();
|
| this.add(content);
|
| }
|
| -StringBufferImpl.prototype.is$StringBuffer = function(){return this;};
|
| +StringBufferImpl.prototype.assert$StringBuffer = function(){return this};
|
| StringBufferImpl.prototype.get$length = function() {
|
| return this._length;
|
| }
|
| @@ -2048,7 +2436,7 @@ StringBufferImpl.prototype.toString = function() {
|
| }
|
| StringBufferImpl.prototype.add$1 = StringBufferImpl.prototype.add;
|
| StringBufferImpl.prototype.addAll$1 = function($0) {
|
| - return this.addAll(($0 && $0.is$Collection_Object()));
|
| + return this.addAll(($0 == null ? null : $0.assert$Collection_Object()));
|
| };
|
| StringBufferImpl.prototype.isEmpty$0 = StringBufferImpl.prototype.isEmpty;
|
| StringBufferImpl.prototype.toString$0 = StringBufferImpl.prototype.toString;
|
| @@ -2074,8 +2462,8 @@ StringBase.concatAll = function(strings) {
|
| }
|
| // ********** Code for StringImplementation **************
|
| StringImplementation = String;
|
| -StringImplementation.prototype.is$Pattern = function(){return this;};
|
| -StringImplementation.prototype.is$Comparable = function(){return this;};
|
| +StringImplementation.prototype.assert$Pattern = function(){return this};
|
| +StringImplementation.prototype.assert$Comparable = function(){return this};
|
| StringImplementation.prototype.endsWith = function(other) {
|
| if (other.length > this.length) return false;
|
| return other == this.substring(this.length - other.length);
|
| @@ -2133,10 +2521,10 @@ StringImplementation.prototype.indexOf$2 = function($0, $1) {
|
| };
|
| StringImplementation.prototype.isEmpty$0 = StringImplementation.prototype.isEmpty;
|
| StringImplementation.prototype.replaceAll$2 = function($0, $1) {
|
| - return this.replaceAll(($0 && $0.is$Pattern()), $assert_String($1));
|
| + return this.replaceAll(($0 == null ? null : $0.assert$Pattern()), $assert_String($1));
|
| };
|
| StringImplementation.prototype.replaceFirst$2 = function($0, $1) {
|
| - return this.replaceFirst(($0 && $0.is$Pattern()), $assert_String($1));
|
| + return this.replaceFirst(($0 == null ? null : $0.assert$Pattern()), $assert_String($1));
|
| };
|
| StringImplementation.prototype.startsWith$1 = function($0) {
|
| return this.startsWith($assert_String($0));
|
| @@ -2191,8 +2579,8 @@ DateImplementation.now$ctor = function() {
|
| this._asJs();
|
| }
|
| DateImplementation.now$ctor.prototype = DateImplementation.prototype;
|
| -DateImplementation.prototype.is$Date = function(){return this;};
|
| -DateImplementation.prototype.is$Comparable = function(){return this;};
|
| +DateImplementation.prototype.assert$Date = function(){return this};
|
| +DateImplementation.prototype.assert$Comparable = function(){return this};
|
| DateImplementation.prototype.get$value = function() { return this.value; };
|
| DateImplementation.prototype.get$timeZone = function() { return this.timeZone; };
|
| DateImplementation.prototype.$eq = function(other) {
|
| @@ -2263,10 +2651,10 @@ DateImplementation.prototype._asJs = function() {
|
| return this.date;
|
| }
|
| DateImplementation.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$Duration()));
|
| + return this.add(($0 == null ? null : $0.assert$Duration()));
|
| };
|
| DateImplementation.prototype.compareTo$1 = function($0) {
|
| - return this.compareTo(($0 && $0.is$Date()));
|
| + return this.compareTo(($0 == null ? null : $0.assert$Date()));
|
| };
|
| DateImplementation.prototype.toString$0 = DateImplementation.prototype.toString;
|
| // ********** Code for TimeZoneImplementation **************
|
| @@ -2317,7 +2705,7 @@ function joinPaths(path1, path2) {
|
| pieces.add$1(piece);
|
| }
|
| }
|
| - return Strings.join((pieces && pieces.is$List_String()), '/');
|
| + return Strings.join((pieces == null ? null : pieces.assert$List_String()), '/');
|
| }
|
| function dirname(path) {
|
| var lastSlash = path.lastIndexOf('/', path.length);
|
| @@ -2370,11 +2758,11 @@ LinkFactory.Link$factory = function(head, tail) {
|
| function LinkTail() {
|
| // Initializers done
|
| }
|
| -LinkTail.prototype.is$Link_Element = function(){return this;};
|
| -LinkTail.prototype.is$Link_Node = function(){return this;};
|
| -LinkTail.prototype.is$Link_Token = function(){return this;};
|
| -LinkTail.prototype.is$Link_Type = function(){return this;};
|
| -LinkTail.prototype.is$Iterable = function(){return this;};
|
| +LinkTail.prototype.assert$Link_Element = function(){return this};
|
| +LinkTail.prototype.assert$Link_Node = function(){return this};
|
| +LinkTail.prototype.assert$Link_Token = function(){return this};
|
| +LinkTail.prototype.assert$Link_Type = function(){return this};
|
| +LinkTail.prototype.assert$Iterable = function(){return this};
|
| LinkTail.prototype.get$head = function() {
|
| return null;
|
| }
|
| @@ -2402,62 +2790,62 @@ LinkTail.prototype.isEmpty = function() {
|
| LinkTail.prototype.isEmpty$0 = LinkTail.prototype.isEmpty;
|
| LinkTail.prototype.iterator$0 = LinkTail.prototype.iterator;
|
| LinkTail.prototype.printOn$1 = function($0) {
|
| - return this.printOn(($0 && $0.is$StringBuffer()));
|
| + return this.printOn(($0 == null ? null : $0.assert$StringBuffer()));
|
| };
|
| LinkTail.prototype.toString$0 = LinkTail.prototype.toString;
|
| // ********** Code for LinkTail_Element **************
|
| function LinkTail_Element() {}
|
| $inherits(LinkTail_Element, LinkTail);
|
| -LinkTail_Element.prototype.is$Link_Element = function(){return this;};
|
| -LinkTail_Element.prototype.is$Link_Node = false;
|
| -LinkTail_Element.prototype.is$Link_Token = false;
|
| -LinkTail_Element.prototype.is$Link_Type = false;
|
| -LinkTail_Element.prototype.is$Iterable = function(){return this;};
|
| +LinkTail_Element.prototype.assert$Link_Element = function(){return this};
|
| +LinkTail_Element.prototype.assert$Link_Node = function(){$throw(new TypeError._internal$ctor(this, "Link<Node>"))};
|
| +LinkTail_Element.prototype.assert$Link_Token = function(){$throw(new TypeError._internal$ctor(this, "Link<Token>"))};
|
| +LinkTail_Element.prototype.assert$Link_Type = function(){$throw(new TypeError._internal$ctor(this, "Link<Type>"))};
|
| +LinkTail_Element.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkTail_Node **************
|
| function LinkTail_Node() {}
|
| $inherits(LinkTail_Node, LinkTail);
|
| -LinkTail_Node.prototype.is$Link_Element = false;
|
| -LinkTail_Node.prototype.is$Link_Node = function(){return this;};
|
| -LinkTail_Node.prototype.is$Link_Token = false;
|
| -LinkTail_Node.prototype.is$Link_Type = false;
|
| -LinkTail_Node.prototype.is$Iterable = function(){return this;};
|
| +LinkTail_Node.prototype.assert$Link_Element = function(){$throw(new TypeError._internal$ctor(this, "Link<Element>"))};
|
| +LinkTail_Node.prototype.assert$Link_Node = function(){return this};
|
| +LinkTail_Node.prototype.assert$Link_Token = function(){$throw(new TypeError._internal$ctor(this, "Link<Token>"))};
|
| +LinkTail_Node.prototype.assert$Link_Type = function(){$throw(new TypeError._internal$ctor(this, "Link<Type>"))};
|
| +LinkTail_Node.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkTail_T **************
|
| function LinkTail_T() {
|
| // Initializers done
|
| }
|
| $inherits(LinkTail_T, LinkTail);
|
| -LinkTail_T.prototype.is$Link_Element = function(){return this;};
|
| -LinkTail_T.prototype.is$Link_Node = function(){return this;};
|
| -LinkTail_T.prototype.is$Link_Token = function(){return this;};
|
| -LinkTail_T.prototype.is$Link_Type = function(){return this;};
|
| -LinkTail_T.prototype.is$Iterable = function(){return this;};
|
| +LinkTail_T.prototype.assert$Link_Element = function(){return this};
|
| +LinkTail_T.prototype.assert$Link_Node = function(){return this};
|
| +LinkTail_T.prototype.assert$Link_Token = function(){return this};
|
| +LinkTail_T.prototype.assert$Link_Type = function(){return this};
|
| +LinkTail_T.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkTail_Token **************
|
| function LinkTail_Token() {}
|
| $inherits(LinkTail_Token, LinkTail);
|
| -LinkTail_Token.prototype.is$Link_Element = false;
|
| -LinkTail_Token.prototype.is$Link_Node = false;
|
| -LinkTail_Token.prototype.is$Link_Token = function(){return this;};
|
| -LinkTail_Token.prototype.is$Link_Type = false;
|
| -LinkTail_Token.prototype.is$Iterable = function(){return this;};
|
| +LinkTail_Token.prototype.assert$Link_Element = function(){$throw(new TypeError._internal$ctor(this, "Link<Element>"))};
|
| +LinkTail_Token.prototype.assert$Link_Node = function(){$throw(new TypeError._internal$ctor(this, "Link<Node>"))};
|
| +LinkTail_Token.prototype.assert$Link_Token = function(){return this};
|
| +LinkTail_Token.prototype.assert$Link_Type = function(){$throw(new TypeError._internal$ctor(this, "Link<Type>"))};
|
| +LinkTail_Token.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkTail_Type **************
|
| function LinkTail_Type() {}
|
| $inherits(LinkTail_Type, LinkTail);
|
| -LinkTail_Type.prototype.is$Link_Element = false;
|
| -LinkTail_Type.prototype.is$Link_Node = false;
|
| -LinkTail_Type.prototype.is$Link_Token = false;
|
| -LinkTail_Type.prototype.is$Link_Type = function(){return this;};
|
| -LinkTail_Type.prototype.is$Iterable = function(){return this;};
|
| +LinkTail_Type.prototype.assert$Link_Element = function(){$throw(new TypeError._internal$ctor(this, "Link<Element>"))};
|
| +LinkTail_Type.prototype.assert$Link_Node = function(){$throw(new TypeError._internal$ctor(this, "Link<Node>"))};
|
| +LinkTail_Type.prototype.assert$Link_Token = function(){$throw(new TypeError._internal$ctor(this, "Link<Token>"))};
|
| +LinkTail_Type.prototype.assert$Link_Type = function(){return this};
|
| +LinkTail_Type.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkEntry **************
|
| function LinkEntry(head, tail) {
|
| this.head = head;
|
| this.tail = tail;
|
| // Initializers done
|
| }
|
| -LinkEntry.prototype.is$Link_Element = function(){return this;};
|
| -LinkEntry.prototype.is$Link_Node = function(){return this;};
|
| -LinkEntry.prototype.is$Link_Token = function(){return this;};
|
| -LinkEntry.prototype.is$Link_Type = function(){return this;};
|
| -LinkEntry.prototype.is$Iterable = function(){return this;};
|
| +LinkEntry.prototype.assert$Link_Element = function(){return this};
|
| +LinkEntry.prototype.assert$Link_Node = function(){return this};
|
| +LinkEntry.prototype.assert$Link_Token = function(){return this};
|
| +LinkEntry.prototype.assert$Link_Type = function(){return this};
|
| +LinkEntry.prototype.assert$Iterable = function(){return this};
|
| LinkEntry.prototype.get$head = function() { return this.head; };
|
| LinkEntry.prototype.get$tail = function() { return this.tail; };
|
| LinkEntry.prototype.set$tail = function(value) { return this.tail = value; };
|
| @@ -2466,7 +2854,7 @@ LinkEntry.prototype.prepend = function(element) {
|
| }
|
| LinkEntry.prototype.iterator = function() {
|
| var $0;
|
| - return (($0 = this.toList().iterator()) && $0.is$Iterator_T());
|
| + return (($0 = this.toList().iterator()) == null ? null : $0.assert$Iterator_T());
|
| }
|
| LinkEntry.prototype.printOn = function(buffer, separatedBy) {
|
| buffer.add(this.head == null ? 'null' : this.head);
|
| @@ -2498,7 +2886,7 @@ LinkEntry.prototype.toList = function() {
|
| LinkEntry.prototype.isEmpty$0 = LinkEntry.prototype.isEmpty;
|
| LinkEntry.prototype.iterator$0 = LinkEntry.prototype.iterator;
|
| LinkEntry.prototype.printOn$1 = function($0) {
|
| - return this.printOn(($0 && $0.is$StringBuffer()));
|
| + return this.printOn(($0 == null ? null : $0.assert$StringBuffer()));
|
| };
|
| LinkEntry.prototype.toString$0 = LinkEntry.prototype.toString;
|
| // ********** Code for LinkEntry_T **************
|
| @@ -2508,11 +2896,11 @@ function LinkEntry_T(head, tail) {
|
| // Initializers done
|
| }
|
| $inherits(LinkEntry_T, LinkEntry);
|
| -LinkEntry_T.prototype.is$Link_Element = function(){return this;};
|
| -LinkEntry_T.prototype.is$Link_Node = function(){return this;};
|
| -LinkEntry_T.prototype.is$Link_Token = function(){return this;};
|
| -LinkEntry_T.prototype.is$Link_Type = function(){return this;};
|
| -LinkEntry_T.prototype.is$Iterable = function(){return this;};
|
| +LinkEntry_T.prototype.assert$Link_Element = function(){return this};
|
| +LinkEntry_T.prototype.assert$Link_Node = function(){return this};
|
| +LinkEntry_T.prototype.assert$Link_Token = function(){return this};
|
| +LinkEntry_T.prototype.assert$Link_Type = function(){return this};
|
| +LinkEntry_T.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for LinkBuilderImplementation **************
|
| function LinkBuilderImplementation() {
|
| this.head = null
|
| @@ -2615,9 +3003,9 @@ ArrayBasedScanner.prototype.appendBeginGroup = function(kind, value) {
|
| this.tail.next = token;
|
| this.tail = this.tail.next;
|
| while (kind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| - this.groupingStack = (($0 = this.groupingStack.prepend(token)) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.prepend(token)) == null ? null : $0.assert$Link_Token());
|
| }
|
| ArrayBasedScanner.prototype.appendEndGroup = function(kind, value, openKind) {
|
| var $0;
|
| @@ -2628,14 +3016,14 @@ ArrayBasedScanner.prototype.appendEndGroup = function(kind, value, openKind) {
|
| $throw(new MalformedInputException(('Unmatched ' + value)));
|
| }
|
| while (openKind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| if (this.groupingStack.get$head().get$kind() !== openKind) {
|
| if (openKind === 60/*null.LT_TOKEN*/) return;
|
| $throw(new MalformedInputException(('Unmatched ' + value)));
|
| }
|
| this.groupingStack.get$head().set$endGroup(oldTail.next);
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| ArrayBasedScanner.prototype.appendGtGt = function(kind, value) {
|
| var $0;
|
| @@ -2643,12 +3031,12 @@ ArrayBasedScanner.prototype.appendGtGt = function(kind, value) {
|
| this.appendStringToken(kind, value);
|
| if ($notnull_bool(this.groupingStack.isEmpty())) return;
|
| if (this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| if ($notnull_bool(this.groupingStack.isEmpty())) return;
|
| if (this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| this.groupingStack.get$head().set$endGroup(oldTail.next);
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| }
|
| ArrayBasedScanner.prototype.appendGtGtGt = function(kind, value) {
|
| @@ -2657,16 +3045,16 @@ ArrayBasedScanner.prototype.appendGtGtGt = function(kind, value) {
|
| this.appendStringToken(kind, value);
|
| if ($notnull_bool(this.groupingStack.isEmpty())) return;
|
| if (this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| if ($notnull_bool(this.groupingStack.isEmpty())) return;
|
| if (this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| if ($notnull_bool(this.groupingStack.isEmpty())) return;
|
| if (this.groupingStack.get$head().get$kind() === 60/*null.LT_TOKEN*/) {
|
| this.groupingStack.get$head().set$endGroup(oldTail.next);
|
| - this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link_Token());
|
| + this.groupingStack = (($0 = this.groupingStack.get$tail()) == null ? null : $0.assert$Link_Token());
|
| }
|
| }
|
| // ********** Code for ArrayBasedScanner_SourceString **************
|
| @@ -2689,7 +3077,8 @@ function Keyword(syntax, isPseudo) {
|
| this.isPseudo = isPseudo;
|
| // Initializers done
|
| }
|
| -Keyword.prototype.is$SourceString = function(){return this;};
|
| +Keyword.prototype.is$SourceString = function(){return true};
|
| +Keyword.prototype.assert$SourceString = function(){return this};
|
| Keyword.prototype.get$syntax = function() { return this.syntax; };
|
| Keyword.prototype.get$isPseudo = function() { return this.isPseudo; };
|
| Keyword.get$keywords = function() {
|
| @@ -2710,7 +3099,7 @@ Keyword.prototype.hashCode = function() {
|
| return this.syntax.hashCode();
|
| }
|
| Keyword.prototype.$eq = function(other) {
|
| - return !!(other && other.is$SourceString) && this.toString() == other.toString$0();
|
| + return !!(other && other.is$SourceString()) && this.toString() == other.toString$0();
|
| }
|
| Keyword.prototype.printOn = function(sb) {
|
| sb.add(this.syntax);
|
| @@ -2723,14 +3112,14 @@ Keyword.prototype.get$stringValue = function() {
|
| }
|
| Keyword.prototype.hashCode$0 = Keyword.prototype.hashCode;
|
| Keyword.prototype.printOn$1 = function($0) {
|
| - return this.printOn(($0 && $0.is$StringBuffer()));
|
| + return this.printOn(($0 == null ? null : $0.assert$StringBuffer()));
|
| };
|
| Keyword.prototype.toString$0 = Keyword.prototype.toString;
|
| // ********** Code for KeywordState **************
|
| function KeywordState() {
|
| // Initializers done
|
| }
|
| -KeywordState.prototype.is$KeywordState = function(){return this;};
|
| +KeywordState.prototype.assert$KeywordState = function(){return this};
|
| KeywordState.get$KEYWORD_STATE = function() {
|
| if ($globals.KeywordState__KEYWORD_STATE == null) {
|
| var strings = new ListFactory(const$119/*Keyword.values*/.get$length());
|
| @@ -2785,7 +3174,7 @@ ArrayKeywordState.prototype.isLeaf = function() {
|
| }
|
| ArrayKeywordState.prototype.next = function(c) {
|
| var $0;
|
| - return (($0 = this.table.$index(c - 97/*null.$a*/)) && $0.is$KeywordState());
|
| + return (($0 = this.table.$index(c - 97/*null.$a*/)) == null ? null : $0.assert$KeywordState());
|
| }
|
| ArrayKeywordState.prototype.get$keyword = function() {
|
| $throw("should not be called");
|
| @@ -3115,8 +3504,8 @@ ElementListener.prototype.beginLibraryTag = function(token) {
|
| ElementListener.prototype.endClassDeclaration = function(interfacesCount, beginToken, extendsKeyword, implementsKeyword, endToken) {
|
| var $0;
|
| this.discardNodes(interfacesCount);
|
| - var supertype = (($0 = this.popNode()) && $0.is$Identifier());
|
| - var name = (($0 = this.popNode()) && $0.is$Identifier());
|
| + var supertype = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| this.pushElement(new PartialClassElement(name.get$source(), beginToken, endToken));
|
| }
|
| ElementListener.prototype.endInterface = function(token) {
|
| @@ -3127,12 +3516,12 @@ ElementListener.prototype.endFunctionTypeAlias = function(token) {
|
| }
|
| ElementListener.prototype.endTopLevelMethod = function(beginToken, endToken) {
|
| var $0;
|
| - var name = (($0 = this.popNode()) && $0.is$Identifier());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| this.pushElement(new PartialFunctionElement(name.get$source(), beginToken, endToken));
|
| }
|
| ElementListener.prototype.endTopLevelField = function(beginToken, endToken) {
|
| var $0;
|
| - var name = (($0 = this.popNode()) && $0.is$Identifier());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| this.canceler.cancel("Cannot handle fields", null, beginToken);
|
| }
|
| ElementListener.prototype.handleIdentifier = function(token) {
|
| @@ -3146,7 +3535,7 @@ ElementListener.prototype.endTypeArguments = function(count, beginToken, endToke
|
| }
|
| ElementListener.prototype.handleParenthesizedExpression = function(token) {
|
| var $0;
|
| - var expression = (($0 = this.popNode()) && $0.is$Expression());
|
| + var expression = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| this.pushNode(new ParenthesizedExpression(expression, token));
|
| }
|
| ElementListener.prototype.discardNodes = function(count) {
|
| @@ -3171,18 +3560,18 @@ ElementListener.prototype.unexpected = function(token) {
|
| }
|
| ElementListener.prototype.pushElement = function(element) {
|
| var $0;
|
| - this.topLevelElements = (($0 = this.topLevelElements.prepend(element)) && $0.is$Link_Element());
|
| + this.topLevelElements = (($0 = this.topLevelElements.prepend(element)) == null ? null : $0.assert$Link_Element());
|
| }
|
| ElementListener.prototype.pushNode = function(node) {
|
| var $0;
|
| - this.nodes = (($0 = this.nodes.prepend(node)) && $0.is$Link_Node());
|
| + this.nodes = (($0 = this.nodes.prepend(node)) == null ? null : $0.assert$Link_Node());
|
| if (false/*null.VERBOSE*/) this.log(("push " + this.nodes));
|
| }
|
| ElementListener.prototype.popNode = function() {
|
| var $0;
|
| $assert(!$notnull_bool(this.nodes.isEmpty()), "!nodes.isEmpty()", "listener.dart", 406, 12);
|
| - var node = (($0 = this.nodes.get$head()) && $0.is$Node());
|
| - this.nodes = (($0 = this.nodes.get$tail()) && $0.is$Link_Node());
|
| + var node = (($0 = this.nodes.get$head()) == null ? null : $0.assert$Node());
|
| + this.nodes = (($0 = this.nodes.get$tail()) == null ? null : $0.assert$Link_Node());
|
| if (false/*null.VERBOSE*/) this.log(("pop " + this.nodes));
|
| return node;
|
| }
|
| @@ -3198,10 +3587,10 @@ function NodeListener(canceler, logger) {
|
| $inherits(NodeListener, ElementListener);
|
| NodeListener.prototype.endClassDeclaration = function(interfacesCount, beginToken, extendsKeyword, implementsKeyword, endToken) {
|
| var $0;
|
| - var body = (($0 = this.popNode()) && $0.is$NodeList());
|
| + var body = (($0 = this.popNode()) == null ? null : $0.assert$NodeList());
|
| var interfaces = this.makeNodeList(interfacesCount, implementsKeyword, null, ",");
|
| - var supertype = (($0 = this.popNode()) && $0.is$TypeAnnotation());
|
| - var name = (($0 = this.popNode()) && $0.is$Identifier());
|
| + var supertype = (($0 = this.popNode()) == null ? null : $0.assert$TypeAnnotation());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| this.pushNode(new ClassNode(name, supertype, interfaces, beginToken, extendsKeyword, endToken));
|
| }
|
| NodeListener.prototype.endClassBody = function(memberCount, beginToken, endToken) {
|
| @@ -3210,7 +3599,7 @@ NodeListener.prototype.endClassBody = function(memberCount, beginToken, endToken
|
| NodeListener.prototype.endFormalParameter = function(token) {
|
| var $0;
|
| var name = new NodeList.singleton$ctor(this.popNode());
|
| - var type = (($0 = this.popNode()) && $0.is$TypeAnnotation());
|
| + var type = (($0 = this.popNode()) == null ? null : $0.assert$TypeAnnotation());
|
| this.pushNode(new VariableDefinitions(type, null, name, token));
|
| }
|
| NodeListener.prototype.endFormalParameters = function(count, beginToken, endToken) {
|
| @@ -3224,7 +3613,7 @@ NodeListener.prototype.handleNoArguments = function(token) {
|
| }
|
| NodeListener.prototype.endReturnStatement = function(hasExpression, beginToken, endToken) {
|
| var $0;
|
| - var expression = (($0 = $notnull_bool(hasExpression) ? this.popNode() : null) && $0.is$Expression());
|
| + var expression = (($0 = $notnull_bool(hasExpression) ? this.popNode() : null) == null ? null : $0.assert$Expression());
|
| this.pushNode(new Return(beginToken, endToken, expression));
|
| }
|
| NodeListener.prototype.endExpressionStatement = function(token) {
|
| @@ -3236,21 +3625,21 @@ NodeListener.prototype.handleOnError = function(token, error) {
|
| NodeListener.prototype.handleLiteralInt = function(token) {
|
| var $this = this; // closure support
|
| this.pushNode(new LiteralInt(token, (function (t, e) {
|
| - return $this.handleOnError((t && t.is$Token()), e);
|
| + return $this.handleOnError((t == null ? null : t.assert$Token()), e);
|
| })
|
| ));
|
| }
|
| NodeListener.prototype.handleLiteralDouble = function(token) {
|
| var $this = this; // closure support
|
| this.pushNode(new LiteralDouble(token, (function (t, e) {
|
| - return $this.handleOnError((t && t.is$Token()), e);
|
| + return $this.handleOnError((t == null ? null : t.assert$Token()), e);
|
| })
|
| ));
|
| }
|
| NodeListener.prototype.handleLiteralBool = function(token) {
|
| var $this = this; // closure support
|
| this.pushNode(new LiteralBool(token, (function (t, e) {
|
| - return $this.handleOnError((t && t.is$Token()), e);
|
| + return $this.handleOnError((t == null ? null : t.assert$Token()), e);
|
| })
|
| ));
|
| }
|
| @@ -3296,7 +3685,7 @@ NodeListener.prototype.handleConditionalExpression = function(question, colon) {
|
| }
|
| NodeListener.prototype.endSend = function(token) {
|
| var $0;
|
| - var arguments = (($0 = this.popNode()) && $0.is$NodeList());
|
| + var arguments = (($0 = this.popNode()) == null ? null : $0.assert$NodeList());
|
| var selector = this.popNode();
|
| this.pushNode(new Send(null, selector, arguments));
|
| }
|
| @@ -3308,10 +3697,10 @@ NodeListener.prototype.endFunctionBody = function(count, beginToken, endToken) {
|
| }
|
| NodeListener.prototype.endFunction = function(token) {
|
| var $0;
|
| - var body = (($0 = this.popNode()) && $0.is$Statement());
|
| + var body = (($0 = this.popNode()) == null ? null : $0.assert$Statement());
|
| var formals = this.popNode();
|
| var name = this.popNode();
|
| - var type = (($0 = this.popNode()) && $0.is$TypeAnnotation());
|
| + var type = (($0 = this.popNode()) == null ? null : $0.assert$TypeAnnotation());
|
| this.pushNode(new FunctionExpression(name, formals, body, type));
|
| }
|
| NodeListener.prototype.handleVarKeyword = function(token) {
|
| @@ -3323,42 +3712,42 @@ NodeListener.prototype.handleFinalKeyword = function(token) {
|
| NodeListener.prototype.endVariablesDeclaration = function(count, endToken) {
|
| var $0;
|
| var variables = this.makeNodeList(count, null, null, ",");
|
| - var type = (($0 = this.popNode()) && $0.is$TypeAnnotation());
|
| + var type = (($0 = this.popNode()) == null ? null : $0.assert$TypeAnnotation());
|
| this.pushNode(new VariableDefinitions(type, null, variables, endToken));
|
| }
|
| NodeListener.prototype.endInitializer = function(assignmentOperator) {
|
| var $0;
|
| - var initializer = (($0 = this.popNode()) && $0.is$Expression());
|
| + var initializer = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| var arguments = new NodeList.singleton$ctor(initializer);
|
| - var name = (($0 = this.popNode()) && $0.is$Expression());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| var op = new Operator(assignmentOperator);
|
| this.pushNode(new SendSet(null, name, op, arguments));
|
| }
|
| NodeListener.prototype.endIfStatement = function(ifToken, elseToken) {
|
| var $0;
|
| - var elsePart = (($0 = (elseToken == null) ? null : this.popNode()) && $0.is$Statement());
|
| - var thenPart = (($0 = this.popNode()) && $0.is$Statement());
|
| - var condition = (($0 = this.popNode()) && $0.is$ParenthesizedExpression());
|
| + var elsePart = (($0 = (elseToken == null) ? null : this.popNode()) == null ? null : $0.assert$Statement());
|
| + var thenPart = (($0 = this.popNode()) == null ? null : $0.assert$Statement());
|
| + var condition = (($0 = this.popNode()) == null ? null : $0.assert$ParenthesizedExpression());
|
| this.pushNode(new If(condition, thenPart, elsePart, ifToken, elseToken));
|
| }
|
| NodeListener.prototype.endForStatement = function(beginToken, endToken) {
|
| var $0;
|
| - var body = (($0 = this.popNode()) && $0.is$Statement());
|
| - var update = (($0 = this.popNode()) && $0.is$Expression());
|
| - var condition = (($0 = this.popNode()) && $0.is$ExpressionStatement());
|
| - var initializer = (($0 = this.popNode()) && $0.is$VariableDefinitions());
|
| + var body = (($0 = this.popNode()) == null ? null : $0.assert$Statement());
|
| + var update = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| + var condition = (($0 = this.popNode()) == null ? null : $0.assert$ExpressionStatement());
|
| + var initializer = (($0 = this.popNode()) == null ? null : $0.assert$VariableDefinitions());
|
| this.pushNode(new For(initializer, condition, update, body, beginToken));
|
| }
|
| NodeListener.prototype.endDoWhileStatement = function(doKeyword, whileKeyword, endToken) {
|
| var $0;
|
| - var condition = (($0 = this.popNode()) && $0.is$Expression());
|
| - var body = (($0 = this.popNode()) && $0.is$Statement());
|
| + var condition = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| + var body = (($0 = this.popNode()) == null ? null : $0.assert$Statement());
|
| this.pushNode(new DoWhile(body, condition, doKeyword, whileKeyword, endToken));
|
| }
|
| NodeListener.prototype.endWhileStatement = function(whileKeyword, endToken) {
|
| var $0;
|
| - var body = (($0 = this.popNode()) && $0.is$Statement());
|
| - var condition = (($0 = this.popNode()) && $0.is$Expression());
|
| + var body = (($0 = this.popNode()) == null ? null : $0.assert$Statement());
|
| + var condition = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| this.pushNode(new While(condition, body, whileKeyword));
|
| }
|
| NodeListener.prototype.endBlock = function(count, beginToken, endToken) {
|
| @@ -3366,13 +3755,13 @@ NodeListener.prototype.endBlock = function(count, beginToken, endToken) {
|
| }
|
| NodeListener.prototype.endType = function(count, beginToken, endToken) {
|
| var $0;
|
| - var type = new TypeAnnotation((($0 = this.popNode()) && $0.is$Identifier()));
|
| + var type = new TypeAnnotation((($0 = this.popNode()) == null ? null : $0.assert$Identifier()));
|
| this.discardNodes(count - 1);
|
| this.pushNode(type);
|
| }
|
| NodeListener.prototype.endThrowStatement = function(throwToken, endToken) {
|
| var $0;
|
| - var expression = (($0 = this.popNode()) && $0.is$Expression());
|
| + var expression = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| this.pushNode(new Throw(expression, throwToken, endToken));
|
| }
|
| NodeListener.prototype.endRethrowStatement = function(throwToken, endToken) {
|
| @@ -3424,8 +3813,8 @@ NodeListener.prototype.handleNoFieldInitializer = function(token) {
|
| }
|
| NodeListener.prototype.endField = function(beginToken, endToken) {
|
| var $0;
|
| - var initializer = (($0 = this.popNode()) && $0.is$Expression());
|
| - var name = (($0 = this.popNode()) && $0.is$Identifier());
|
| + var initializer = (($0 = this.popNode()) == null ? null : $0.assert$Expression());
|
| + var name = (($0 = this.popNode()) == null ? null : $0.assert$Identifier());
|
| this.pushNode(null);
|
| this.canceler.cancel("fields are not implemented yet", name);
|
| }
|
| @@ -3437,9 +3826,9 @@ NodeListener.prototype.makeNodeList = function(count, beginToken, endToken, deli
|
| var $0;
|
| var nodes = const$209/*const EmptyLink<Node>()*/;
|
| for (; count > 0; --count) {
|
| - nodes = (($0 = nodes.prepend(this.popNode())) && $0.is$Link_Node());
|
| + nodes = (($0 = nodes.prepend(this.popNode())) == null ? null : $0.assert$Link_Node());
|
| }
|
| - var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(delimiter)) && $0.is$SourceString());
|
| + var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(delimiter)) == null ? null : $0.assert$SourceString());
|
| return new NodeList(beginToken, nodes, endToken, sourceDelimiter);
|
| }
|
| NodeListener.prototype.log = function(message) {
|
| @@ -3460,7 +3849,7 @@ PartialFunctionElement.prototype.parseNode = function(canceler, logger) {
|
| this.node = (($0 = parse(canceler, logger, (function (p) {
|
| return p.parseFunction$1($this.beginToken);
|
| })
|
| - )) && $0.is$FunctionExpression());
|
| + )) == null ? null : $0.assert$FunctionExpression());
|
| return this.node;
|
| }
|
| // ********** Code for PartialClassElement **************
|
| @@ -3478,7 +3867,7 @@ PartialClassElement.prototype.parseNode = function(canceler, logger) {
|
| this.node = (($0 = parse(canceler, logger, (function (p) {
|
| return p.parseClass$1($this.beginToken);
|
| })
|
| - )) && $0.is$ClassNode());
|
| + )) == null ? null : $0.assert$ClassNode());
|
| return this.node;
|
| }
|
| // ********** Code for Parser **************
|
| @@ -3595,7 +3984,7 @@ Parser.prototype.skipBlock = function(token) {
|
| if (!$notnull_bool(this.optional('{', token))) {
|
| return this.listener.expectedBlock(token);
|
| }
|
| - var beginGroupToken = (token && token.is$BeginGroupToken());
|
| + var beginGroupToken = (token == null ? null : token.assert$BeginGroupToken());
|
| $assert(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind === 125/*null.$RBRACE*/, "beginGroupToken.endGroup === null ||\n beginGroupToken.endGroup.kind === $RBRACE", "parser.dart", 127, 12);
|
| return beginGroupToken.endGroup;
|
| }
|
| @@ -3692,22 +4081,22 @@ Parser.prototype.parseType = function(token) {
|
| Parser.prototype.parseTypeArgumentsOpt = function(token) {
|
| var $this = this; // closure support
|
| return this.parseStuff(token, (function (t) {
|
| - return $this.listener.beginTypeArguments((t && t.is$Token()));
|
| + return $this.listener.beginTypeArguments((t == null ? null : t.assert$Token()));
|
| })
|
| , (function (t) {
|
| - return $this.parseType((t && t.is$Token()));
|
| + return $this.parseType((t == null ? null : t.assert$Token()));
|
| })
|
| , (function (c, bt, et) {
|
| - return $this.listener.endTypeArguments($assert_num(c), (bt && bt.is$Token()), (et && et.is$Token()));
|
| + return $this.listener.endTypeArguments($assert_num(c), (bt == null ? null : bt.assert$Token()), (et == null ? null : et.assert$Token()));
|
| })
|
| , (function (t) {
|
| - return $this.listener.handleNoTypeArguments((t && t.is$Token()));
|
| + return $this.listener.handleNoTypeArguments((t == null ? null : t.assert$Token()));
|
| })
|
| );
|
| }
|
| Parser.prototype.parseTypeVariablesOpt = function(token) {
|
| if ($notnull_bool(this.optional('<', token))) {
|
| - var beginGroupToken = (token && token.is$BeginGroupToken());
|
| + var beginGroupToken = (token == null ? null : token.assert$BeginGroupToken());
|
| token = beginGroupToken.endGroup.next;
|
| }
|
| this.listener.handleNoTypeVariables(token);
|
| @@ -3720,7 +4109,7 @@ Parser.prototype.parseStuff = function(token, beginStuff, stuffParser, endStuff,
|
| beginStuff.call$1(begin);
|
| var count = 0;
|
| do {
|
| - token = (($0 = stuffParser.call$1(token.next)) && $0.is$Token());
|
| + token = (($0 = stuffParser.call$1(token.next)) == null ? null : $0.assert$Token());
|
| ++count;
|
| }
|
| while ($notnull_bool(this.optional(',', token)))
|
| @@ -3762,7 +4151,7 @@ Parser.prototype.parseTopLevelMember = function(token) {
|
| this.listener.endTopLevelField(start, token);
|
| }
|
| else {
|
| - token = this.skipFormals((token && token.is$BeginGroupToken())).next;
|
| + token = this.skipFormals((token == null ? null : token.assert$BeginGroupToken())).next;
|
| token = this.parseFunctionBody(token);
|
| this.listener.endTopLevelMethod(start, token);
|
| }
|
| @@ -3829,7 +4218,7 @@ Parser.prototype.peekAfterType = function(token) {
|
| }
|
| }
|
| if (peek.kind === 60/*null.LT_TOKEN*/) {
|
| - var beginGroupToken = (peek && peek.is$BeginGroupToken());
|
| + var beginGroupToken = (peek == null ? null : peek.assert$BeginGroupToken());
|
| var gtToken = beginGroupToken.endGroup;
|
| if (gtToken != null) {
|
| return gtToken.next;
|
| @@ -3887,7 +4276,7 @@ Parser.prototype.parseMember = function(token) {
|
| this.listener.endField(start, token);
|
| }
|
| else {
|
| - token = this.skipFormals((token && token.is$BeginGroupToken())).next;
|
| + token = this.skipFormals((token == null ? null : token.assert$BeginGroupToken())).next;
|
| token = this.parseInitializersOpt(token);
|
| if (!$notnull_bool(this.optional(';', token))) {
|
| token = this.parseFunctionBody(token);
|
| @@ -3995,7 +4384,7 @@ Parser.prototype.parseExpressionStatementOrDeclaration = function(token) {
|
| return this.parseVariablesDeclaration(token);
|
| }
|
| else if (afterIdKind === 40/*null.LPAREN_TOKEN*/) {
|
| - var beginParen = (afterId && afterId.is$BeginGroupToken());
|
| + var beginParen = (afterId == null ? null : afterId.assert$BeginGroupToken());
|
| var endParen = beginParen.endGroup;
|
| var afterParens = endParen.next;
|
| if ($notnull_bool(this.optional('{', afterParens)) || $notnull_bool(this.optional('=>', afterParens))) {
|
| @@ -4164,7 +4553,7 @@ Parser.prototype.parsePrimary = function(token) {
|
| }
|
| }
|
| Parser.prototype.parseParenthesizedExpression = function(token) {
|
| - var begin = (token && token.is$BeginGroupToken());
|
| + var begin = (token == null ? null : token.assert$BeginGroupToken());
|
| token = this.expect('(', token);
|
| token = this.parseExpression(token);
|
| $assert(begin.endGroup === token, "begin.endGroup === token", "parser.dart", 731, 12);
|
| @@ -4349,10 +4738,10 @@ Parser.prototype.parseThrowStatement = function(token) {
|
| }
|
| }
|
| Parser.prototype.parseClass$1 = function($0) {
|
| - return this.parseClass(($0 && $0.is$Token()));
|
| + return this.parseClass(($0 == null ? null : $0.assert$Token()));
|
| };
|
| Parser.prototype.parseFunction$1 = function($0) {
|
| - return this.parseFunction(($0 && $0.is$Token()));
|
| + return this.parseFunction(($0 == null ? null : $0.assert$Token()));
|
| };
|
| // ********** Code for ParserTask **************
|
| function ParserTask(compiler) {
|
| @@ -4369,7 +4758,7 @@ ParserTask.prototype.parse = function(element) {
|
| return (($0 = this.measure((function () {
|
| return element.parseNode($this.compiler, $this.compiler);
|
| })
|
| - )) && $0.is$Node());
|
| + )) == null ? null : $0.assert$Node());
|
| }
|
| // ********** Code for PartialParser **************
|
| function PartialParser(listener) {
|
| @@ -4388,7 +4777,7 @@ PartialParser.prototype.skipExpression = function(token) {
|
| var kind = token.kind;
|
| if ((token.kind === 0/*null.EOF_TOKEN*/) || (token.kind === 59/*null.SEMICOLON_TOKEN*/)) return token;
|
| if ((token instanceof BeginGroupToken)) {
|
| - var begin = (token && token.is$BeginGroupToken());
|
| + var begin = (token == null ? null : token.assert$BeginGroupToken());
|
| token = (begin.endGroup != null) ? begin.endGroup : token;
|
| }
|
| token = token.next;
|
| @@ -5604,8 +5993,8 @@ ScannerTask.prototype.scan = function(script) {
|
| var $0;
|
| var elements = $this.scanElements(script.get$text());
|
| for (var link = elements;
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Element())) {
|
| - $this.compiler.universe.define((($0 = link.get$head()) && $0.is$Element()));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Element())) {
|
| + $this.compiler.universe.define((($0 = link.get$head()) == null ? null : $0.assert$Element()));
|
| }
|
| })
|
| );
|
| @@ -5644,7 +6033,7 @@ StringScanner.prototype.appendByteStringToken = function(kind, value) {
|
| this.tail = this.tail.next;
|
| }
|
| StringScanner.prototype.appendByteStringToken$2 = function($0, $1) {
|
| - return this.appendByteStringToken($assert_num($0), ($1 && $1.is$SourceString()));
|
| + return this.appendByteStringToken($assert_num($0), ($1 == null ? null : $1.assert$SourceString()));
|
| };
|
| // ********** Code for SubstringWrapper **************
|
| function SubstringWrapper(internalString, begin, end) {
|
| @@ -5653,13 +6042,14 @@ function SubstringWrapper(internalString, begin, end) {
|
| this.end = end;
|
| // Initializers done
|
| }
|
| -SubstringWrapper.prototype.is$SourceString = function(){return this;};
|
| +SubstringWrapper.prototype.is$SourceString = function(){return true};
|
| +SubstringWrapper.prototype.assert$SourceString = function(){return this};
|
| SubstringWrapper.prototype.get$end = function() { return this.end; };
|
| SubstringWrapper.prototype.hashCode = function() {
|
| return this.toString().hashCode();
|
| }
|
| SubstringWrapper.prototype.$eq = function(other) {
|
| - return !!(other && other.is$SourceString) && this.toString() == other.toString$0();
|
| + return !!(other && other.is$SourceString()) && this.toString() == other.toString$0();
|
| }
|
| SubstringWrapper.prototype.printOn = function(sb) {
|
| sb.add(this);
|
| @@ -5672,7 +6062,7 @@ SubstringWrapper.prototype.get$stringValue = function() {
|
| }
|
| SubstringWrapper.prototype.hashCode$0 = SubstringWrapper.prototype.hashCode;
|
| SubstringWrapper.prototype.printOn$1 = function($0) {
|
| - return this.printOn(($0 && $0.is$StringBuffer()));
|
| + return this.printOn(($0 == null ? null : $0.assert$StringBuffer()));
|
| };
|
| SubstringWrapper.prototype.toString$0 = SubstringWrapper.prototype.toString;
|
| // ********** Code for Token **************
|
| @@ -5681,7 +6071,7 @@ function Token(kind, charOffset) {
|
| this.charOffset = charOffset;
|
| // Initializers done
|
| }
|
| -Token.prototype.is$Token = function(){return this;};
|
| +Token.prototype.assert$Token = function(){return this};
|
| Token.prototype.get$kind = function() { return this.kind; };
|
| Token.prototype.get$charOffset = function() { return this.charOffset; };
|
| Token.prototype.get$value = function() {
|
| @@ -5737,13 +6127,14 @@ function StringWrapper(stringValue) {
|
| this.stringValue = stringValue;
|
| // Initializers done
|
| }
|
| -StringWrapper.prototype.is$SourceString = function(){return this;};
|
| +StringWrapper.prototype.is$SourceString = function(){return true};
|
| +StringWrapper.prototype.assert$SourceString = function(){return this};
|
| StringWrapper.prototype.get$stringValue = function() { return this.stringValue; };
|
| StringWrapper.prototype.hashCode = function() {
|
| return this.stringValue.hashCode();
|
| }
|
| StringWrapper.prototype.$eq = function(other) {
|
| - return !!(other && other.is$SourceString) && this.toString() == other.toString$0();
|
| + return !!(other && other.is$SourceString()) && this.toString() == other.toString$0();
|
| }
|
| StringWrapper.prototype.printOn = function(sb) {
|
| sb.add(this.stringValue);
|
| @@ -5753,7 +6144,7 @@ StringWrapper.prototype.toString = function() {
|
| }
|
| StringWrapper.prototype.hashCode$0 = StringWrapper.prototype.hashCode;
|
| StringWrapper.prototype.printOn$1 = function($0) {
|
| - return this.printOn(($0 && $0.is$StringBuffer()));
|
| + return this.printOn(($0 == null ? null : $0.assert$StringBuffer()));
|
| };
|
| StringWrapper.prototype.toString$0 = StringWrapper.prototype.toString;
|
| // ********** Code for BeginGroupToken **************
|
| @@ -5762,7 +6153,7 @@ function BeginGroupToken(kind, value, charOffset) {
|
| StringToken.call(this, kind, value, charOffset);
|
| }
|
| $inherits(BeginGroupToken, StringToken);
|
| -BeginGroupToken.prototype.is$BeginGroupToken = function(){return this;};
|
| +BeginGroupToken.prototype.assert$BeginGroupToken = function(){return this};
|
| BeginGroupToken.prototype.get$endGroup = function() { return this.endGroup; };
|
| BeginGroupToken.prototype.set$endGroup = function(value) { return this.endGroup = value; };
|
| // ********** Code for top level **************
|
| @@ -5779,7 +6170,7 @@ function Node() {
|
| this._hashCode = ++$globals.Node__HASH_COUNTER;
|
| // Initializers done
|
| }
|
| -Node.prototype.is$Node = function(){return this;};
|
| +Node.prototype.assert$Node = function(){return this};
|
| Node.prototype.hashCode = function() {
|
| return this._hashCode;
|
| }
|
| @@ -5808,7 +6199,7 @@ Node.prototype.asSendSet = function() {
|
| return null;
|
| }
|
| Node.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Node.prototype.getBeginToken$0 = Node.prototype.getBeginToken;
|
| Node.prototype.getEndToken$0 = Node.prototype.getEndToken;
|
| @@ -5826,7 +6217,7 @@ function ClassNode(name, superclass, interfaces, beginToken, extendsKeyword, end
|
| Node.call(this);
|
| }
|
| $inherits(ClassNode, Node);
|
| -ClassNode.prototype.is$ClassNode = function(){return this;};
|
| +ClassNode.prototype.assert$ClassNode = function(){return this};
|
| ClassNode.prototype.get$name = function() { return this.name; };
|
| ClassNode.prototype.get$interfaces = function() { return this.interfaces; };
|
| ClassNode.prototype.accept = function(visitor) {
|
| @@ -5845,7 +6236,7 @@ ClassNode.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| ClassNode.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| ClassNode.prototype.getBeginToken$0 = ClassNode.prototype.getBeginToken;
|
| ClassNode.prototype.getEndToken$0 = ClassNode.prototype.getEndToken;
|
| @@ -5855,14 +6246,14 @@ function Expression() {
|
| Node.call(this);
|
| }
|
| $inherits(Expression, Node);
|
| -Expression.prototype.is$Expression = function(){return this;};
|
| +Expression.prototype.assert$Expression = function(){return this};
|
| // ********** Code for Statement **************
|
| function Statement() {
|
| // Initializers done
|
| Node.call(this);
|
| }
|
| $inherits(Statement, Node);
|
| -Statement.prototype.is$Statement = function(){return this;};
|
| +Statement.prototype.assert$Statement = function(){return this};
|
| // ********** Code for Send **************
|
| function Send(receiver, selector, argumentsNode) {
|
| this.receiver = receiver;
|
| @@ -5921,15 +6312,15 @@ Send.prototype.getEndToken = function() {
|
| if (this.argumentsNode != null) token = this.argumentsNode.getEndToken();
|
| if (token != null) return token;
|
| if (this.selector != null) {
|
| - return (($0 = this.selector.getEndToken()) && $0.is$Token());
|
| + return (($0 = this.selector.getEndToken()) == null ? null : $0.assert$Token());
|
| }
|
| - return (($0 = this.receiver.getBeginToken()) && $0.is$Token());
|
| + return (($0 = this.receiver.getBeginToken()) == null ? null : $0.assert$Token());
|
| }
|
| Send.prototype.copyWithReceiver = function(receiver) {
|
| return new Send(receiver, this.selector, this.argumentsNode);
|
| }
|
| Send.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Send.prototype.getBeginToken$0 = Send.prototype.getBeginToken;
|
| Send.prototype.getEndToken$0 = Send.prototype.getEndToken;
|
| @@ -5964,7 +6355,7 @@ SendSet.prefix$ctor = function(receiver, selector, assignmentOperator) {
|
| }
|
| SendSet.prefix$ctor.prototype = SendSet.prototype;
|
| $inherits(SendSet, Send);
|
| -SendSet.prototype.is$SendSet = function(){return this;};
|
| +SendSet.prototype.assert$SendSet = function(){return this};
|
| SendSet.prototype.asSendSet = function() {
|
| return this;
|
| }
|
| @@ -5975,7 +6366,7 @@ SendSet.prototype.copyWithReceiver = function(receiver) {
|
| $throw('not implemented');
|
| }
|
| SendSet.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for NodeList **************
|
| function NodeList(beginToken, nodes, endToken, delimiter) {
|
| @@ -5992,10 +6383,10 @@ NodeList.singleton$ctor = function(node) {
|
| }
|
| NodeList.singleton$ctor.prototype = NodeList.prototype;
|
| $inherits(NodeList, Node);
|
| -NodeList.prototype.is$NodeList = function(){return this;};
|
| +NodeList.prototype.assert$NodeList = function(){return this};
|
| NodeList.prototype.get$nodes = function() {
|
| var $0;
|
| - return (($0 = this._nodes != null ? this._nodes : const$209/*const EmptyLink<Node>()*/) && $0.is$Link_Node());
|
| + return (($0 = this._nodes != null ? this._nodes : const$209/*const EmptyLink<Node>()*/) == null ? null : $0.assert$Link_Node());
|
| }
|
| NodeList.prototype.accept = function(visitor) {
|
| return visitor.visitNodeList(this);
|
| @@ -6005,12 +6396,12 @@ NodeList.prototype.getBeginToken = function() {
|
| if (this.beginToken != null) return this.beginToken;
|
| if (this.get$nodes() != null) {
|
| for (var link = this.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| if (link.get$head().getBeginToken$0() != null) {
|
| - return (($0 = link.get$head().getBeginToken$0()) && $0.is$Token());
|
| + return (($0 = link.get$head().getBeginToken$0()) == null ? null : $0.assert$Token());
|
| }
|
| if (link.get$head().getEndToken$0() != null) {
|
| - return (($0 = link.get$head().getEndToken$0()) && $0.is$Token());
|
| + return (($0 = link.get$head().getEndToken$0()) == null ? null : $0.assert$Token());
|
| }
|
| }
|
| }
|
| @@ -6022,14 +6413,14 @@ NodeList.prototype.getEndToken = function() {
|
| if (this.get$nodes() != null) {
|
| var link = this.get$nodes();
|
| if ($notnull_bool(link.isEmpty())) return this.beginToken;
|
| - while (!$notnull_bool(link.get$tail().isEmpty$0())) link = (($0 = link.get$tail()) && $0.is$Link_Node());
|
| - if (link.get$head().getEndToken$0() != null) return (($0 = link.get$head().getEndToken$0()) && $0.is$Token());
|
| - if (link.get$head().getBeginToken$0() != null) return (($0 = link.get$head().getBeginToken$0()) && $0.is$Token());
|
| + while (!$notnull_bool(link.get$tail().isEmpty$0())) link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node());
|
| + if (link.get$head().getEndToken$0() != null) return (($0 = link.get$head().getEndToken$0()) == null ? null : $0.assert$Token());
|
| + if (link.get$head().getBeginToken$0() != null) return (($0 = link.get$head().getBeginToken$0()) == null ? null : $0.assert$Token());
|
| }
|
| return this.beginToken;
|
| }
|
| NodeList.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| NodeList.prototype.getBeginToken$0 = NodeList.prototype.getBeginToken;
|
| NodeList.prototype.getEndToken$0 = NodeList.prototype.getEndToken;
|
| @@ -6051,7 +6442,7 @@ Block.prototype.getEndToken = function() {
|
| return this.statements.getEndToken();
|
| }
|
| Block.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Block.prototype.getBeginToken$0 = Block.prototype.getBeginToken;
|
| Block.prototype.getEndToken$0 = Block.prototype.getEndToken;
|
| @@ -6080,7 +6471,7 @@ If.prototype.getEndToken = function() {
|
| return this.elsePart.getEndToken();
|
| }
|
| If.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| If.prototype.getBeginToken$0 = If.prototype.getBeginToken;
|
| If.prototype.getEndToken$0 = If.prototype.getEndToken;
|
| @@ -6107,7 +6498,7 @@ For.prototype.getEndToken = function() {
|
| return this.body.getEndToken();
|
| }
|
| For.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| For.prototype.getBeginToken$0 = For.prototype.getBeginToken;
|
| For.prototype.getEndToken$0 = For.prototype.getEndToken;
|
| @@ -6121,7 +6512,7 @@ function FunctionExpression(name, parameters, body, returnType) {
|
| Expression.call(this);
|
| }
|
| $inherits(FunctionExpression, Expression);
|
| -FunctionExpression.prototype.is$FunctionExpression = function(){return this;};
|
| +FunctionExpression.prototype.assert$FunctionExpression = function(){return this};
|
| FunctionExpression.prototype.get$name = function() { return this.name; };
|
| FunctionExpression.prototype.get$parameters = function() { return this.parameters; };
|
| FunctionExpression.prototype.get$body = function() { return this.body; };
|
| @@ -6136,7 +6527,7 @@ FunctionExpression.prototype.getEndToken = function() {
|
| return this.body.getEndToken();
|
| }
|
| FunctionExpression.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| FunctionExpression.prototype.getBeginToken$0 = FunctionExpression.prototype.getBeginToken;
|
| FunctionExpression.prototype.getEndToken$0 = FunctionExpression.prototype.getEndToken;
|
| @@ -6207,7 +6598,7 @@ LiteralInt.prototype.accept = function(visitor) {
|
| return visitor.visitLiteralInt(this);
|
| }
|
| LiteralInt.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for LiteralDouble **************
|
| function LiteralDouble(token, handler) {
|
| @@ -6228,7 +6619,7 @@ LiteralDouble.prototype.accept = function(visitor) {
|
| return visitor.visitLiteralDouble(this);
|
| }
|
| LiteralDouble.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for LiteralBool **************
|
| function LiteralBool(token, handler) {
|
| @@ -6256,7 +6647,7 @@ LiteralBool.prototype.accept = function(visitor) {
|
| return visitor.visitLiteralBool(this);
|
| }
|
| LiteralBool.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for LiteralString **************
|
| function LiteralString(token) {
|
| @@ -6264,16 +6655,16 @@ function LiteralString(token) {
|
| Literal_SourceString.call(this, token, to$call$2(null));
|
| }
|
| $inherits(LiteralString, Literal_SourceString);
|
| -LiteralString.prototype.is$LiteralString = function(){return this;};
|
| +LiteralString.prototype.assert$LiteralString = function(){return this};
|
| LiteralString.prototype.get$value = function() {
|
| var $0;
|
| - return (($0 = this.token.get$value()) && $0.is$SourceString());
|
| + return (($0 = this.token.get$value()) == null ? null : $0.assert$SourceString());
|
| }
|
| LiteralString.prototype.accept = function(visitor) {
|
| return visitor.visitLiteralString(this);
|
| }
|
| LiteralString.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for LiteralNull **************
|
| function LiteralNull(token) {
|
| @@ -6288,7 +6679,7 @@ LiteralNull.prototype.accept = function(visitor) {
|
| return visitor.visitLiteralNull(this);
|
| }
|
| LiteralNull.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for Identifier **************
|
| function Identifier(token) {
|
| @@ -6297,10 +6688,10 @@ function Identifier(token) {
|
| Expression.call(this);
|
| }
|
| $inherits(Identifier, Expression);
|
| -Identifier.prototype.is$Identifier = function(){return this;};
|
| +Identifier.prototype.assert$Identifier = function(){return this};
|
| Identifier.prototype.get$source = function() {
|
| var $0;
|
| - return (($0 = this.token.get$value()) && $0.is$SourceString());
|
| + return (($0 = this.token.get$value()) == null ? null : $0.assert$SourceString());
|
| }
|
| Identifier.prototype.accept = function(visitor) {
|
| return visitor.visitIdentifier(this);
|
| @@ -6312,7 +6703,7 @@ Identifier.prototype.getEndToken = function() {
|
| return this.token;
|
| }
|
| Identifier.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Identifier.prototype.getBeginToken$0 = Identifier.prototype.getBeginToken;
|
| Identifier.prototype.getEndToken$0 = Identifier.prototype.getEndToken;
|
| @@ -6322,7 +6713,7 @@ function Operator(token) {
|
| Identifier.call(this, token);
|
| }
|
| $inherits(Operator, Identifier);
|
| -Operator.prototype.is$Operator = function(){return this;};
|
| +Operator.prototype.assert$Operator = function(){return this};
|
| Operator.prototype.asOperator = function() {
|
| return this;
|
| }
|
| @@ -6330,7 +6721,7 @@ Operator.prototype.accept = function(visitor) {
|
| return visitor.visitOperator(this);
|
| }
|
| Operator.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| // ********** Code for Return **************
|
| function Return(beginToken, endToken, expression) {
|
| @@ -6354,7 +6745,7 @@ Return.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| Return.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Return.prototype.getBeginToken$0 = Return.prototype.getBeginToken;
|
| Return.prototype.getEndToken$0 = Return.prototype.getEndToken;
|
| @@ -6366,19 +6757,19 @@ function ExpressionStatement(expression, endToken) {
|
| Statement.call(this);
|
| }
|
| $inherits(ExpressionStatement, Statement);
|
| -ExpressionStatement.prototype.is$ExpressionStatement = function(){return this;};
|
| +ExpressionStatement.prototype.assert$ExpressionStatement = function(){return this};
|
| ExpressionStatement.prototype.accept = function(visitor) {
|
| return visitor.visitExpressionStatement(this);
|
| }
|
| ExpressionStatement.prototype.getBeginToken = function() {
|
| var $0;
|
| - return (($0 = this.expression.getBeginToken()) && $0.is$Token());
|
| + return (($0 = this.expression.getBeginToken()) == null ? null : $0.assert$Token());
|
| }
|
| ExpressionStatement.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| ExpressionStatement.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| ExpressionStatement.prototype.getBeginToken$0 = ExpressionStatement.prototype.getBeginToken;
|
| ExpressionStatement.prototype.getEndToken$0 = ExpressionStatement.prototype.getEndToken;
|
| @@ -6401,7 +6792,7 @@ Throw.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| Throw.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| Throw.prototype.getBeginToken$0 = Throw.prototype.getBeginToken;
|
| Throw.prototype.getEndToken$0 = Throw.prototype.getEndToken;
|
| @@ -6412,21 +6803,20 @@ function TypeAnnotation(typeName) {
|
| Node.call(this);
|
| }
|
| $inherits(TypeAnnotation, Node);
|
| -TypeAnnotation.prototype.is$TypeAnnotation = function(){return this;};
|
| -TypeAnnotation.prototype.get$typeName = function() { return this.typeName; };
|
| +TypeAnnotation.prototype.assert$TypeAnnotation = function(){return this};
|
| TypeAnnotation.prototype.accept = function(visitor) {
|
| return visitor.visitTypeAnnotation(this);
|
| }
|
| TypeAnnotation.prototype.getBeginToken = function() {
|
| var $0;
|
| - return (($0 = this.typeName.getBeginToken()) && $0.is$Token());
|
| + return (($0 = this.typeName.getBeginToken()) == null ? null : $0.assert$Token());
|
| }
|
| TypeAnnotation.prototype.getEndToken = function() {
|
| var $0;
|
| - return (($0 = this.typeName.getEndToken()) && $0.is$Token());
|
| + return (($0 = this.typeName.getEndToken()) == null ? null : $0.assert$Token());
|
| }
|
| TypeAnnotation.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| TypeAnnotation.prototype.getBeginToken$0 = TypeAnnotation.prototype.getBeginToken;
|
| TypeAnnotation.prototype.getEndToken$0 = TypeAnnotation.prototype.getEndToken;
|
| @@ -6440,7 +6830,7 @@ function VariableDefinitions(type, modifiers, definitions, endToken) {
|
| Statement.call(this);
|
| }
|
| $inherits(VariableDefinitions, Statement);
|
| -VariableDefinitions.prototype.is$VariableDefinitions = function(){return this;};
|
| +VariableDefinitions.prototype.assert$VariableDefinitions = function(){return this};
|
| VariableDefinitions.prototype.get$type = function() { return this.type; };
|
| VariableDefinitions.prototype.get$definitions = function() { return this.definitions; };
|
| VariableDefinitions.prototype.accept = function(visitor) {
|
| @@ -6453,7 +6843,7 @@ VariableDefinitions.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| VariableDefinitions.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| VariableDefinitions.prototype.getBeginToken$0 = VariableDefinitions.prototype.getBeginToken;
|
| VariableDefinitions.prototype.getEndToken$0 = VariableDefinitions.prototype.getEndToken;
|
| @@ -6485,7 +6875,7 @@ DoWhile.prototype.getEndToken = function() {
|
| return this.endToken;
|
| }
|
| DoWhile.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| DoWhile.prototype.getBeginToken$0 = DoWhile.prototype.getBeginToken;
|
| DoWhile.prototype.getEndToken$0 = DoWhile.prototype.getEndToken;
|
| @@ -6507,7 +6897,7 @@ While.prototype.getEndToken = function() {
|
| return this.body.getEndToken();
|
| }
|
| While.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| While.prototype.getBeginToken$0 = While.prototype.getBeginToken;
|
| While.prototype.getEndToken$0 = While.prototype.getEndToken;
|
| @@ -6519,7 +6909,7 @@ function ParenthesizedExpression(expression, beginToken) {
|
| Expression.call(this);
|
| }
|
| $inherits(ParenthesizedExpression, Expression);
|
| -ParenthesizedExpression.prototype.is$ParenthesizedExpression = function(){return this;};
|
| +ParenthesizedExpression.prototype.assert$ParenthesizedExpression = function(){return this};
|
| ParenthesizedExpression.prototype.accept = function(visitor) {
|
| return visitor.visitParenthesizedExpression(this);
|
| }
|
| @@ -6530,7 +6920,7 @@ ParenthesizedExpression.prototype.getEndToken = function() {
|
| return this.beginToken.endGroup;
|
| }
|
| ParenthesizedExpression.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$Visitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$Visitor()));
|
| };
|
| ParenthesizedExpression.prototype.getBeginToken$0 = ParenthesizedExpression.prototype.getBeginToken;
|
| ParenthesizedExpression.prototype.getEndToken$0 = ParenthesizedExpression.prototype.getEndToken;
|
| @@ -6539,7 +6929,7 @@ function Unparser(printDebugInfo) {
|
| this.printDebugInfo = printDebugInfo;
|
| // Initializers done
|
| }
|
| -Unparser.prototype.is$Visitor = function(){return this;};
|
| +Unparser.prototype.assert$Visitor = function(){return this};
|
| Unparser.prototype.unparse = function(node) {
|
| this.sb = new StringBufferImpl("");
|
| this.visit(node);
|
| @@ -6579,7 +6969,7 @@ Unparser.prototype.visitClassNode = function(node) {
|
| Unparser.prototype.visitExpressionStatement = function(node) {
|
| var $0;
|
| this.visit(node.expression);
|
| - this.add((($0 = node.endToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.endToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitFor = function(node) {
|
| node.forToken.get$value().printOn$1(this.sb);
|
| @@ -6601,57 +6991,57 @@ Unparser.prototype.visitFunctionExpression = function(node) {
|
| }
|
| Unparser.prototype.visitIdentifier = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitIf = function(node) {
|
| var $0;
|
| - this.add((($0 = node.ifToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.ifToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.visit(node.condition);
|
| this.visit(node.thenPart);
|
| if ($notnull_bool(node.get$hasElsePart())) {
|
| - this.add((($0 = node.elseToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.elseToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.visit(node.elsePart);
|
| }
|
| }
|
| Unparser.prototype.visitLiteralBool = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitLiteralDouble = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitLiteralInt = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitLiteralString = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitLiteralNull = function(node) {
|
| var $0;
|
| - this.add((($0 = node.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitNodeList = function(node) {
|
| var $0;
|
| - if (node.beginToken != null) this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString()));
|
| + if (node.beginToken != null) this.add((($0 = node.beginToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| if (node.get$nodes() != null) {
|
| node.get$nodes().printOn(this.sb, node.delimiter);
|
| }
|
| - if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString()));
|
| + if (node.endToken != null) this.add((($0 = node.endToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitOperator = function(node) {
|
| this.visitIdentifier(node);
|
| }
|
| Unparser.prototype.visitReturn = function(node) {
|
| var $0;
|
| - this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.beginToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| if ($notnull_bool(node.get$hasExpression())) {
|
| this.sb.add(' ');
|
| this.visit(node.expression);
|
| }
|
| - this.add((($0 = node.endToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.endToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.visitSend = function(node) {
|
| if ($notnull_bool(node.get$isPrefix())) {
|
| @@ -6673,7 +7063,7 @@ Unparser.prototype.visitSendSet = function(node) {
|
| this.sb.add('.');
|
| }
|
| this.visit(node.selector);
|
| - this.add((($0 = node.assignmentOperator.token.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.assignmentOperator.token.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.visit(node.argumentsNode);
|
| }
|
| Unparser.prototype.visitThrow = function(node) {
|
| @@ -6697,23 +7087,23 @@ Unparser.prototype.visitVariableDefinitions = function(node) {
|
| this.sb.add(' ');
|
| this.visit(node.definitions);
|
| if ($notnull_bool($eq(node.endToken.get$value(), const$223/*const SourceString(';')*/))) {
|
| - this.add((($0 = node.endToken.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.endToken.get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| }
|
| Unparser.prototype.visitDoWhile = function(node) {
|
| var $0;
|
| - this.add((($0 = node.doKeyword.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.doKeyword.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.sb.add(' ');
|
| this.visit(node.body);
|
| this.sb.add(' ');
|
| - this.add((($0 = node.whileKeyword.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.whileKeyword.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.sb.add(' ');
|
| this.visit(node.condition);
|
| this.sb.add(node.endToken.get$value());
|
| }
|
| Unparser.prototype.visitWhile = function(node) {
|
| var $0;
|
| - this.add((($0 = node.whileKeyword.get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.whileKeyword.get$value()) == null ? null : $0.assert$SourceString()));
|
| this.sb.add(' ');
|
| this.visit(node.condition);
|
| this.sb.add(' ');
|
| @@ -6721,21 +7111,21 @@ Unparser.prototype.visitWhile = function(node) {
|
| }
|
| Unparser.prototype.visitParenthesizedExpression = function(node) {
|
| var $0;
|
| - this.add((($0 = node.getBeginToken().get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.getBeginToken().get$value()) == null ? null : $0.assert$SourceString()));
|
| this.visit(node.expression);
|
| - this.add((($0 = node.getEndToken().get$value()) && $0.is$SourceString()));
|
| + this.add((($0 = node.getEndToken().get$value()) == null ? null : $0.assert$SourceString()));
|
| }
|
| Unparser.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$SourceString()));
|
| + return this.add(($0 == null ? null : $0.assert$SourceString()));
|
| };
|
| Unparser.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for AbstractVisitor **************
|
| function AbstractVisitor() {
|
| // Initializers done
|
| }
|
| -AbstractVisitor.prototype.is$Visitor = function(){return this;};
|
| +AbstractVisitor.prototype.assert$Visitor = function(){return this};
|
| AbstractVisitor.prototype.visitExpression = function(node) {
|
| return this.visitNode(node);
|
| }
|
| @@ -6759,27 +7149,27 @@ function AbstractVisitor_Element() {
|
| // Initializers done
|
| }
|
| $inherits(AbstractVisitor_Element, AbstractVisitor);
|
| -AbstractVisitor_Element.prototype.is$Visitor = function(){return this;};
|
| +AbstractVisitor_Element.prototype.assert$Visitor = function(){return this};
|
| AbstractVisitor_Element.prototype.visitClassNode = function(node) {
|
| var $0;
|
| - return (($0 = this.visitNode(node)) && $0.is$Element());
|
| + return (($0 = this.visitNode(node)) == null ? null : $0.assert$Element());
|
| }
|
| AbstractVisitor_Element.prototype.visitTypeAnnotation = function(node) {
|
| var $0;
|
| - return (($0 = this.visitNode(node)) && $0.is$Element());
|
| + return (($0 = this.visitNode(node)) == null ? null : $0.assert$Element());
|
| }
|
| // ********** Code for AbstractVisitor_SourceString **************
|
| function AbstractVisitor_SourceString() {
|
| // Initializers done
|
| }
|
| $inherits(AbstractVisitor_SourceString, AbstractVisitor);
|
| -AbstractVisitor_SourceString.prototype.is$Visitor = function(){return this;};
|
| +AbstractVisitor_SourceString.prototype.assert$Visitor = function(){return this};
|
| // ********** Code for AbstractVisitor_Type **************
|
| function AbstractVisitor_Type() {
|
| // Initializers done
|
| }
|
| $inherits(AbstractVisitor_Type, AbstractVisitor);
|
| -AbstractVisitor_Type.prototype.is$Visitor = function(){return this;};
|
| +AbstractVisitor_Type.prototype.assert$Visitor = function(){return this};
|
| AbstractVisitor_Type.prototype.visitBlock = function(node) {
|
| return this.visitStatement(node);
|
| }
|
| @@ -6788,7 +7178,7 @@ AbstractVisitor_Type.prototype.visitDoWhile = function(node) {
|
| }
|
| AbstractVisitor_Type.prototype.visitExpression = function(node) {
|
| var $0;
|
| - return (($0 = this.visitNode(node)) && $0.is$Type());
|
| + return (($0 = this.visitNode(node)) == null ? null : $0.assert$Type());
|
| }
|
| AbstractVisitor_Type.prototype.visitExpressionStatement = function(node) {
|
| return this.visitStatement(node);
|
| @@ -6828,11 +7218,11 @@ AbstractVisitor_Type.prototype.visitLoop = function(node) {
|
| }
|
| AbstractVisitor_Type.prototype.visitNodeList = function(node) {
|
| var $0;
|
| - return (($0 = this.visitNode(node)) && $0.is$Type());
|
| + return (($0 = this.visitNode(node)) == null ? null : $0.assert$Type());
|
| }
|
| AbstractVisitor_Type.prototype.visitOperator = function(node) {
|
| var $0;
|
| - return (($0 = this.visitIdentifier(node)) && $0.is$Type());
|
| + return (($0 = this.visitIdentifier(node)) == null ? null : $0.assert$Type());
|
| }
|
| AbstractVisitor_Type.prototype.visitParenthesizedExpression = function(node) {
|
| return this.visitExpression(node);
|
| @@ -6848,7 +7238,7 @@ AbstractVisitor_Type.prototype.visitSendSet = function(node) {
|
| }
|
| AbstractVisitor_Type.prototype.visitStatement = function(node) {
|
| var $0;
|
| - return (($0 = this.visitNode(node)) && $0.is$Type());
|
| + return (($0 = this.visitNode(node)) == null ? null : $0.assert$Type());
|
| }
|
| AbstractVisitor_Type.prototype.visitThrow = function(node) {
|
| return this.visitStatement(node);
|
| @@ -6862,7 +7252,7 @@ AbstractVisitor_Type.prototype.visitWhile = function(node) {
|
| // ********** Code for top level **************
|
| function firstBeginToken(first, second) {
|
| var $0;
|
| - return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()) && $0.is$Token());
|
| + return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()) == null ? null : $0.assert$Token());
|
| }
|
| // ********** Library elements **************
|
| // ********** Code for ElementKind **************
|
| @@ -6882,7 +7272,7 @@ function Element(name, kind, enclosingElement) {
|
| this.enclosingElement = enclosingElement;
|
| // Initializers done
|
| }
|
| -Element.prototype.is$Element = function(){return this;};
|
| +Element.prototype.assert$Element = function(){return this};
|
| Element.prototype.get$name = function() { return this.name; };
|
| Element.prototype.get$kind = function() { return this.kind; };
|
| Element.prototype.get$enclosingElement = function() { return this.enclosingElement; };
|
| @@ -6890,7 +7280,7 @@ Element.prototype.hashCode = function() {
|
| return this.name.hashCode();
|
| }
|
| Element.prototype.computeType$2 = function($0, $1) {
|
| - return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types()));
|
| + return this.computeType(($0 == null ? null : $0.assert$Compiler()), ($1 == null ? null : $1.assert$Types()));
|
| };
|
| Element.prototype.hashCode$0 = Element.prototype.hashCode;
|
| // ********** Code for VariableElement **************
|
| @@ -6901,7 +7291,7 @@ function VariableElement(node, typeAnnotation, kind, name, enclosingElement) {
|
| Element.call(this, name, kind, enclosingElement);
|
| }
|
| $inherits(VariableElement, Element);
|
| -VariableElement.prototype.is$VariableElement = function(){return this;};
|
| +VariableElement.prototype.assert$VariableElement = function(){return this};
|
| VariableElement.prototype.get$type = function() { return this.type; };
|
| VariableElement.prototype.set$type = function(value) { return this.type = value; };
|
| VariableElement.prototype.parseNode = function(canceler, logger) {
|
| @@ -6913,7 +7303,7 @@ VariableElement.prototype.computeType = function(compiler, types) {
|
| return this.type;
|
| }
|
| VariableElement.prototype.computeType$2 = function($0, $1) {
|
| - return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types()));
|
| + return this.computeType(($0 == null ? null : $0.assert$Compiler()), ($1 == null ? null : $1.assert$Types()));
|
| };
|
| // ********** Code for ForeignElement **************
|
| function ForeignElement(name) {
|
| @@ -6925,7 +7315,7 @@ ForeignElement.prototype.computeType = function(compiler, types) {
|
| return types.dynamicType;
|
| }
|
| ForeignElement.prototype.computeType$2 = function($0, $1) {
|
| - return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types()));
|
| + return this.computeType(($0 == null ? null : $0.assert$Compiler()), ($1 == null ? null : $1.assert$Types()));
|
| };
|
| // ********** Code for FunctionElement **************
|
| function FunctionElement(name) {
|
| @@ -6939,31 +7329,31 @@ FunctionElement.node$ctor = function(node, enclosing) {
|
| }
|
| FunctionElement.node$ctor.prototype = FunctionElement.prototype;
|
| $inherits(FunctionElement, Element);
|
| -FunctionElement.prototype.is$FunctionElement = function(){return this;};
|
| +FunctionElement.prototype.assert$FunctionElement = function(){return this};
|
| FunctionElement.prototype.get$parameters = function() { return this.parameters; };
|
| FunctionElement.prototype.set$parameters = function(value) { return this.parameters = value; };
|
| FunctionElement.prototype.get$type = function() { return this.type; };
|
| FunctionElement.prototype.set$type = function(value) { return this.type = value; };
|
| FunctionElement.prototype.computeType = function(compiler, types) {
|
| var $0;
|
| - if (this.type != null) return (($0 = this.type) && $0.is$FunctionType());
|
| + if (this.type != null) return (($0 = this.type) == null ? null : $0.assert$FunctionType());
|
| if (this.parameters == null) compiler.resolveSignature(this);
|
| - var node = (($0 = this.parseNode(compiler, compiler)) && $0.is$FunctionExpression());
|
| + var node = (($0 = this.parseNode(compiler, compiler)) == null ? null : $0.assert$FunctionExpression());
|
| var returnType = getType(node.returnType, types);
|
| if (returnType == null) compiler.cancel(('unknown type ' + node.returnType));
|
| var parameterTypes = new LinkBuilderImplementation();
|
| for (var link = this.parameters;
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Element())) {
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Element())) {
|
| parameterTypes.addLast(link.get$head().computeType$2(compiler, types));
|
| }
|
| - this.type = new FunctionType(returnType, (($0 = parameterTypes.toLink()) && $0.is$Link_Type()));
|
| - return (($0 = this.type) && $0.is$FunctionType());
|
| + this.type = new FunctionType(returnType, (($0 = parameterTypes.toLink()) == null ? null : $0.assert$Link_Type()));
|
| + return (($0 = this.type) == null ? null : $0.assert$FunctionType());
|
| }
|
| FunctionElement.prototype.parseNode = function(canceler, logger) {
|
| return this.node;
|
| }
|
| FunctionElement.prototype.computeType$2 = function($0, $1) {
|
| - return this.computeType(($0 && $0.is$Compiler()), $1);
|
| + return this.computeType(($0 == null ? null : $0.assert$Compiler()), $1);
|
| };
|
| // ********** Code for ClassElement **************
|
| function ClassElement(name) {
|
| @@ -6973,7 +7363,7 @@ function ClassElement(name) {
|
| Element.call(this, name, const$214, null);
|
| }
|
| $inherits(ClassElement, Element);
|
| -ClassElement.prototype.is$ClassElement = function(){return this;};
|
| +ClassElement.prototype.assert$ClassElement = function(){return this};
|
| ClassElement.prototype.get$type = function() { return this.type; };
|
| ClassElement.prototype.set$type = function(value) { return this.type = value; };
|
| ClassElement.prototype.get$interfaces = function() { return this.interfaces; };
|
| @@ -6991,15 +7381,15 @@ ClassElement.prototype.resolve = function(compiler) {
|
| }
|
| ClassElement.prototype.computeType$2 = ClassElement.prototype.computeType;
|
| ClassElement.prototype.resolve$1 = function($0) {
|
| - return this.resolve(($0 && $0.is$Compiler()));
|
| + return this.resolve(($0 == null ? null : $0.assert$Compiler()));
|
| };
|
| // ********** Code for top level **************
|
| function getType(annotation, types) {
|
| var $0;
|
| if (annotation == null || annotation.typeName == null) {
|
| - return (($0 = types.get$dynamicType()) && $0.is$Type());
|
| + return (($0 = types.get$dynamicType()) == null ? null : $0.assert$Type());
|
| }
|
| - return (($0 = types.lookup$1(annotation.typeName.get$source())) && $0.is$Type());
|
| + return (($0 = types.lookup$1(annotation.typeName.get$source())) == null ? null : $0.assert$Type());
|
| }
|
| // ********** Library ssa **************
|
| // ********** Code for SsaBuilderTask **************
|
| @@ -7016,18 +7406,18 @@ SsaBuilderTask.prototype.build = function(tree, elements) {
|
| var $0;
|
| return (($0 = this.measure((function () {
|
| var $0;
|
| - var function_ = (tree && tree.is$FunctionExpression());
|
| + var function_ = (tree == null ? null : tree.assert$FunctionExpression());
|
| $globals.HInstruction_idCounter = 0;
|
| var graph = $this.compileMethod(function_.parameters, function_.body, elements);
|
| $assert(graph.isValid(), "graph.isValid()", "builder.dart", 15, 14);
|
| if (false/*null.GENERATE_SSA_TRACE*/) {
|
| - var name = (($0 = function_.name) && $0.is$Identifier());
|
| + var name = (($0 = function_.name) == null ? null : $0.assert$Identifier());
|
| HTracer.HTracer$singleton$factory().traceCompilation(name.get$source().toString());
|
| HTracer.HTracer$singleton$factory().traceGraph('builder', graph);
|
| }
|
| return graph;
|
| })
|
| - )) && $0.is$HGraph());
|
| + )) == null ? null : $0.assert$HGraph());
|
| }
|
| SsaBuilderTask.prototype.compileMethod = function(parameters, body, elements) {
|
| var builder = new SsaBuilder(this.compiler, elements);
|
| @@ -7040,7 +7430,7 @@ function SsaBuilder(compiler, elements) {
|
| this.elements = elements;
|
| // Initializers done
|
| }
|
| -SsaBuilder.prototype.is$Visitor = function(){return this;};
|
| +SsaBuilder.prototype.assert$Visitor = function(){return this};
|
| SsaBuilder.prototype.get$definitions = function() { return this.definitions; };
|
| SsaBuilder.prototype.set$definitions = function(value) { return this.definitions = value; };
|
| SsaBuilder.prototype.build = function(parameters, body) {
|
| @@ -7083,7 +7473,7 @@ SsaBuilder.prototype.push = function(instruction) {
|
| }
|
| SsaBuilder.prototype.pop = function() {
|
| var $0;
|
| - return (($0 = this.stack.removeLast()) && $0.is$HInstruction());
|
| + return (($0 = this.stack.removeLast()) == null ? null : $0.assert$HInstruction());
|
| }
|
| SsaBuilder.prototype.popBoolified = function() {
|
| var boolified = new HBoolify(this.pop());
|
| @@ -7110,15 +7500,15 @@ SsaBuilder.prototype.visitParameterValues = function(parameters) {
|
| var $0;
|
| var parameterIndex = 0;
|
| for (var link = parameters.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - var container = (($0 = link.get$head()) && $0.is$VariableDefinitions());
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + var container = (($0 = link.get$head()) == null ? null : $0.assert$VariableDefinitions());
|
| var identifierLink = container.definitions.get$nodes();
|
| $assert(!$notnull_bool(identifierLink.isEmpty()) && $notnull_bool(identifierLink.get$tail().isEmpty$0()), "!identifierLink.isEmpty() && identifierLink.tail.isEmpty()", "builder.dart", 135, 14);
|
| if (!(identifierLink.get$head() instanceof Identifier)) {
|
| this.compiler.unimplemented("SsaBuilder.visitParameterValues non-identifier");
|
| }
|
| - var parameterId = (($0 = identifierLink.get$head()) && $0.is$Identifier());
|
| - var element = (($0 = this.elements.$index(parameterId)) && $0.is$VariableElement());
|
| + var parameterId = (($0 = identifierLink.get$head()) == null ? null : $0.assert$Identifier());
|
| + var element = (($0 = this.elements.$index(parameterId)) == null ? null : $0.assert$VariableElement());
|
| var parameter = new HParameterValue(element);
|
| this.add(parameter);
|
| this.definitions.$setindex(element, this.guard(element.type, parameter));
|
| @@ -7127,8 +7517,8 @@ SsaBuilder.prototype.visitParameterValues = function(parameters) {
|
| SsaBuilder.prototype.visitBlock = function(node) {
|
| var $0;
|
| for (var link = node.statements.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.visit((($0 = link.get$head()) && $0.is$Node()));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| if ($notnull_bool(this.isAborted())) {
|
| if (!this.stack.isEmpty()) this.compiler.cancel('non-empty instruction stack');
|
| return;
|
| @@ -7165,7 +7555,7 @@ SsaBuilder.prototype.endLoop = function(loopEntry, branchBlock, doUpdateDefiniti
|
| loopEntry.forEachPhi((function (phi) {
|
| var $0;
|
| var element = phi.element;
|
| - var postLoopDefinition = (($0 = $this.definitions.$index(element)) && $0.is$HInstruction());
|
| + var postLoopDefinition = (($0 = $this.definitions.$index(element)) == null ? null : $0.assert$HInstruction());
|
| phi.addInput(postLoopDefinition);
|
| if ($notnull_bool(doUpdateDefinitions) && phi.inputs.$index(0) !== postLoopDefinition && exitDefinitions.containsKey(element)) {
|
| exitDefinitions.$setindex(element, postLoopDefinition);
|
| @@ -7211,7 +7601,7 @@ SsaBuilder.prototype.visitLoop = function(initializer, condition, update, body)
|
| SsaBuilder.prototype.visitFor = function(node) {
|
| var $0;
|
| $assert(node.initializer != null && node.get$condition() != null && node.update != null && node.body != null, "node.initializer !== null && node.condition !== null &&\n node.update !== null && node.body !== null", "builder.dart", 275, 12);
|
| - this.visitLoop(node.initializer, node.get$condition(), (($0 = node.update) && $0.is$Expression()), node.body);
|
| + this.visitLoop(node.initializer, node.get$condition(), (($0 = node.update) == null ? null : $0.assert$Expression()), node.body);
|
| }
|
| SsaBuilder.prototype.visitWhile = function(node) {
|
| this.visitLoop(null, node.condition, null, node.body);
|
| @@ -7239,9 +7629,9 @@ SsaBuilder.prototype.visitFunctionExpression = function(node) {
|
| }
|
| SsaBuilder.prototype.visitIdentifier = function(node) {
|
| var $0;
|
| - var element = (($0 = this.elements.$index(node)) && $0.is$Element());
|
| + var element = (($0 = this.elements.$index(node)) == null ? null : $0.assert$Element());
|
| this.compiler.ensure(element != null);
|
| - var def = (($0 = this.definitions.$index(element)) && $0.is$HInstruction());
|
| + var def = (($0 = this.definitions.$index(element)) == null ? null : $0.assert$HInstruction());
|
| $assert(def != null, "def !== null", "builder.dart", 317, 12);
|
| this.stack.add(def);
|
| }
|
| @@ -7249,14 +7639,14 @@ SsaBuilder.prototype.joinDefinitions = function(joinBlock, incoming1, incoming2)
|
| var joinedDefinitions = new HashMapImplementation();
|
| incoming1.forEach((function (element, instruction) {
|
| var $0;
|
| - var other = (($0 = incoming2.$index(element)) && $0.is$HInstruction());
|
| + var other = (($0 = incoming2.$index(element)) == null ? null : $0.assert$HInstruction());
|
| if (other == null) return;
|
| if (instruction === other) {
|
| joinedDefinitions.$setindex(element, instruction);
|
| }
|
| else {
|
| var phi = new HPhi.manyInputs$ctor(element, [instruction, other]);
|
| - joinBlock.addPhi((phi && phi.is$HPhi()));
|
| + joinBlock.addPhi((phi == null ? null : phi.assert$HPhi()));
|
| joinedDefinitions.$setindex(element, phi);
|
| }
|
| })
|
| @@ -7464,9 +7854,9 @@ SsaBuilder.prototype.visitBinary = function(left, op, right, element) {
|
| }
|
| SsaBuilder.prototype.visitSend = function(node) {
|
| var $0;
|
| - var element = (($0 = this.elements.$index(node)) && $0.is$Element());
|
| + var element = (($0 = this.elements.$index(node)) == null ? null : $0.assert$Element());
|
| if ((node.selector instanceof Operator)) {
|
| - var op = (($0 = node.selector) && $0.is$Operator());
|
| + var op = (($0 = node.selector) == null ? null : $0.assert$Operator());
|
| if ($notnull_bool($eq(const$278/*const SourceString("&&")*/, op.get$source())) || $notnull_bool($eq(const$279/*const SourceString("||")*/, op.get$source()))) {
|
| this.visitLogicalAndOr(node, op);
|
| }
|
| @@ -7481,29 +7871,29 @@ SsaBuilder.prototype.visitSend = function(node) {
|
| this.visit(node.argumentsNode);
|
| var right = this.pop();
|
| var left = this.pop();
|
| - this.visitBinary((left && left.is$HInstruction()), op, (right && right.is$HInstruction()), element);
|
| + this.visitBinary((left == null ? null : left.assert$HInstruction()), op, (right == null ? null : right.assert$HInstruction()), element);
|
| }
|
| }
|
| else if ($notnull_bool(node.get$isPropertyAccess())) {
|
| if (node.receiver != null) {
|
| this.compiler.unimplemented("SsaBuilder.visitSend with receiver");
|
| }
|
| - var instruction = (($0 = this.definitions.$index(element)) && $0.is$HInstruction());
|
| + var instruction = (($0 = this.definitions.$index(element)) == null ? null : $0.assert$HInstruction());
|
| $assert(instruction != null, "instruction !== null", "builder.dart", 528, 14);
|
| this.stack.add(instruction);
|
| }
|
| else {
|
| var link = node.get$arguments();
|
| if (element.kind === const$219/*ElementKind.FOREIGN*/) {
|
| - link = (($0 = link.get$tail()) && $0.is$Link_Node());
|
| + link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node());
|
| }
|
| var arguments = [];
|
| - for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.visit((($0 = link.get$head()) && $0.is$Node()));
|
| + for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| arguments.add$1(this.pop());
|
| }
|
| if (element.kind === const$219/*ElementKind.FOREIGN*/) {
|
| - var literal = (($0 = node.get$arguments().get$head()) && $0.is$LiteralString());
|
| + var literal = (($0 = node.get$arguments().get$head()) == null ? null : $0.assert$LiteralString());
|
| this.compiler.ensure((literal instanceof LiteralString));
|
| this.push(new HForeign(arguments, this.unquote(literal)));
|
| }
|
| @@ -7514,7 +7904,7 @@ SsaBuilder.prototype.visitSend = function(node) {
|
| }
|
| SsaBuilder.prototype.updateDefinition = function(node, value) {
|
| var $0;
|
| - var element = (($0 = this.elements.$index(node)) && $0.is$VariableElement());
|
| + var element = (($0 = this.elements.$index(node)) == null ? null : $0.assert$VariableElement());
|
| value = this.guard(element.type, value);
|
| this.definitions.$setindex(element, value);
|
| return value;
|
| @@ -7528,15 +7918,15 @@ SsaBuilder.prototype.visitSendSet = function(node) {
|
| if ($notnull_bool($eq(const$281/*const SourceString("=")*/, op.get$source()))) {
|
| var link = node.get$arguments();
|
| $assert(!$notnull_bool(link.isEmpty()) && $notnull_bool(link.get$tail().isEmpty$0()), "!link.isEmpty() && link.tail.isEmpty()", "builder.dart", 567, 14);
|
| - this.visit((($0 = link.get$head()) && $0.is$Node()));
|
| + this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| this.stack.add(this.updateDefinition(node, this.pop()));
|
| }
|
| else {
|
| $assert($notnull_bool($eq(const$284/*const SourceString("++")*/, op.get$source())) || $notnull_bool($eq(const$285/*const SourceString("--")*/, op.get$source())) || node.assignmentOperator.get$source().get$stringValue().endsWith("="), "const SourceString(\"++\") == op.source ||\n const SourceString(\"--\") == op.source ||\n node.assignmentOperator.source.stringValue.endsWith(\"=\")", "builder.dart", 571, 14);
|
| var isCompoundAssignment = !$notnull_bool(node.get$arguments().isEmpty());
|
| var isPrefix = !$notnull_bool(node.get$isPostfix());
|
| - var getter = (($0 = this.elements.$index(node.selector)) && $0.is$Element());
|
| - var left = (($0 = this.definitions.$index(getter)) && $0.is$HInstruction());
|
| + var getter = (($0 = this.elements.$index(node.selector)) == null ? null : $0.assert$Element());
|
| + var left = (($0 = this.definitions.$index(getter)) == null ? null : $0.assert$HInstruction());
|
| var right;
|
| if ($notnull_bool(isCompoundAssignment)) {
|
| this.visit(node.argumentsNode);
|
| @@ -7546,7 +7936,7 @@ SsaBuilder.prototype.visitSendSet = function(node) {
|
| right = new HLiteral(1);
|
| this.add(right);
|
| }
|
| - var opElement = (($0 = this.elements.$index(op)) && $0.is$Element());
|
| + var opElement = (($0 = this.elements.$index(op)) == null ? null : $0.assert$Element());
|
| this.visitBinary(left, op, right, opElement);
|
| var operation = this.pop();
|
| $assert(operation != null, "operation !== null", "builder.dart", 589, 14);
|
| @@ -7577,8 +7967,8 @@ SsaBuilder.prototype.visitLiteralNull = function(node) {
|
| SsaBuilder.prototype.visitNodeList = function(node) {
|
| var $0;
|
| for (var link = node.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.visit((($0 = link.get$head()) && $0.is$Node()));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| }
|
| }
|
| SsaBuilder.prototype.visitParenthesizedExpression = function(node) {
|
| @@ -7612,8 +8002,8 @@ SsaBuilder.prototype.visitTypeAnnotation = function(node) {
|
| SsaBuilder.prototype.visitVariableDefinitions = function(node) {
|
| var $0;
|
| for (var link = node.definitions.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - var definition = (($0 = link.get$head()) && $0.is$Node());
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + var definition = (($0 = link.get$head()) == null ? null : $0.assert$Node());
|
| if ((definition instanceof Identifier)) {
|
| var initialValue = new HLiteral(null);
|
| this.add(initialValue);
|
| @@ -7621,16 +8011,16 @@ SsaBuilder.prototype.visitVariableDefinitions = function(node) {
|
| }
|
| else {
|
| $assert((definition instanceof SendSet), "definition is SendSet", "builder.dart", 669, 16);
|
| - this.visitSendSet((definition && definition.is$SendSet()));
|
| + this.visitSendSet((definition == null ? null : definition.assert$SendSet()));
|
| this.pop();
|
| }
|
| }
|
| }
|
| SsaBuilder.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$HInstruction()));
|
| + return this.add(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| SsaBuilder.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for SsaCodeGeneratorTask **************
|
| function SsaCodeGeneratorTask(compiler) {
|
| @@ -7647,8 +8037,8 @@ SsaCodeGeneratorTask.prototype.generate = function(function_, graph) {
|
| var $0;
|
| var parameterNames = new LinkedHashMapImplementation();
|
| for (var link = function_.parameters;
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Element())) {
|
| - var element = (($0 = link.get$head()) && $0.is$Element());
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Element())) {
|
| + var element = (($0 = link.get$head()) == null ? null : $0.assert$Element());
|
| parameterNames.$setindex(element, JsNames.getValid(('' + element.name)));
|
| }
|
| var code = $this.generateMethod(function_.name, parameterNames, graph);
|
| @@ -7673,7 +8063,7 @@ SsaCodeGeneratorTask.prototype.generateMethod = function(methodName, parameterNa
|
| var codegen = new SsaCodeGenerator(this.compiler, buffer, parameterNames);
|
| codegen.visitGraph(graph);
|
| var parameters = new StringBufferImpl("");
|
| - var names = (($0 = parameterNames.getValues()) && $0.is$List_String());
|
| + var names = (($0 = parameterNames.getValues()) == null ? null : $0.assert$List_String());
|
| for (var i = 0;
|
| i < $assert_num(names.length); i++) {
|
| if (i != 0) parameters.add(', ');
|
| @@ -7696,7 +8086,7 @@ function SsaCodeGenerator(compiler, buffer, parameterNames) {
|
| this.prefixes.$setindex(name, 0);
|
| }
|
| }
|
| -SsaCodeGenerator.prototype.is$HVisitor = function(){return this;};
|
| +SsaCodeGenerator.prototype.assert$HVisitor = function(){return this};
|
| SsaCodeGenerator.prototype.get$names = function() { return this.names; };
|
| SsaCodeGenerator.prototype.visitGraph = function(graph) {
|
| this.currentGraph = graph;
|
| @@ -7753,7 +8143,7 @@ SsaCodeGenerator.prototype.invoke = function(element, arguments) {
|
| for (var i = 0;
|
| i < arguments.length; i++) {
|
| if (i != 0) this.buffer.add(', ');
|
| - this.use((($0 = arguments.$index(i)) && $0.is$HInstruction()));
|
| + this.use((($0 = arguments.$index(i)) == null ? null : $0.assert$HInstruction()));
|
| }
|
| this.buffer.add(")");
|
| }
|
| @@ -7803,9 +8193,9 @@ SsaCodeGenerator.prototype.visitInvokeBinary = function(node, useOperator, op) {
|
| var $0;
|
| if ($notnull_bool(useOperator)) {
|
| this.buffer.add('(');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add((' ' + op + ' '));
|
| - this.use((($0 = node.inputs.$index(1)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(1)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(')');
|
| }
|
| else {
|
| @@ -7816,7 +8206,7 @@ SsaCodeGenerator.prototype.visitInvokeUnary = function(node, useOperator, op) {
|
| var $0;
|
| if ($notnull_bool(useOperator)) {
|
| this.buffer.add(('(' + op));
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(')');
|
| }
|
| else {
|
| @@ -7881,7 +8271,7 @@ SsaCodeGenerator.prototype.visitBoolify = function(node) {
|
| var $0;
|
| $assert(node.inputs.length == 1, "node.inputs.length == 1", "codegen.dart", 248, 12);
|
| this.buffer.add('(');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(' === true)');
|
| }
|
| SsaCodeGenerator.prototype.visitExit = function(node) {
|
| @@ -7897,18 +8287,18 @@ SsaCodeGenerator.prototype.visitGoto = function(node) {
|
| unreachable();
|
| }
|
| $assert($eq(dominated.$index(0), this.currentBlock.successors.$index(0)), "dominated[0] == currentBlock.successors[0]", "codegen.dart", 271, 12);
|
| - this.visitBasicBlock((($0 = dominated.$index(0)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = dominated.$index(0)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| SsaCodeGenerator.prototype.visitIf = function(node) {
|
| var $0;
|
| var ifBlock = this.currentBlock;
|
| this.buffer.add('if (');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(') {\n');
|
| this.indent++;
|
| var dominated = this.currentBlock.dominatedBlocks;
|
| $assert(dominated.$index(0) === ifBlock.successors.$index(0), "dominated[0] === ifBlock.successors[0]", "codegen.dart", 284, 12);
|
| - this.visitBasicBlock((($0 = ifBlock.successors.$index(0)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = ifBlock.successors.$index(0)) == null ? null : $0.assert$HBasicBlock()));
|
| this.indent--;
|
| this.addIndentation();
|
| var nextDominatedIndex;
|
| @@ -7916,7 +8306,7 @@ SsaCodeGenerator.prototype.visitIf = function(node) {
|
| $assert(dominated.$index(1) === ifBlock.successors.$index(1), "dominated[1] === ifBlock.successors[1]", "codegen.dart", 290, 14);
|
| this.buffer.add('} else {\n');
|
| this.indent++;
|
| - this.visitBasicBlock((($0 = ifBlock.successors.$index(1)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = ifBlock.successors.$index(1)) == null ? null : $0.assert$HBasicBlock()));
|
| this.indent--;
|
| this.addIndentation();
|
| this.buffer.add("}\n");
|
| @@ -7925,7 +8315,7 @@ SsaCodeGenerator.prototype.visitIf = function(node) {
|
| this.buffer.add("}\n");
|
| }
|
| if ($notnull_bool(node.hasElse) && dominated.length == 3) {
|
| - this.visitBasicBlock((($0 = dominated.$index(2)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = dominated.$index(2)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| else if ($notnull_bool(node.hasElse)) {
|
| $assert(dominated.length == 2, "dominated.length == 2", "codegen.dart", 318, 14);
|
| @@ -7933,14 +8323,14 @@ SsaCodeGenerator.prototype.visitIf = function(node) {
|
| }
|
| else if (!$notnull_bool(node.hasElse) && dominated.length == 2) {
|
| $assert(!$notnull_bool(dominated.$index(1).isExitBlock$0()), "!dominated[1].isExitBlock()", "codegen.dart", 323, 14);
|
| - this.visitBasicBlock((($0 = dominated.$index(1)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = dominated.$index(1)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| else {
|
| $assert(!$notnull_bool(node.hasElse), "!node.hasElse", "codegen.dart", 328, 14);
|
| $assert(dominated.length == 3, "dominated.length == 3", "codegen.dart", 329, 14);
|
| $assert(dominated.$index(2).isExitBlock$0(), "dominated[2].isExitBlock()", "codegen.dart", 330, 14);
|
| - this.visitBasicBlock((($0 = dominated.$index(1)) && $0.is$HBasicBlock()));
|
| - this.visitBasicBlock((($0 = dominated.$index(2)) && $0.is$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = dominated.$index(1)) == null ? null : $0.assert$HBasicBlock()));
|
| + this.visitBasicBlock((($0 = dominated.$index(2)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| }
|
| SsaCodeGenerator.prototype.visitInvoke = function(node) {
|
| @@ -7953,10 +8343,10 @@ SsaCodeGenerator.prototype.visitForeign = function(node) {
|
| var inputs = node.inputs;
|
| for (var i = 0;
|
| i < inputs.length; i++) {
|
| - var input = (($0 = inputs.$index(i)) && $0.is$HInstruction());
|
| + var input = (($0 = inputs.$index(i)) == null ? null : $0.assert$HInstruction());
|
| var name = null;
|
| if ((input instanceof HParameterValue)) {
|
| - name = this.parameter((input && input.is$HParameterValue()));
|
| + name = this.parameter((input == null ? null : input.assert$HParameterValue()));
|
| }
|
| else {
|
| $assert(!$notnull_bool(input.generateAtUseSite()), "!input.generateAtUseSite()", "codegen.dart", 350, 16);
|
| @@ -7981,7 +8371,7 @@ SsaCodeGenerator.prototype.visitLoopBranch = function(node) {
|
| var $0;
|
| var branchBlock = this.currentBlock;
|
| this.buffer.add('if (!(');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(')) break;\n');
|
| var dominated = this.currentBlock.dominatedBlocks;
|
| var loopSuccessor;
|
| @@ -8004,7 +8394,7 @@ SsaCodeGenerator.prototype.visitNot = function(node) {
|
| var $0;
|
| $assert(node.inputs.length == 1, "node.inputs.length == 1", "codegen.dart", 395, 12);
|
| this.buffer.add('(!');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(')');
|
| }
|
| SsaCodeGenerator.prototype.visitParameterValue = function(node) {
|
| @@ -8016,20 +8406,20 @@ SsaCodeGenerator.prototype.visitPhi = function(node) {
|
| SsaCodeGenerator.prototype.visitReturn = function(node) {
|
| var $0;
|
| $assert(node.inputs.length == 1, "node.inputs.length == 1", "codegen.dart", 411, 12);
|
| - var input = (($0 = node.inputs.$index(0)) && $0.is$HInstruction());
|
| + var input = (($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction());
|
| if ($notnull_bool(input.isLiteralNull())) {
|
| this.buffer.add('return;\n');
|
| }
|
| else {
|
| this.buffer.add('return ');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(';\n');
|
| }
|
| }
|
| SsaCodeGenerator.prototype.visitThrow = function(node) {
|
| var $0;
|
| this.buffer.add('throw ');
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(';\n');
|
| }
|
| SsaCodeGenerator.prototype.visitTypeGuard = function(node) {
|
| @@ -8047,7 +8437,7 @@ SsaCodeGenerator.prototype.visitTypeGuard = function(node) {
|
| var element = this.compiler.universe.find(name);
|
| this.compiler.worklist.add(element);
|
| this.buffer.add(('' + name + '('));
|
| - this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.use((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| this.buffer.add(')');
|
| }
|
| SsaCodeGenerator.prototype.addIndentation = function() {
|
| @@ -8103,7 +8493,7 @@ HGraphVisitor.prototype.visitDominatorTree = function(graph) {
|
| var dominated = block.dominatedBlocks;
|
| for (var i = 0;
|
| i < dominated.length; i++) {
|
| - visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock()));
|
| + visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| }
|
| visitBasicBlockAndSuccessors(graph.entry);
|
| @@ -8115,7 +8505,7 @@ HGraphVisitor.prototype.visitPostDominatorTree = function(graph) {
|
| var dominated = block.dominatedBlocks;
|
| for (var i = dominated.length - 1;
|
| i >= 0; i--) {
|
| - visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock()));
|
| + visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| $this.visitBasicBlock(block);
|
| }
|
| @@ -8147,7 +8537,7 @@ function HGraph() {
|
| this.entry = this.addNewBlock();
|
| this.exit = new HBasicBlock();
|
| }
|
| -HGraph.prototype.is$HGraph = function(){return this;};
|
| +HGraph.prototype.assert$HGraph = function(){return this};
|
| HGraph.prototype.addBlock = function(block) {
|
| var id = this.blocks.length;
|
| block.id = id;
|
| @@ -8174,16 +8564,16 @@ HGraph.prototype.assignDominators = function() {
|
| var $0;
|
| for (var i = 0, length = this.blocks.length;
|
| i < length; i++) {
|
| - var block = (($0 = this.blocks.$index(i)) && $0.is$HBasicBlock());
|
| + var block = (($0 = this.blocks.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| var predecessors = block.predecessors;
|
| if ($notnull_bool(block.isLoopHeader())) {
|
| $assert(predecessors.length >= 2, "predecessors.length >= 2", "nodes.dart", 139, 16);
|
| - block.assignCommonDominator((($0 = predecessors.$index(0)) && $0.is$HBasicBlock()));
|
| + block.assignCommonDominator((($0 = predecessors.$index(0)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| else {
|
| for (var j = predecessors.length - 1;
|
| j >= 0; j--) {
|
| - block.assignCommonDominator((($0 = predecessors.$index(j)) && $0.is$HBasicBlock()));
|
| + block.assignCommonDominator((($0 = predecessors.$index(j)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| }
|
| }
|
| @@ -8199,7 +8589,7 @@ function HBaseVisitor() {
|
| HGraphVisitor.call(this);
|
| }
|
| $inherits(HBaseVisitor, HGraphVisitor);
|
| -HBaseVisitor.prototype.is$HVisitor = function(){return this;};
|
| +HBaseVisitor.prototype.assert$HVisitor = function(){return this};
|
| HBaseVisitor.prototype.visitBasicBlock = function(node) {
|
| this.currentBlock = node;
|
| var instruction = node.first;
|
| @@ -8413,7 +8803,7 @@ HInstructionList.prototype.contains = function(instruction) {
|
| return false;
|
| }
|
| HInstructionList.prototype.contains$1 = function($0) {
|
| - return this.contains(($0 && $0.is$HInstruction()));
|
| + return this.contains(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HInstructionList.prototype.isEmpty$0 = HInstructionList.prototype.isEmpty;
|
| HInstructionList.prototype.last$0 = function() {
|
| @@ -8443,7 +8833,7 @@ HBasicBlock.withId$ctor = function(id) {
|
| }
|
| HBasicBlock.withId$ctor.prototype = HBasicBlock.prototype;
|
| $inherits(HBasicBlock, HInstructionList);
|
| -HBasicBlock.prototype.is$HBasicBlock = function(){return this;};
|
| +HBasicBlock.prototype.assert$HBasicBlock = function(){return this};
|
| HBasicBlock.prototype.get$id = function() { return this.id; };
|
| HBasicBlock.prototype.set$id = function(value) { return this.id = value; };
|
| HBasicBlock.prototype.get$phis = function() { return this.phis; };
|
| @@ -8546,7 +8936,7 @@ HBasicBlock.prototype.postProcessLoopHeader = function() {
|
| $assert(this.isLoopHeader(), "isLoopHeader()", "nodes.dart", 425, 12);
|
| for (var i = 1, length = this.predecessors.length;
|
| i < length; i++) {
|
| - this.loopInformation.addBackEdge((($0 = this.predecessors.$index(i)) && $0.is$HBasicBlock()));
|
| + this.loopInformation.addBackEdge((($0 = this.predecessors.$index(i)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| }
|
| HBasicBlock.prototype.rewrite = function(from, to) {
|
| @@ -8624,10 +9014,10 @@ HBasicBlock.prototype.assignCommonDominator = function(predecessor) {
|
| }
|
| HBasicBlock.prototype.forEachPhi = function(f) {
|
| var $0;
|
| - var current = (($0 = this.phis.first) && $0.is$HPhi());
|
| + var current = (($0 = this.phis.first) == null ? null : $0.assert$HPhi());
|
| while (current != null) {
|
| f(current);
|
| - current = (($0 = current.next) && $0.is$HPhi());
|
| + current = (($0 = current.next) == null ? null : $0.assert$HPhi());
|
| }
|
| }
|
| HBasicBlock.prototype.isValid = function() {
|
| @@ -8637,17 +9027,17 @@ HBasicBlock.prototype.isValid = function() {
|
| return validator.isValid;
|
| }
|
| HBasicBlock.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBasicBlock.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$HInstruction()));
|
| + return this.add(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HBasicBlock.prototype.forEachPhi$1 = function($0) {
|
| return this.forEachPhi(to$call$1($0));
|
| };
|
| HBasicBlock.prototype.isExitBlock$0 = HBasicBlock.prototype.isExitBlock;
|
| HBasicBlock.prototype.removePhi$1 = function($0) {
|
| - return this.removePhi(($0 && $0.is$HPhi()));
|
| + return this.removePhi(($0 == null ? null : $0.assert$HPhi()));
|
| };
|
| // ********** Code for HLoopInformation **************
|
| function HLoopInformation(header) {
|
| @@ -8674,7 +9064,7 @@ HLoopInformation.prototype.addBlock = function(block) {
|
| this.blocks.add(block);
|
| for (var i = 0, length = block.predecessors.length;
|
| i < length; i++) {
|
| - this.addBlock((($0 = block.predecessors.$index(i)) && $0.is$HBasicBlock()));
|
| + this.addBlock((($0 = block.predecessors.$index(i)) == null ? null : $0.assert$HBasicBlock()));
|
| }
|
| }
|
| }
|
| @@ -8684,7 +9074,7 @@ HLoopInformation.prototype.getLastBackEdge = function() {
|
| var result = null;
|
| for (var i = 0, length = this.backEdges.length;
|
| i < length; i++) {
|
| - var current = (($0 = this.backEdges.$index(i)) && $0.is$HBasicBlock());
|
| + var current = (($0 = this.backEdges.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| if (current.id > maxId) {
|
| maxId = current.id;
|
| result = current;
|
| @@ -8703,7 +9093,7 @@ function HInstruction(inputs) {
|
| this.usedBy = [];
|
| // Initializers done
|
| }
|
| -HInstruction.prototype.is$HInstruction = function(){return this;};
|
| +HInstruction.prototype.assert$HInstruction = function(){return this};
|
| HInstruction.prototype.get$id = function() { return this.id; };
|
| HInstruction.prototype.get$inputs = function() { return this.inputs; };
|
| HInstruction.prototype.get$usedBy = function() { return this.usedBy; };
|
| @@ -8866,7 +9256,7 @@ HInstruction.prototype.notifyRemovedFromBlock = function(block) {
|
| $assert(this.block === block, "this.block === block", "nodes.dart", 761, 12);
|
| for (var i = 0;
|
| i < this.inputs.length; i++) {
|
| - var inputUsedBy = (($0 = this.inputs.$index(i).get$usedBy()) && $0.is$List());
|
| + var inputUsedBy = (($0 = this.inputs.$index(i).get$usedBy()) == null ? null : $0.assert$List());
|
| for (var j = 0;
|
| j < inputUsedBy.length; j++) {
|
| if (inputUsedBy.$index(j) === this) {
|
| @@ -8895,17 +9285,17 @@ HInstruction.prototype.isValid = function() {
|
| return validator.isValid;
|
| }
|
| HInstruction.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HInstruction.prototype.block$0 = function() {
|
| return this.block();
|
| };
|
| HInstruction.prototype.clearGenerateAtUseSite$0 = HInstruction.prototype.clearGenerateAtUseSite;
|
| HInstruction.prototype.computeDesiredInputType$1 = function($0) {
|
| - return this.computeDesiredInputType(($0 && $0.is$HInstruction()));
|
| + return this.computeDesiredInputType(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HInstruction.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HInstruction.prototype.hashCode$0 = HInstruction.prototype.hashCode;
|
| HInstruction.prototype.isInBasicBlock$0 = HInstruction.prototype.isInBasicBlock;
|
| @@ -8944,10 +9334,10 @@ HBoolify.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HBoolify.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBoolify.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HTypeGuard **************
|
| function HTypeGuard(type, value) {
|
| @@ -8956,7 +9346,7 @@ function HTypeGuard(type, value) {
|
| this.type = $assert_num(type);
|
| }
|
| $inherits(HTypeGuard, HInstruction);
|
| -HTypeGuard.prototype.is$HTypeGuard = function(){return this;};
|
| +HTypeGuard.prototype.assert$HTypeGuard = function(){return this};
|
| HTypeGuard.prototype.prepareGvn = function() {
|
| $assert(!$notnull_bool(this.hasSideEffects()), "!hasSideEffects()", "nodes.dart", 811, 12);
|
| this.setUseGvn();
|
| @@ -8977,10 +9367,10 @@ HTypeGuard.prototype.dataEquals = function(other) {
|
| return this.type == other.type;
|
| }
|
| HTypeGuard.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HTypeGuard.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HTypeGuard()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HTypeGuard()));
|
| };
|
| // ********** Code for HConditionalBranch **************
|
| function HConditionalBranch(inputs) {
|
| @@ -9011,7 +9401,7 @@ HInvoke.prototype.accept = function(visitor) {
|
| return visitor.visitInvoke(this);
|
| }
|
| HInvoke.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HInvoke.prototype.toString$0 = HInvoke.prototype.toString;
|
| // ********** Code for HForeign **************
|
| @@ -9026,7 +9416,7 @@ HForeign.prototype.accept = function(visitor) {
|
| return visitor.visitForeign(this);
|
| }
|
| HForeign.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| // ********** Code for HArithmetic **************
|
| function HArithmetic(element, inputs) {
|
| @@ -9058,7 +9448,7 @@ HArithmetic.prototype.hasExpectedType = function() {
|
| return this.type == 2/*HInstruction.TYPE_NUMBER*/;
|
| }
|
| HArithmetic.prototype.computeDesiredInputType$1 = function($0) {
|
| - return this.computeDesiredInputType(($0 && $0.is$HInstruction()));
|
| + return this.computeDesiredInputType(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBinaryArithmetic **************
|
| function HBinaryArithmetic(element, left, right) {
|
| @@ -9069,8 +9459,8 @@ $inherits(HBinaryArithmetic, HArithmetic);
|
| HBinaryArithmetic.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(0).isLiteralNumber$0()) && $notnull_bool(this.inputs.$index(1).isLiteralNumber$0())) {
|
| - var op1 = (($0 = this.inputs.$index(0)) && $0.is$HLiteral());
|
| - var op2 = (($0 = this.inputs.$index(1)) && $0.is$HLiteral());
|
| + var op1 = (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| + var op2 = (($0 = this.inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| return new HLiteral(this.evaluate($assert_num(op1.value), $assert_num(op2.value)));
|
| }
|
| return this;
|
| @@ -9111,13 +9501,13 @@ HAdd.prototype.hasExpectedType = function() {
|
| return this.type == 0/*HInstruction.TYPE_UNKNOWN*/;
|
| }
|
| HAdd.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HAdd.prototype.computeDesiredInputType$1 = function($0) {
|
| - return this.computeDesiredInputType(($0 && $0.is$HInstruction()));
|
| + return this.computeDesiredInputType(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HAdd.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HDivide **************
|
| function HDivide(element, left, right) {
|
| @@ -9138,10 +9528,10 @@ HDivide.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HDivide.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HDivide.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HModulo **************
|
| function HModulo(element, left, right) {
|
| @@ -9162,10 +9552,10 @@ HModulo.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HModulo.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HModulo.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HMultiply **************
|
| function HMultiply(element, left, right) {
|
| @@ -9186,10 +9576,10 @@ HMultiply.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HMultiply.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HMultiply.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HSubtract **************
|
| function HSubtract(element, left, right) {
|
| @@ -9210,10 +9600,10 @@ HSubtract.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HSubtract.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HSubtract.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HTruncatingDivide **************
|
| function HTruncatingDivide(element, left, right) {
|
| @@ -9240,10 +9630,10 @@ HTruncatingDivide.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HTruncatingDivide.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HTruncatingDivide.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBinaryBitOp **************
|
| function HBinaryBitOp(element, left, right) {
|
| @@ -9254,8 +9644,8 @@ $inherits(HBinaryBitOp, HBinaryArithmetic);
|
| HBinaryBitOp.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(0).isLiteralNumber$0()) && $notnull_bool(this.inputs.$index(1).isLiteralNumber$0())) {
|
| - var op1 = (($0 = this.inputs.$index(0)) && $0.is$HLiteral());
|
| - var op2 = (($0 = this.inputs.$index(1)) && $0.is$HLiteral());
|
| + var op1 = (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| + var op2 = (($0 = this.inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| if ((typeof(op1.value) == 'number') && (typeof(op2.value) == 'number')) {
|
| return new HLiteral(this.evaluate($assert_num(op1.value), $assert_num(op2.value)));
|
| }
|
| @@ -9275,7 +9665,7 @@ HShiftLeft.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(1).isLiteralNumber$0())) {
|
| var MAX_SHIFT_LEFT_AMOUNT = 50;
|
| - var op2 = (($0 = this.inputs.$index(1)) && $0.is$HLiteral());
|
| + var op2 = (($0 = this.inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| if (op2.value < 0 || op2.value > MAX_SHIFT_LEFT_AMOUNT) return this;
|
| }
|
| return HBinaryBitOp.prototype.fold.call(this);
|
| @@ -9290,10 +9680,10 @@ HShiftLeft.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HShiftLeft.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HShiftLeft.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HShiftRight **************
|
| function HShiftRight(element, left, right) {
|
| @@ -9307,7 +9697,7 @@ HShiftRight.prototype.accept = function(visitor) {
|
| HShiftRight.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(1).isLiteralNumber$0())) {
|
| - var op2 = (($0 = this.inputs.$index(1)) && $0.is$HLiteral());
|
| + var op2 = (($0 = this.inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| if (op2.value < 0) return this;
|
| }
|
| return HBinaryBitOp.prototype.fold.call(this);
|
| @@ -9322,10 +9712,10 @@ HShiftRight.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HShiftRight.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HShiftRight.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBitOr **************
|
| function HBitOr(element, left, right) {
|
| @@ -9346,10 +9736,10 @@ HBitOr.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HBitOr.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBitOr.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBitAnd **************
|
| function HBitAnd(element, left, right) {
|
| @@ -9370,10 +9760,10 @@ HBitAnd.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HBitAnd.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBitAnd.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBitXor **************
|
| function HBitXor(element, left, right) {
|
| @@ -9394,10 +9784,10 @@ HBitXor.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HBitXor.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBitXor.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HUnaryArithmetic **************
|
| function HUnaryArithmetic(element, input) {
|
| @@ -9417,7 +9807,7 @@ HNegate.prototype.accept = function(visitor) {
|
| HNegate.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(0).isLiteralNumber$0())) {
|
| - var input = (($0 = this.inputs.$index(0)) && $0.is$HLiteral());
|
| + var input = (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| return new HLiteral(this.evaluate($assert_num(input.value)));
|
| }
|
| return this;
|
| @@ -9432,10 +9822,10 @@ HNegate.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HNegate.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HNegate.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HBitNot **************
|
| function HBitNot(element, input) {
|
| @@ -9449,7 +9839,7 @@ HBitNot.prototype.accept = function(visitor) {
|
| HBitNot.prototype.fold = function() {
|
| var $0;
|
| if ($notnull_bool(this.inputs.$index(0).isLiteralNumber$0())) {
|
| - var input = (($0 = this.inputs.$index(0)) && $0.is$HLiteral());
|
| + var input = (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| if ((typeof(input.value) == 'number')) return new HLiteral(this.evaluate($assert_num(input.value)));
|
| }
|
| return this;
|
| @@ -9464,10 +9854,10 @@ HBitNot.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HBitNot.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HBitNot.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HExit **************
|
| function HExit() {
|
| @@ -9482,7 +9872,7 @@ HExit.prototype.accept = function(visitor) {
|
| return visitor.visitExit(this);
|
| }
|
| HExit.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HExit.prototype.toString$0 = HExit.prototype.toString;
|
| // ********** Code for HGoto **************
|
| @@ -9498,7 +9888,7 @@ HGoto.prototype.accept = function(visitor) {
|
| return visitor.visitGoto(this);
|
| }
|
| HGoto.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HGoto.prototype.toString$0 = HGoto.prototype.toString;
|
| // ********** Code for HIf **************
|
| @@ -9515,7 +9905,7 @@ HIf.prototype.accept = function(visitor) {
|
| return visitor.visitIf(this);
|
| }
|
| HIf.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HIf.prototype.toString$0 = HIf.prototype.toString;
|
| // ********** Code for HLoopBranch **************
|
| @@ -9531,7 +9921,7 @@ HLoopBranch.prototype.accept = function(visitor) {
|
| return visitor.visitLoopBranch(this);
|
| }
|
| HLoopBranch.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLoopBranch.prototype.toString$0 = HLoopBranch.prototype.toString;
|
| // ********** Code for HLiteral **************
|
| @@ -9541,7 +9931,7 @@ function HLiteral(value) {
|
| HInstruction.call(this, []);
|
| }
|
| $inherits(HLiteral, HInstruction);
|
| -HLiteral.prototype.is$HLiteral = function(){return this;};
|
| +HLiteral.prototype.assert$HLiteral = function(){return this};
|
| HLiteral.prototype.get$value = function() { return this.value; };
|
| HLiteral.prototype.prepareGvn = function() {
|
| $assert(!$notnull_bool(this.hasSideEffects()), "!hasSideEffects()", "nodes.dart", 1139, 12);
|
| @@ -9582,7 +9972,7 @@ HLiteral.prototype.isLiteralNumber = function() {
|
| }
|
| HLiteral.prototype.isLiteralString = function() {
|
| var $0;
|
| - return !!(($0 = this.value) && $0.is$SourceString);
|
| + return !!(($0 = this.value) && $0.is$SourceString());
|
| }
|
| HLiteral.prototype.typeEquals = function(other) {
|
| return (other instanceof HLiteral);
|
| @@ -9591,10 +9981,10 @@ HLiteral.prototype.dataEquals = function(other) {
|
| return $assert_bool($eq(this.value, other.value));
|
| }
|
| HLiteral.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLiteral.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HLiteral()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HLiteral()));
|
| };
|
| HLiteral.prototype.isLiteralNumber$0 = HLiteral.prototype.isLiteralNumber;
|
| HLiteral.prototype.isLiteralString$0 = HLiteral.prototype.isLiteralString;
|
| @@ -9625,10 +10015,10 @@ HNot.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HNot.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HNot.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HParameterValue **************
|
| function HParameterValue(element) {
|
| @@ -9638,7 +10028,7 @@ function HParameterValue(element) {
|
| this.setGenerateAtUseSite();
|
| }
|
| $inherits(HParameterValue, HInstruction);
|
| -HParameterValue.prototype.is$HParameterValue = function(){return this;};
|
| +HParameterValue.prototype.assert$HParameterValue = function(){return this};
|
| HParameterValue.prototype.get$element = function() { return this.element; };
|
| HParameterValue.prototype.prepareGvn = function() {
|
| $assert(!$notnull_bool(this.hasSideEffects()), "!hasSideEffects()", "nodes.dart", 1191, 12);
|
| @@ -9650,7 +10040,7 @@ HParameterValue.prototype.accept = function(visitor) {
|
| return visitor.visitParameterValue(this);
|
| }
|
| HParameterValue.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HParameterValue.prototype.toString$0 = HParameterValue.prototype.toString;
|
| // ********** Code for HPhi **************
|
| @@ -9668,7 +10058,7 @@ HPhi.manyInputs$ctor = function(element, inputs) {
|
| }
|
| HPhi.manyInputs$ctor.prototype = HPhi.prototype;
|
| $inherits(HPhi, HInstruction);
|
| -HPhi.prototype.is$HPhi = function(){return this;};
|
| +HPhi.prototype.assert$HPhi = function(){return this};
|
| HPhi.prototype.get$element = function() { return this.element; };
|
| HPhi.prototype.addInput = function(input) {
|
| $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 1208, 12);
|
| @@ -9703,10 +10093,10 @@ HPhi.prototype.accept = function(visitor) {
|
| return visitor.visitPhi(this);
|
| }
|
| HPhi.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HPhi.prototype.computeDesiredInputType$1 = function($0) {
|
| - return this.computeDesiredInputType(($0 && $0.is$HInstruction()));
|
| + return this.computeDesiredInputType(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| HPhi.prototype.toString$0 = HPhi.prototype.toString;
|
| // ********** Code for HRelational **************
|
| @@ -9738,7 +10128,7 @@ HRelational.prototype.hasExpectedType = function() {
|
| return this.type == 1/*HInstruction.TYPE_BOOLEAN*/;
|
| }
|
| HRelational.prototype.computeDesiredInputType$1 = function($0) {
|
| - return this.computeDesiredInputType(($0 && $0.is$HInstruction()));
|
| + return this.computeDesiredInputType(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HEquals **************
|
| function HEquals(element, left, right) {
|
| @@ -9759,10 +10149,10 @@ HEquals.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HEquals.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HEquals.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HGreater **************
|
| function HGreater(element, left, right) {
|
| @@ -9783,10 +10173,10 @@ HGreater.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HGreater.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HGreater.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HGreaterEqual **************
|
| function HGreaterEqual(element, left, right) {
|
| @@ -9807,10 +10197,10 @@ HGreaterEqual.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HGreaterEqual.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HGreaterEqual.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HLess **************
|
| function HLess(element, left, right) {
|
| @@ -9831,10 +10221,10 @@ HLess.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HLess.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLess.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HLessEqual **************
|
| function HLessEqual(element, left, right) {
|
| @@ -9855,10 +10245,10 @@ HLessEqual.prototype.dataEquals = function(other) {
|
| return true;
|
| }
|
| HLessEqual.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLessEqual.prototype.dataEquals$1 = function($0) {
|
| - return this.dataEquals(($0 && $0.is$HInstruction()));
|
| + return this.dataEquals(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HReturn **************
|
| function HReturn(value) {
|
| @@ -9873,7 +10263,7 @@ HReturn.prototype.accept = function(visitor) {
|
| return visitor.visitReturn(this);
|
| }
|
| HReturn.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HReturn.prototype.toString$0 = HReturn.prototype.toString;
|
| // ********** Code for HThrow **************
|
| @@ -9889,7 +10279,7 @@ HThrow.prototype.accept = function(visitor) {
|
| return visitor.visitThrow(this);
|
| }
|
| HThrow.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HThrow.prototype.toString$0 = HThrow.prototype.toString;
|
| // ********** Code for HNonSsaInstruction **************
|
| @@ -9913,7 +10303,7 @@ function HLoad(local, type) {
|
| $inherits(HLoad, HNonSsaInstruction);
|
| HLoad.prototype.get$local = function() {
|
| var $0;
|
| - return (($0 = this.inputs.$index(0)) && $0.is$HLocal());
|
| + return (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLocal());
|
| }
|
| HLoad.prototype.toString = function() {
|
| return 'load';
|
| @@ -9922,7 +10312,7 @@ HLoad.prototype.accept = function(visitor) {
|
| return visitor.visitLoad(this);
|
| }
|
| HLoad.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLoad.prototype.toString$0 = HLoad.prototype.toString;
|
| // ********** Code for HStore **************
|
| @@ -9933,11 +10323,11 @@ function HStore(local, value) {
|
| $inherits(HStore, HNonSsaInstruction);
|
| HStore.prototype.get$local = function() {
|
| var $0;
|
| - return (($0 = this.inputs.$index(0)) && $0.is$HLocal());
|
| + return (($0 = this.inputs.$index(0)) == null ? null : $0.assert$HLocal());
|
| }
|
| HStore.prototype.get$value = function() {
|
| var $0;
|
| - return (($0 = this.inputs.$index(1)) && $0.is$HInstruction());
|
| + return (($0 = this.inputs.$index(1)) == null ? null : $0.assert$HInstruction());
|
| }
|
| HStore.prototype.toString = function() {
|
| return 'store';
|
| @@ -9946,7 +10336,7 @@ HStore.prototype.accept = function(visitor) {
|
| return visitor.visitStore(this);
|
| }
|
| HStore.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HStore.prototype.toString$0 = HStore.prototype.toString;
|
| // ********** Code for HLocal **************
|
| @@ -9957,7 +10347,7 @@ function HLocal(element) {
|
| this.declaredBy = this;
|
| }
|
| $inherits(HLocal, HNonSsaInstruction);
|
| -HLocal.prototype.is$HLocal = function(){return this;};
|
| +HLocal.prototype.assert$HLocal = function(){return this};
|
| HLocal.prototype.get$element = function() { return this.element; };
|
| HLocal.prototype.set$element = function(value) { return this.element = value; };
|
| HLocal.prototype.toString = function() {
|
| @@ -9967,7 +10357,7 @@ HLocal.prototype.accept = function(visitor) {
|
| return visitor.visitLocal(this);
|
| }
|
| HLocal.prototype.accept$1 = function($0) {
|
| - return this.accept(($0 && $0.is$HVisitor()));
|
| + return this.accept(($0 == null ? null : $0.assert$HVisitor()));
|
| };
|
| HLocal.prototype.toString$0 = HLocal.prototype.toString;
|
| // ********** Code for SsaOptimizerTask **************
|
| @@ -10006,7 +10396,7 @@ SsaConstantFolder.prototype.visitBasicBlock = function(block) {
|
| var instruction = block.first;
|
| while (instruction != null) {
|
| var next = instruction.next;
|
| - var replacement = (($0 = instruction.accept(this)) && $0.is$HInstruction());
|
| + var replacement = (($0 = instruction.accept(this)) == null ? null : $0.assert$HInstruction());
|
| if (replacement !== instruction) {
|
| if (!$notnull_bool(replacement.isInBasicBlock())) {
|
| block.addAfter(instruction, replacement);
|
| @@ -10024,7 +10414,7 @@ SsaConstantFolder.prototype.visitBoolify = function(node) {
|
| var $0;
|
| var inputs = node.inputs;
|
| $assert(inputs.length == 1, "inputs.length == 1", "optimize.dart", 56, 12);
|
| - var input = (($0 = inputs.$index(0)) && $0.is$HInstruction());
|
| + var input = (($0 = inputs.$index(0)) == null ? null : $0.assert$HInstruction());
|
| if ($notnull_bool(input.isBoolean())) return input;
|
| if (!$notnull_bool(input.isUnknown())) return new HLiteral(false);
|
| return node;
|
| @@ -10033,9 +10423,9 @@ SsaConstantFolder.prototype.visitNot = function(node) {
|
| var $0;
|
| var inputs = node.inputs;
|
| $assert(inputs.length == 1, "inputs.length == 1", "optimize.dart", 66, 12);
|
| - var input = (($0 = inputs.$index(0)) && $0.is$HInstruction());
|
| + var input = (($0 = inputs.$index(0)) == null ? null : $0.assert$HInstruction());
|
| if ((input instanceof HLiteral)) {
|
| - var literal = (input && input.is$HLiteral());
|
| + var literal = (input == null ? null : input.assert$HLiteral());
|
| return new HLiteral(literal.value !== true);
|
| }
|
| return node;
|
| @@ -10046,8 +10436,8 @@ SsaConstantFolder.prototype.visitArithmetic = function(node) {
|
| SsaConstantFolder.prototype.visitAdd = function(node) {
|
| var $0;
|
| if ($notnull_bool(node.inputs.$index(0).isLiteralString$0()) && (node.inputs.$index(1) instanceof HLiteral)) {
|
| - var op1 = (($0 = node.inputs.$index(0)) && $0.is$HLiteral());
|
| - var op2 = (($0 = node.inputs.$index(1)) && $0.is$HLiteral());
|
| + var op1 = (($0 = node.inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| + var op2 = (($0 = node.inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| return new HLiteral(new StringWrapper(("" + op1.value + " + " + op2.value)));
|
| }
|
| return this.visitArithmetic(node);
|
| @@ -10057,8 +10447,8 @@ SsaConstantFolder.prototype.visitRelational = function(node) {
|
| var inputs = node.inputs;
|
| $assert(inputs.length == 2, "inputs.length == 2", "optimize.dart", 93, 12);
|
| if ($notnull_bool(inputs.$index(0).isLiteralNumber$0()) && $notnull_bool(inputs.$index(1).isLiteralNumber$0())) {
|
| - var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral());
|
| - var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral());
|
| + var op1 = (($0 = inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| + var op2 = (($0 = inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| var folded = node.evaluate($assert_num(op1.value), $assert_num(op2.value));
|
| return new HLiteral(folded);
|
| }
|
| @@ -10068,16 +10458,16 @@ SsaConstantFolder.prototype.visitEquals = function(node) {
|
| var $0;
|
| var inputs = node.inputs;
|
| if ((inputs.$index(0) instanceof HLiteral) && (inputs.$index(1) instanceof HLiteral)) {
|
| - var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral());
|
| - var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral());
|
| + var op1 = (($0 = inputs.$index(0)) == null ? null : $0.assert$HLiteral());
|
| + var op2 = (($0 = inputs.$index(1)) == null ? null : $0.assert$HLiteral());
|
| return new HLiteral($eq(op1.value, op2.value));
|
| }
|
| return node;
|
| }
|
| SsaConstantFolder.prototype.visitTypeGuard = function(node) {
|
| var $0;
|
| - var value = (($0 = node.inputs.$index(0)) && $0.is$HInstruction());
|
| - return (($0 = (value.type == node.type) ? value : node) && $0.is$HInstruction());
|
| + var value = (($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction());
|
| + return (($0 = (value.type == node.type) ? value : node) == null ? null : $0.assert$HInstruction());
|
| }
|
| // ********** Code for SsaTypePropagator **************
|
| function SsaTypePropagator() {
|
| @@ -10116,7 +10506,7 @@ SsaTypePropagator.prototype.processWorklist = function() {
|
| var $0;
|
| while (!this.worklist.isEmpty()) {
|
| var id = $assert_num(this.worklist.removeLast());
|
| - var instruction = (($0 = this.workmap.$index(id)) && $0.is$HInstruction());
|
| + var instruction = (($0 = this.workmap.$index(id)) == null ? null : $0.assert$HInstruction());
|
| $assert(instruction != null, "instruction !== null", "optimize.dart", 156, 14);
|
| this.workmap.remove(id);
|
| if ($notnull_bool(instruction.updateType())) this.addUsersAndInputsToWorklist(instruction);
|
| @@ -10126,11 +10516,11 @@ SsaTypePropagator.prototype.addUsersAndInputsToWorklist = function(instruction)
|
| var $0;
|
| for (var i = 0, length = instruction.usedBy.length;
|
| i < length; i++) {
|
| - this.addToWorklist((($0 = instruction.usedBy.$index(i)) && $0.is$HInstruction()));
|
| + this.addToWorklist((($0 = instruction.usedBy.$index(i)) == null ? null : $0.assert$HInstruction()));
|
| }
|
| for (var i = 0, length = instruction.inputs.length;
|
| i < length; i++) {
|
| - this.addToWorklist((($0 = instruction.inputs.$index(i)) && $0.is$HInstruction()));
|
| + this.addToWorklist((($0 = instruction.inputs.$index(i)) == null ? null : $0.assert$HInstruction()));
|
| }
|
| }
|
| SsaTypePropagator.prototype.addToWorklist = function(instruction) {
|
| @@ -10186,7 +10576,7 @@ SsaDeadCodeEliminator.prototype.visitBasicBlock = function(block) {
|
| while (instruction != null) {
|
| var previous = instruction.previous;
|
| if ($notnull_bool(SsaDeadCodeEliminator.isDeadCode(instruction))) block.remove(instruction);
|
| - instruction = (previous && previous.is$HInstruction());
|
| + instruction = (previous == null ? null : previous.assert$HInstruction());
|
| }
|
| }
|
| // ********** Code for SsaDeadPhiEliminator **************
|
| @@ -10214,7 +10604,7 @@ SsaDeadPhiEliminator.prototype.visitGraph = function(graph) {
|
| );
|
| }
|
| while (!worklist.isEmpty()) {
|
| - var phi = (($0 = worklist.removeLast()) && $0.is$HPhi());
|
| + var phi = (($0 = worklist.removeLast()) == null ? null : $0.assert$HPhi());
|
| var $list = phi.inputs;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var input = $list.$index($i);
|
| @@ -10227,10 +10617,10 @@ SsaDeadPhiEliminator.prototype.visitGraph = function(graph) {
|
| var $list = graph.blocks;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var block = $list.$index($i);
|
| - var current = (($0 = block.get$phis().get$first()) && $0.is$HPhi());
|
| + var current = (($0 = block.get$phis().get$first()) == null ? null : $0.assert$HPhi());
|
| var next = null;
|
| while (current != null) {
|
| - next = (($0 = current.next) && $0.is$HPhi());
|
| + next = (($0 = current.next) == null ? null : $0.assert$HPhi());
|
| if (!livePhis.contains(current)) block.removePhi$1(current);
|
| current = next;
|
| }
|
| @@ -10252,13 +10642,13 @@ SsaRedundantPhiEliminator.prototype.visitGraph = function(graph) {
|
| );
|
| }
|
| while (!worklist.isEmpty()) {
|
| - var phi = (($0 = worklist.removeLast()) && $0.is$HPhi());
|
| + var phi = (($0 = worklist.removeLast()) == null ? null : $0.assert$HPhi());
|
| if (!$notnull_bool(phi.isInBasicBlock())) continue;
|
| $assert(phi.inputs.$index(0) !== phi, "phi.inputs[0] !== phi", "optimize.dart", 295, 14);
|
| - var candidate = (($0 = phi.inputs.$index(0)) && $0.is$HInstruction());
|
| + var candidate = (($0 = phi.inputs.$index(0)) == null ? null : $0.assert$HInstruction());
|
| for (var i = 1;
|
| i < phi.inputs.length; i++) {
|
| - var input = (($0 = phi.inputs.$index(i)) && $0.is$HInstruction());
|
| + var input = (($0 = phi.inputs.$index(i)) == null ? null : $0.assert$HInstruction());
|
| if (input !== candidate && input !== phi) {
|
| candidate = null;
|
| break;
|
| @@ -10289,20 +10679,20 @@ SsaGlobalValueNumberer.prototype.moveLoopInvariantCode = function(graph) {
|
| var $0;
|
| for (var i = graph.blocks.length - 1;
|
| i >= 0; i--) {
|
| - var block = (($0 = graph.blocks.$index(i)) && $0.is$HBasicBlock());
|
| + var block = (($0 = graph.blocks.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| if ($notnull_bool(block.isLoopHeader())) {
|
| var changesFlags = $assert_num(this.loopChangesFlags.$index(block.id));
|
| var last = block.loopInformation.getLastBackEdge();
|
| for (var j = block.id;
|
| j <= last.id; j++) {
|
| - this.moveLoopInvariantCodeFromBlock((($0 = graph.blocks.$index(j)) && $0.is$HBasicBlock()), block, changesFlags);
|
| + this.moveLoopInvariantCodeFromBlock((($0 = graph.blocks.$index(j)) == null ? null : $0.assert$HBasicBlock()), block, changesFlags);
|
| }
|
| }
|
| }
|
| }
|
| SsaGlobalValueNumberer.prototype.moveLoopInvariantCodeFromBlock = function(block, loopHeader, changesFlags) {
|
| var $0;
|
| - var preheader = (($0 = loopHeader.predecessors.$index(0)) && $0.is$HBasicBlock());
|
| + var preheader = (($0 = loopHeader.predecessors.$index(0)) == null ? null : $0.assert$HBasicBlock());
|
| var dependsFlags = HInstruction.computeDependsOnFlags(changesFlags);
|
| var instruction = block.first;
|
| while (instruction != null) {
|
| @@ -10312,7 +10702,7 @@ SsaGlobalValueNumberer.prototype.moveLoopInvariantCodeFromBlock = function(block
|
| var inputs = instruction.inputs;
|
| for (var i = 0, length = inputs.length;
|
| i < length; i++) {
|
| - if ($notnull_bool(this.isInputDefinedAfterDominator((($0 = inputs.$index(i)) && $0.is$HInstruction()), preheader))) {
|
| + if ($notnull_bool(this.isInputDefinedAfterDominator((($0 = inputs.$index(i)) == null ? null : $0.assert$HInstruction()), preheader))) {
|
| loopInvariantInputs = false;
|
| break;
|
| }
|
| @@ -10353,7 +10743,7 @@ SsaGlobalValueNumberer.prototype.visitBasicBlock = function(block, values) {
|
| var dominatedBlocks = block.dominatedBlocks;
|
| for (var i = 0, length = dominatedBlocks.length;
|
| i < length; i++) {
|
| - var dominated = (($0 = dominatedBlocks.$index(i)) && $0.is$HBasicBlock());
|
| + var dominated = (($0 = dominatedBlocks.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| var successorValues = (i == length - 1) ? values : values.copy();
|
| $assert(block.id < dominated.id, "block.id < dominated.id", "optimize.dart", 414, 14);
|
| if (!$notnull_bool(successorValues.isEmpty()) && block.id + 1 < dominated.id) {
|
| @@ -10373,7 +10763,7 @@ SsaGlobalValueNumberer.prototype.computeChangesFlags = function(graph) {
|
| i < length; i++) this.loopChangesFlags.$setindex(i, 0);
|
| for (var i = length - 1;
|
| i >= 0; i--) {
|
| - var block = (($0 = graph.blocks.$index(i)) && $0.is$HBasicBlock());
|
| + var block = (($0 = graph.blocks.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| var id = block.id;
|
| var changesFlags = 0;
|
| var instruction = block.first;
|
| @@ -10399,7 +10789,7 @@ SsaGlobalValueNumberer.prototype.getChangesFlagsForDominatedBlock = function(dom
|
| var predecessors = dominated.predecessors;
|
| for (var i = 0, length = predecessors.length;
|
| i < length; i++) {
|
| - var block = (($0 = predecessors.$index(i)) && $0.is$HBasicBlock());
|
| + var block = (($0 = predecessors.$index(i)) == null ? null : $0.assert$HBasicBlock());
|
| var id = block.id;
|
| if (dominator.id < id && id < dominated.id && !this.visited.contains(id)) {
|
| this.visited.add(id);
|
| @@ -10433,11 +10823,11 @@ SsaInstructionMerger.prototype.visitInstruction = function(node) {
|
| var i = inputs.length - 1;
|
| for (; i >= 0; i--) {
|
| if (previousUnused == null) break;
|
| - var input = (($0 = inputs.$index(i)) && $0.is$HInstruction());
|
| + var input = (($0 = inputs.$index(i)) == null ? null : $0.assert$HInstruction());
|
| if (input.usedBy.length != 1) break;
|
| if (input !== previousUnused) break;
|
| var remarkTypeGuardInput = false;
|
| - if ((input instanceof HTypeGuard)) remarkTypeGuardInput = this.typeGuardCheck((input && input.is$HTypeGuard()));
|
| + if ((input instanceof HTypeGuard)) remarkTypeGuardInput = this.typeGuardCheck((input == null ? null : input.assert$HTypeGuard()));
|
| if (!$notnull_bool(input.generateAtUseSite())) {
|
| this.markedByMerger.add(input);
|
| input.setGenerateAtUseSite();
|
| @@ -10446,8 +10836,8 @@ SsaInstructionMerger.prototype.visitInstruction = function(node) {
|
| previousUnused = previousUnused.previous;
|
| }
|
| for (; i >= 0; i--) {
|
| - var input = (($0 = inputs.$index(i)) && $0.is$HInstruction());
|
| - if ((input instanceof HTypeGuard)) this.typeGuardCheck((input && input.is$HTypeGuard()));
|
| + var input = (($0 = inputs.$index(i)) == null ? null : $0.assert$HInstruction());
|
| + if ((input instanceof HTypeGuard)) this.typeGuardCheck((input == null ? null : input.assert$HTypeGuard()));
|
| }
|
| }
|
| // ********** Code for SsaTypeGuardUnuser **************
|
| @@ -10462,7 +10852,7 @@ SsaTypeGuardUnuser.prototype.visitGraph = function(graph) {
|
| SsaTypeGuardUnuser.prototype.visitTypeGuard = function(node) {
|
| var $0;
|
| if ($notnull_bool(node.generateAtUseSite())) return;
|
| - this.currentBlock.rewrite(node, (($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + this.currentBlock.rewrite(node, (($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| }
|
| // ********** Code for SsaPhiEliminator **************
|
| function SsaPhiEliminator() {
|
| @@ -10510,9 +10900,9 @@ SsaPhiEliminator.prototype.visitBasicBlock = function(block) {
|
| var $0;
|
| this.currentBlock = block;
|
| var loads = [];
|
| - var phi = (($0 = block.phis.first) && $0.is$HPhi());
|
| + var phi = (($0 = block.phis.first) == null ? null : $0.assert$HPhi());
|
| while (phi != null) {
|
| - var next = (($0 = phi.next) && $0.is$HPhi());
|
| + var next = (($0 = phi.next) == null ? null : $0.assert$HPhi());
|
| this.visitPhi(phi, loads);
|
| phi = next;
|
| }
|
| @@ -10531,7 +10921,7 @@ SsaPhiEliminator.prototype.visitPhi = function(phi, loads) {
|
| }
|
| return local0;
|
| })
|
| - )) && $0.is$HLocal());
|
| + )) == null ? null : $0.assert$HLocal());
|
| }
|
| else {
|
| local = new HLocal(null);
|
| @@ -10541,10 +10931,10 @@ SsaPhiEliminator.prototype.visitPhi = function(phi, loads) {
|
| var stores = [];
|
| for (var i = 0, len = predecessors.length;
|
| i < len; i++) {
|
| - var value = (($0 = phi.inputs.$index(i)) && $0.is$HInstruction());
|
| + var value = (($0 = phi.inputs.$index(i)) == null ? null : $0.assert$HInstruction());
|
| if ((value instanceof HLoad) && value.get$dynamic().get$local() === local) continue;
|
| if (((value instanceof HPhi)) && (local.element != null) && (value.get$dynamic().get$element() === local.element)) continue;
|
| - var store = this.addStore((($0 = predecessors.$index(i)) && $0.is$HBasicBlock()), this.currentBlock.dominator, local, value);
|
| + var store = this.addStore((($0 = predecessors.$index(i)) == null ? null : $0.assert$HBasicBlock()), this.currentBlock.dominator, local, value);
|
| if (store != null) {
|
| if (local.declaredBy === local) {
|
| var storeBlock = store.block;
|
| @@ -10672,9 +11062,9 @@ HTracer.prototype.visitBasicBlock = function(block) {
|
| $this.printProperty("method", "None");
|
| block.forEachPhi((function (phi) {
|
| var $0;
|
| - var phiId = stringifier.temporaryId((phi && phi.is$HInstruction()));
|
| - var inputId1 = stringifier.temporaryId((($0 = phi.get$inputs().$index(0)) && $0.is$HInstruction()));
|
| - var inputId2 = stringifier.temporaryId((($0 = phi.get$inputs().$index(1)) && $0.is$HInstruction()));
|
| + var phiId = stringifier.temporaryId((phi == null ? null : phi.assert$HInstruction()));
|
| + var inputId1 = stringifier.temporaryId((($0 = phi.get$inputs().$index(0)) == null ? null : $0.assert$HInstruction()));
|
| + var inputId2 = stringifier.temporaryId((($0 = phi.get$inputs().$index(1)) == null ? null : $0.assert$HInstruction()));
|
| $this.print(("" + phi.get$id() + " " + phiId + " [ " + inputId1 + " " + inputId2 + " ]"));
|
| })
|
| );
|
| @@ -10734,7 +11124,7 @@ function HInstructionStringifier(currentBlock) {
|
| this.currentBlock = currentBlock;
|
| // Initializers done
|
| }
|
| -HInstructionStringifier.prototype.is$HVisitor = function(){return this;};
|
| +HInstructionStringifier.prototype.assert$HVisitor = function(){return this};
|
| HInstructionStringifier.prototype.visit = function(node) {
|
| return node.accept(this);
|
| }
|
| @@ -10778,7 +11168,7 @@ HInstructionStringifier.prototype.temporaryId = function(instruction) {
|
| }
|
| HInstructionStringifier.prototype.visitBoolify = function(node) {
|
| var $0;
|
| - return ("Boolify: " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())));
|
| + return ("Boolify: " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| HInstructionStringifier.prototype.visitAdd = function(node) {
|
| return this.visitInvoke(node);
|
| @@ -10806,7 +11196,7 @@ HInstructionStringifier.prototype.visitExit = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitGoto = function(node) {
|
| var $0;
|
| - var target = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock());
|
| + var target = (($0 = this.currentBlock.successors.$index(0)) == null ? null : $0.assert$HBasicBlock());
|
| return ("Goto: (B" + target.id + ")");
|
| }
|
| HInstructionStringifier.prototype.visitGreater = function(node) {
|
| @@ -10817,9 +11207,9 @@ HInstructionStringifier.prototype.visitGreaterEqual = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitIf = function(node) {
|
| var $0;
|
| - var thenBlock = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock());
|
| - var elseBlock = (($0 = this.currentBlock.successors.$index(1)) && $0.is$HBasicBlock());
|
| - var conditionId = this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| + var thenBlock = (($0 = this.currentBlock.successors.$index(0)) == null ? null : $0.assert$HBasicBlock());
|
| + var elseBlock = (($0 = this.currentBlock.successors.$index(1)) == null ? null : $0.assert$HBasicBlock());
|
| + var conditionId = this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| return ("If (" + conditionId + "): (B" + thenBlock.id + ") else (B" + elseBlock.id + ")");
|
| }
|
| HInstructionStringifier.prototype.visitGenericInvoke = function(invokeType, functionName, arguments) {
|
| @@ -10828,7 +11218,7 @@ HInstructionStringifier.prototype.visitGenericInvoke = function(invokeType, func
|
| for (var i = 0;
|
| i < arguments.length; i++) {
|
| if (i != 0) argumentsString.add(", ");
|
| - argumentsString.add(this.temporaryId((($0 = arguments.$index(i)) && $0.is$HInstruction())));
|
| + argumentsString.add(this.temporaryId((($0 = arguments.$index(i)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| return ("" + invokeType + ": " + functionName + "(" + argumentsString + ")");
|
| }
|
| @@ -10851,7 +11241,7 @@ HInstructionStringifier.prototype.visitLiteral = function(literal) {
|
| }
|
| HInstructionStringifier.prototype.visitLoad = function(node) {
|
| var $0;
|
| - return ("Load: " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())));
|
| + return ("Load: " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| HInstructionStringifier.prototype.visitLocal = function(node) {
|
| if (node.element != null) {
|
| @@ -10863,9 +11253,9 @@ HInstructionStringifier.prototype.visitLocal = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitLoopBranch = function(branch) {
|
| var $0;
|
| - var bodyBlock = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock());
|
| - var exitBlock = (($0 = this.currentBlock.successors.$index(1)) && $0.is$HBasicBlock());
|
| - var conditionId = this.temporaryId((($0 = branch.inputs.$index(0)) && $0.is$HInstruction()));
|
| + var bodyBlock = (($0 = this.currentBlock.successors.$index(0)) == null ? null : $0.assert$HBasicBlock());
|
| + var exitBlock = (($0 = this.currentBlock.successors.$index(1)) == null ? null : $0.assert$HBasicBlock());
|
| + var conditionId = this.temporaryId((($0 = branch.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| return ("While (" + conditionId + "): (B" + bodyBlock.id + ") then (B" + exitBlock.id + ")");
|
| }
|
| HInstructionStringifier.prototype.visitModulo = function(node) {
|
| @@ -10879,18 +11269,18 @@ HInstructionStringifier.prototype.visitNegate = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitNot = function(node) {
|
| var $0;
|
| - return ("Not: " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())));
|
| + return ("Not: " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| HInstructionStringifier.prototype.visitParameterValue = function(node) {
|
| return ("p" + node.element.name);
|
| }
|
| HInstructionStringifier.prototype.visitPhi = function(phi) {
|
| var $0;
|
| - return ("Phi(" + this.temporaryId((($0 = phi.inputs.$index(0)) && $0.is$HInstruction())) + ", " + this.temporaryId((($0 = phi.inputs.$index(1)) && $0.is$HInstruction())) + ")");
|
| + return ("Phi(" + this.temporaryId((($0 = phi.inputs.$index(0)) == null ? null : $0.assert$HInstruction())) + ", " + this.temporaryId((($0 = phi.inputs.$index(1)) == null ? null : $0.assert$HInstruction())) + ")");
|
| }
|
| HInstructionStringifier.prototype.visitReturn = function(node) {
|
| var $0;
|
| - return ("Return " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())));
|
| + return ("Return " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| HInstructionStringifier.prototype.visitShiftLeft = function(node) {
|
| return this.visitInvoke(node);
|
| @@ -10900,8 +11290,8 @@ HInstructionStringifier.prototype.visitShiftRight = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitStore = function(node) {
|
| var $0;
|
| - var localId = this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction()));
|
| - var valueId = this.temporaryId((($0 = node.inputs.$index(1)) && $0.is$HInstruction()));
|
| + var localId = this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction()));
|
| + var valueId = this.temporaryId((($0 = node.inputs.$index(1)) == null ? null : $0.assert$HInstruction()));
|
| return ("Store: " + localId + " := " + valueId);
|
| }
|
| HInstructionStringifier.prototype.visitSubtract = function(node) {
|
| @@ -10909,7 +11299,7 @@ HInstructionStringifier.prototype.visitSubtract = function(node) {
|
| }
|
| HInstructionStringifier.prototype.visitThrow = function(node) {
|
| var $0;
|
| - return ("Throw " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())));
|
| + return ("Throw " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())));
|
| }
|
| HInstructionStringifier.prototype.visitTruncatingDivide = function(node) {
|
| return this.visitInvoke(node);
|
| @@ -10933,10 +11323,10 @@ HInstructionStringifier.prototype.visitTypeGuard = function(node) {
|
| unreachable();
|
|
|
| }
|
| - return ("TypeGuard: " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())) + " is " + type);
|
| + return ("TypeGuard: " + this.temporaryId((($0 = node.inputs.$index(0)) == null ? null : $0.assert$HInstruction())) + " is " + type);
|
| }
|
| HInstructionStringifier.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$HInstruction()));
|
| + return this.visit(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for HValidator **************
|
| function HValidator() {
|
| @@ -11041,13 +11431,13 @@ HValidator.prototype.visitInstruction = function(instruction) {
|
| function hasCorrectInputs(instruction) {
|
| var $0;
|
| var inBasicBlock = $assert_bool(instruction.isInBasicBlock$0());
|
| - return HValidator.everyInstruction((($0 = instruction.get$inputs()) && $0.is$List_HInstruction()), (function (input, count) {
|
| + return HValidator.everyInstruction((($0 = instruction.get$inputs()) == null ? null : $0.assert$List_HInstruction()), (function (input, count) {
|
| var $0;
|
| if ($notnull_bool(inBasicBlock)) {
|
| - return HValidator.countInstruction((($0 = input.get$usedBy()) && $0.is$List_HInstruction()), (instruction && instruction.is$HInstruction())) == count;
|
| + return HValidator.countInstruction((($0 = input.get$usedBy()) == null ? null : $0.assert$List_HInstruction()), (instruction == null ? null : instruction.assert$HInstruction())) == count;
|
| }
|
| else {
|
| - return HValidator.countInstruction((($0 = input.get$usedBy()) && $0.is$List_HInstruction()), (instruction && instruction.is$HInstruction())) == 0;
|
| + return HValidator.countInstruction((($0 = input.get$usedBy()) == null ? null : $0.assert$List_HInstruction()), (instruction == null ? null : instruction.assert$HInstruction())) == 0;
|
| }
|
| })
|
| );
|
| @@ -11055,9 +11445,9 @@ HValidator.prototype.visitInstruction = function(instruction) {
|
| function hasCorrectUses(instruction) {
|
| var $0;
|
| if (!$notnull_bool(instruction.isInBasicBlock$0())) return true;
|
| - return HValidator.everyInstruction((($0 = instruction.get$usedBy()) && $0.is$List_HInstruction()), (function (use, count) {
|
| + return HValidator.everyInstruction((($0 = instruction.get$usedBy()) == null ? null : $0.assert$List_HInstruction()), (function (use, count) {
|
| var $0;
|
| - return HValidator.countInstruction((($0 = use.get$inputs()) && $0.is$List_HInstruction()), (instruction && instruction.is$HInstruction())) == count;
|
| + return HValidator.countInstruction((($0 = use.get$inputs()) == null ? null : $0.assert$List_HInstruction()), (instruction == null ? null : instruction.assert$HInstruction())) == count;
|
| })
|
| );
|
| }
|
| @@ -11092,7 +11482,7 @@ ValueSet.prototype.add = function(instruction) {
|
| ValueSet.prototype.lookup = function(instruction) {
|
| var $0;
|
| var index = this.tableIndexForInstruction(instruction);
|
| - for (var node = (($0 = this.table.$index(index)) && $0.is$ValueSetNode());
|
| + for (var node = (($0 = this.table.$index(index)) == null ? null : $0.assert$ValueSetNode());
|
| node != null; node = node.next) {
|
| var cached = node.value;
|
| if ($notnull_bool(cached.equals(instruction))) return cached;
|
| @@ -11105,7 +11495,7 @@ ValueSet.prototype.kill = function(flags) {
|
| for (var i = 0, length = this.table.length;
|
| i < length; i++) {
|
| var previous = null;
|
| - var current = (($0 = this.table.$index(i)) && $0.is$ValueSetNode());
|
| + var current = (($0 = this.table.$index(i)) == null ? null : $0.assert$ValueSetNode());
|
| while (current != null) {
|
| var next = current.next;
|
| var cached = current.value;
|
| @@ -11130,7 +11520,7 @@ ValueSet.prototype.copy = function() {
|
| var result = new ValueSet();
|
| for (var i = 0, length = this.table.length;
|
| i < length; i++) {
|
| - var current = (($0 = this.table.$index(i)) && $0.is$ValueSetNode());
|
| + var current = (($0 = this.table.$index(i)) == null ? null : $0.assert$ValueSetNode());
|
| while (current != null) {
|
| result.add(current.value);
|
| current = current.next;
|
| @@ -11142,11 +11532,11 @@ ValueSet.prototype.tableIndexForInstruction = function(instruction) {
|
| return 0;
|
| }
|
| ValueSet.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$HInstruction()));
|
| + return this.add(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| ValueSet.prototype.isEmpty$0 = ValueSet.prototype.isEmpty;
|
| ValueSet.prototype.lookup$1 = function($0) {
|
| - return this.lookup(($0 && $0.is$HInstruction()));
|
| + return this.lookup(($0 == null ? null : $0.assert$HInstruction()));
|
| };
|
| // ********** Code for ValueSetNode **************
|
| function ValueSetNode(value, next) {
|
| @@ -11154,7 +11544,7 @@ function ValueSetNode(value, next) {
|
| this.next = next;
|
| // Initializers done
|
| }
|
| -ValueSetNode.prototype.is$ValueSetNode = function(){return this;};
|
| +ValueSetNode.prototype.assert$ValueSetNode = function(){return this};
|
| ValueSetNode.prototype.get$value = function() { return this.value; };
|
| ValueSetNode.prototype.next$0 = function() {
|
| return this.next();
|
| @@ -11176,7 +11566,7 @@ function Compiler(script) {
|
| this.generator = new SsaCodeGeneratorTask(this);
|
| this.tasks = [this.scanner, this.parser, this.resolver, this.checker, this.builder, this.optimizer, this.generator];
|
| }
|
| -Compiler.prototype.is$Compiler = function(){return this;};
|
| +Compiler.prototype.assert$Compiler = function(){return this};
|
| Compiler.prototype.get$generator = function() { return this.generator; };
|
| Compiler.prototype.set$generator = function(value) { return this.generator = value; };
|
| Compiler.prototype.ensure = function(condition) {
|
| @@ -11223,33 +11613,33 @@ Compiler.prototype.runCompiler = function() {
|
| if (element == null) this.cancel(('Could not find ' + const$221/*Compiler.MAIN*/));
|
| this.compileMethod(element);
|
| while (!this.worklist.isEmpty()) {
|
| - this.compileMethod((($0 = this.worklist.removeLast()) && $0.is$Element()));
|
| + this.compileMethod((($0 = this.worklist.removeLast()) == null ? null : $0.assert$Element()));
|
| }
|
| }
|
| Compiler.prototype.compileMethod = function(element) {
|
| var code = $assert_String(this.universe.generatedCode.$index(element));
|
| if (code != null) return code;
|
| var tree = this.parser.parse(element);
|
| - var elements = this.resolver.resolve((tree && tree.is$FunctionExpression()));
|
| + var elements = this.resolver.resolve((tree == null ? null : tree.assert$FunctionExpression()));
|
| this.checker.check(tree, elements);
|
| var graph = this.builder.build(tree, elements);
|
| this.optimizer.optimize(graph);
|
| - code = this.generator.generate((element && element.is$FunctionElement()), graph);
|
| + code = this.generator.generate((element == null ? null : element.assert$FunctionElement()), graph);
|
| this.universe.addGeneratedCode(element, code);
|
| return code;
|
| }
|
| Compiler.prototype.resolveType = function(element) {
|
| var $0;
|
| - this.resolver.resolveType((($0 = this.parser.parse(element)) && $0.is$ClassNode()));
|
| + this.resolver.resolveType((($0 = this.parser.parse(element)) == null ? null : $0.assert$ClassNode()));
|
| }
|
| Compiler.prototype.resolveSignature = function(element) {
|
| var $0;
|
| - this.resolver.resolveSignature((($0 = this.parser.parse(element)) && $0.is$FunctionExpression()));
|
| + this.resolver.resolveSignature((($0 = this.parser.parse(element)) == null ? null : $0.assert$FunctionExpression()));
|
| }
|
| Compiler.prototype.getGeneratedCode = function() {
|
| var $0;
|
| var buffer = new StringBufferImpl("");
|
| - var codeBlocks = (($0 = this.universe.generatedCode.getValues()) && $0.is$List_String());
|
| + var codeBlocks = (($0 = this.universe.generatedCode.getValues()) == null ? null : $0.assert$List_String());
|
| for (var i = codeBlocks.length - 1;
|
| i >= 0; i--) {
|
| buffer.add(codeBlocks.$index(i));
|
| @@ -11317,7 +11707,7 @@ ResolverTask.prototype.resolve = function(tree) {
|
| }
|
| return visitor.mapping;
|
| })
|
| - )) && $0.is$Map_Node$Element());
|
| + )) == null ? null : $0.assert$Map_Node$Element());
|
| }
|
| ResolverTask.prototype.resolveType = function(tree) {
|
| var $this = this; // closure support
|
| @@ -11336,7 +11726,7 @@ ResolverTask.prototype.resolveSignature = function(node) {
|
| );
|
| }
|
| ResolverTask.prototype.resolve$1 = function($0) {
|
| - return this.resolve(($0 && $0.is$FunctionExpression()));
|
| + return this.resolve(($0 == null ? null : $0.assert$FunctionExpression()));
|
| };
|
| // ********** Code for ResolverVisitor **************
|
| function ResolverVisitor(compiler) {
|
| @@ -11352,13 +11742,13 @@ ResolverVisitor.from$ctor = function(other) {
|
| // Initializers done
|
| }
|
| ResolverVisitor.from$ctor.prototype = ResolverVisitor.prototype;
|
| -ResolverVisitor.prototype.is$Visitor = function(){return this;};
|
| +ResolverVisitor.prototype.assert$Visitor = function(){return this};
|
| ResolverVisitor.prototype.error = function(node, kind, arguments) {
|
| - var error = new ResolutionError(kind, (arguments && arguments.is$List_Type()));
|
| + var error = new ResolutionError(kind, (arguments == null ? null : arguments.assert$List_Type()));
|
| this.compiler.cancel(error.toString());
|
| }
|
| ResolverVisitor.prototype.warning = function(node, kind, arguments) {
|
| - var warning = new ResolutionWarning(kind, (arguments && arguments.is$List_Type()));
|
| + var warning = new ResolutionWarning(kind, (arguments == null ? null : arguments.assert$List_Type()));
|
| this.compiler.reportWarning(node, warning);
|
| }
|
| ResolverVisitor.prototype.cancel = function(node, message) {
|
| @@ -11387,7 +11777,7 @@ ResolverVisitor.prototype.visitTypeAnnotation = function(node) {
|
| this.warning(node, const$230/*MessageKind.NOT_A_TYPE*/, [name]);
|
| }
|
| else {
|
| - var cls = (element && element.is$ClassElement());
|
| + var cls = (element == null ? null : element.assert$ClassElement());
|
| this.compiler.resolver.toResolve.add(element);
|
| }
|
| return this.useElement(node, element);
|
| @@ -11407,7 +11797,7 @@ ResolverVisitor.prototype.useElement = function(node, element) {
|
| return element;
|
| }
|
| ResolverVisitor.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for SignatureResolverVisitor **************
|
| function SignatureResolverVisitor(compiler) {
|
| @@ -11417,19 +11807,19 @@ function SignatureResolverVisitor(compiler) {
|
| $inherits(SignatureResolverVisitor, ResolverVisitor);
|
| SignatureResolverVisitor.prototype.visitFunctionExpression = function(node) {
|
| var $0;
|
| - var enclosingElement = (($0 = this.context.lookup((($0 = node.name.get$dynamic().get$source()) && $0.is$SourceString()))) && $0.is$FunctionElement());
|
| + var enclosingElement = (($0 = this.context.lookup((($0 = node.name.get$dynamic().get$source()) == null ? null : $0.assert$SourceString()))) == null ? null : $0.assert$FunctionElement());
|
| this.useElement(node, enclosingElement);
|
| this.context = new Scope.enclosing$ctor(this.context, enclosingElement);
|
| if (enclosingElement.parameters == null) {
|
| var visitor = new ParametersVisitor(this);
|
| visitor.visit(node.parameters);
|
| - enclosingElement.parameters = (($0 = visitor.elements.toLink()) && $0.is$Link_Element());
|
| + enclosingElement.parameters = (($0 = visitor.elements.toLink()) == null ? null : $0.assert$Link_Element());
|
| }
|
| else {
|
| var parameterNodes = node.parameters.get$nodes();
|
| for (var link = enclosingElement.parameters;
|
| - !$notnull_bool(link.isEmpty()) && !$notnull_bool(parameterNodes.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Element()), parameterNodes = (($0 = parameterNodes.get$tail()) && $0.is$Link_Node())) {
|
| - this.defineElement((($0 = parameterNodes.get$head().get$definitions().get$nodes().get$head()) && $0.is$Node()), (($0 = link.get$head()) && $0.is$Element()));
|
| + !$notnull_bool(link.isEmpty()) && !$notnull_bool(parameterNodes.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Element()), parameterNodes = (($0 = parameterNodes.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.defineElement((($0 = parameterNodes.get$head().get$definitions().get$nodes().get$head()) == null ? null : $0.assert$Node()), (($0 = link.get$head()) == null ? null : $0.assert$Element()));
|
| }
|
| }
|
| return enclosingElement;
|
| @@ -11448,7 +11838,7 @@ FullResolverVisitor.prototype.visitClassNode = function(node) {
|
| FullResolverVisitor.prototype.visitIn = function(node, scope) {
|
| var $0;
|
| this.context = scope;
|
| - var element = (($0 = this.visit(node)) && $0.is$Element());
|
| + var element = (($0 = this.visit(node)) == null ? null : $0.assert$Element());
|
| this.context = this.context.parent;
|
| return element;
|
| }
|
| @@ -11477,7 +11867,7 @@ FullResolverVisitor.prototype.visitFunctionExpression = function(node) {
|
| this.context = new Scope.enclosing$ctor(this.context, enclosingElement);
|
| var visitor = new ParametersVisitor(this);
|
| visitor.visit(node.parameters);
|
| - enclosingElement.parameters = (($0 = visitor.elements.toLink()) && $0.is$Link_Element());
|
| + enclosingElement.parameters = (($0 = visitor.elements.toLink()) == null ? null : $0.assert$Link_Element());
|
| this.visit(node.body);
|
| this.context = this.context.parent;
|
| return enclosingElement;
|
| @@ -11531,7 +11921,7 @@ FullResolverVisitor.prototype.mapAssignmentOperatorToMethodName = function(name)
|
| FullResolverVisitor.prototype.visitSend = function(node) {
|
| var $0;
|
| this.visit(node.receiver);
|
| - var identifier = (($0 = node.selector) && $0.is$Identifier());
|
| + var identifier = (($0 = node.selector) == null ? null : $0.assert$Identifier());
|
| if (node.receiver != null && !(identifier instanceof Operator)) {
|
| this.cancel(node, 'Cannot handle qualified method calls');
|
| }
|
| @@ -11545,8 +11935,8 @@ FullResolverVisitor.prototype.visitSend = function(node) {
|
| }
|
| FullResolverVisitor.prototype.visitSendSet = function(node) {
|
| var $0;
|
| - var receiver = (($0 = this.visit(node.receiver)) && $0.is$Element());
|
| - var selector = (($0 = node.selector) && $0.is$Identifier());
|
| + var receiver = (($0 = this.visit(node.receiver)) == null ? null : $0.assert$Element());
|
| + var selector = (($0 = node.selector) == null ? null : $0.assert$Identifier());
|
| if (receiver != null) {
|
| this.compiler.unimplemented('Resolver: property access');
|
| }
|
| @@ -11583,8 +11973,8 @@ FullResolverVisitor.prototype.visitLiteralNull = function(node) {
|
| FullResolverVisitor.prototype.visitNodeList = function(node) {
|
| var $0;
|
| for (var link = node.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.visit((($0 = link.get$head()) && $0.is$Node()));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| }
|
| }
|
| FullResolverVisitor.prototype.visitOperator = function(node) {
|
| @@ -11618,13 +12008,13 @@ function ClassResolverVisitor(compiler) {
|
| $inherits(ClassResolverVisitor, AbstractVisitor_Type);
|
| ClassResolverVisitor.prototype.visitClassNode = function(node) {
|
| var $0;
|
| - var element = (($0 = this.context.lookup(node.name.get$source())) && $0.is$ClassElement());
|
| + var element = (($0 = this.context.lookup(node.name.get$source())) == null ? null : $0.assert$ClassElement());
|
| this.compiler.ensure(element != null);
|
| this.compiler.ensure(!$notnull_bool(element.isResolved));
|
| element.supertype = this.visit(node.superclass);
|
| for (var link = node.interfaces.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - element.interfaces = (($0 = element.interfaces.prepend(this.visit((($0 = link.get$head()) && $0.is$Node())))) && $0.is$Link_Type());
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + element.interfaces = (($0 = element.interfaces.prepend(this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node())))) == null ? null : $0.assert$Link_Type());
|
| }
|
| return element.computeType(this.compiler, null);
|
| }
|
| @@ -11640,20 +12030,20 @@ ClassResolverVisitor.prototype.visitTypeAnnotation = function(node) {
|
| }
|
| else {
|
| this.compiler.resolver.toResolve.add(element);
|
| - return (($0 = element.computeType(this.compiler, null)) && $0.is$Type());
|
| + return (($0 = element.computeType(this.compiler, null)) == null ? null : $0.assert$Type());
|
| }
|
| return null;
|
| }
|
| ClassResolverVisitor.prototype.visit = function(node) {
|
| var $0;
|
| if (node == null) return null;
|
| - return (($0 = node.accept(this)) && $0.is$Type());
|
| + return (($0 = node.accept(this)) == null ? null : $0.assert$Type());
|
| }
|
| ClassResolverVisitor.prototype.visitNode = function(node) {
|
| this.compiler.cancel('internal error');
|
| }
|
| ClassResolverVisitor.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for VariableDefinitionsVisitor **************
|
| function VariableDefinitionsVisitor(definitions, resolver, kind) {
|
| @@ -11674,9 +12064,9 @@ VariableDefinitionsVisitor.prototype.visitSendSet = function(node) {
|
| if (node.receiver != null) {
|
| this.resolver.cancel(node, "receiver on a variable definition not implemented");
|
| }
|
| - var selector = (($0 = node.selector) && $0.is$Identifier());
|
| - this.resolver.visit((($0 = node.get$arguments().get$head()) && $0.is$Node()));
|
| - return (($0 = this.visit(node.selector)) && $0.is$SourceString());
|
| + var selector = (($0 = node.selector) == null ? null : $0.assert$Identifier());
|
| + this.resolver.visit((($0 = node.get$arguments().get$head()) == null ? null : $0.assert$Node()));
|
| + return (($0 = this.visit(node.selector)) == null ? null : $0.assert$SourceString());
|
| }
|
| VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) {
|
| return node.get$source();
|
| @@ -11684,17 +12074,17 @@ VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) {
|
| VariableDefinitionsVisitor.prototype.visitNodeList = function(node) {
|
| var $0;
|
| for (var link = node.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - var name = (($0 = this.visit((($0 = link.get$head()) && $0.is$Node()))) && $0.is$SourceString());
|
| - var element = new VariableElement((($0 = link.get$head()) && $0.is$Node()), this.definitions.type, this.kind, name, this.resolver.context.enclosingElement);
|
| - this.resolver.defineElement((($0 = link.get$head()) && $0.is$Node()), element);
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + var name = (($0 = this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node()))) == null ? null : $0.assert$SourceString());
|
| + var element = new VariableElement((($0 = link.get$head()) == null ? null : $0.assert$Node()), this.definitions.type, this.kind, name, this.resolver.context.enclosingElement);
|
| + this.resolver.defineElement((($0 = link.get$head()) == null ? null : $0.assert$Node()), element);
|
| }
|
| }
|
| VariableDefinitionsVisitor.prototype.visit = function(node) {
|
| return node.accept(this);
|
| }
|
| VariableDefinitionsVisitor.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for ParametersVisitor **************
|
| function ParametersVisitor(resolver) {
|
| @@ -11707,8 +12097,8 @@ $inherits(ParametersVisitor, AbstractVisitor_Element);
|
| ParametersVisitor.prototype.visitNodeList = function(node) {
|
| var $0;
|
| for (var link = node.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.elements.addLast(this.visit((($0 = link.get$head()) && $0.is$Node())));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.elements.addLast(this.visit((($0 = link.get$head()) == null ? null : $0.assert$Node())));
|
| }
|
| }
|
| ParametersVisitor.prototype.visitVariableDefinitions = function(node) {
|
| @@ -11721,7 +12111,7 @@ ParametersVisitor.prototype.visit = function(node) {
|
| return node.accept(this);
|
| }
|
| ParametersVisitor.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$Node()));
|
| + return this.visit(($0 == null ? null : $0.assert$Node()));
|
| };
|
| // ********** Code for Scope **************
|
| function Scope(parent) {
|
| @@ -11746,21 +12136,21 @@ Scope.prototype.get$parent = function() { return this.parent; };
|
| Scope.prototype.get$enclosingElement = function() { return this.enclosingElement; };
|
| Scope.prototype.lookup = function(name) {
|
| var $0;
|
| - var element = (($0 = this.elements.$index(name)) && $0.is$Element());
|
| + var element = (($0 = this.elements.$index(name)) == null ? null : $0.assert$Element());
|
| if (element != null) return element;
|
| return this.parent.lookup(name);
|
| }
|
| Scope.prototype.add = function(element) {
|
| var $0;
|
| - if (this.elements.containsKey(element.name)) return (($0 = this.elements.$index(element.name)) && $0.is$Element());
|
| + if (this.elements.containsKey(element.name)) return (($0 = this.elements.$index(element.name)) == null ? null : $0.assert$Element());
|
| this.elements.$setindex(element.name, element);
|
| return element;
|
| }
|
| Scope.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$Element()));
|
| + return this.add(($0 == null ? null : $0.assert$Element()));
|
| };
|
| Scope.prototype.lookup$1 = function($0) {
|
| - return this.lookup(($0 && $0.is$SourceString()));
|
| + return this.lookup(($0 == null ? null : $0.assert$SourceString()));
|
| };
|
| // ********** Code for TopScope **************
|
| function TopScope(universe) {
|
| @@ -11776,10 +12166,10 @@ TopScope.prototype.add = function(element) {
|
| $throw("Cannot add an element in the top scope");
|
| }
|
| TopScope.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$Element()));
|
| + return this.add(($0 == null ? null : $0.assert$Element()));
|
| };
|
| TopScope.prototype.lookup$1 = function($0) {
|
| - return this.lookup(($0 && $0.is$SourceString()));
|
| + return this.lookup(($0 == null ? null : $0.assert$SourceString()));
|
| };
|
| // ********** Code for leg_Script **************
|
| function leg_Script(file) {
|
| @@ -11828,7 +12218,7 @@ SimpleType.named$ctor = function(name) {
|
| // Initializers done
|
| }
|
| SimpleType.named$ctor.prototype = SimpleType.prototype;
|
| -SimpleType.prototype.is$Type = function(){return this;};
|
| +SimpleType.prototype.assert$Type = function(){return this};
|
| SimpleType.prototype.get$name = function() { return this.name; };
|
| SimpleType.prototype.get$element = function() { return this.element; };
|
| SimpleType.prototype.toString = function() {
|
| @@ -11841,8 +12231,8 @@ function FunctionType(returnType, parameterTypes) {
|
| this.parameterTypes = parameterTypes;
|
| // Initializers done
|
| }
|
| -FunctionType.prototype.is$FunctionType = function(){return this;};
|
| -FunctionType.prototype.is$Type = function(){return this;};
|
| +FunctionType.prototype.assert$FunctionType = function(){return this};
|
| +FunctionType.prototype.assert$Type = function(){return this};
|
| FunctionType.prototype.get$returnType = function() { return this.returnType; };
|
| FunctionType.prototype.toString = function() {
|
| var sb = new StringBufferImpl("");
|
| @@ -11864,7 +12254,7 @@ function Types() {
|
| this.objectType = new SimpleType.named$ctor(const$18/*Types.OBJECT*/);
|
| // Initializers done
|
| }
|
| -Types.prototype.is$Types = function(){return this;};
|
| +Types.prototype.assert$Types = function(){return this};
|
| Types.prototype.get$dynamicType = function() { return this.dynamicType; };
|
| Types.prototype.lookup = function(s) {
|
| if ($notnull_bool($eq(const$6/*Types.VOID*/, s))) {
|
| @@ -11897,7 +12287,7 @@ Types.prototype.isAssignable = function(r, s) {
|
| return $notnull_bool(this.isSubtype(r, s)) || $notnull_bool(this.isSubtype(s, r));
|
| }
|
| Types.prototype.lookup$1 = function($0) {
|
| - return this.lookup(($0 && $0.is$SourceString()));
|
| + return this.lookup(($0 == null ? null : $0.assert$SourceString()));
|
| };
|
| // ********** Code for CancelTypeCheckException **************
|
| function CancelTypeCheckException(node, reason) {
|
| @@ -11912,7 +12302,7 @@ function TypeCheckerVisitor(compiler, elements, types) {
|
| this.types = types;
|
| // Initializers done
|
| }
|
| -TypeCheckerVisitor.prototype.is$Visitor = function(){return this;};
|
| +TypeCheckerVisitor.prototype.assert$Visitor = function(){return this};
|
| TypeCheckerVisitor.prototype.get$types = function() { return this.types; };
|
| TypeCheckerVisitor.prototype.set$types = function(value) { return this.types = value; };
|
| TypeCheckerVisitor.prototype.fail = function(node, reason) {
|
| @@ -11938,7 +12328,7 @@ TypeCheckerVisitor.prototype.typeWithDefault = function(node, defaultValue) {
|
| TypeCheckerVisitor.prototype.type = function(node) {
|
| var $0;
|
| if (node == null) this.fail(null, 'unexpected node: null');
|
| - var result = (($0 = node.accept(this)) && $0.is$Type());
|
| + var result = (($0 = node.accept(this)) == null ? null : $0.assert$Type());
|
| return result;
|
| }
|
| TypeCheckerVisitor.prototype.get$type = function() {
|
| @@ -11978,7 +12368,7 @@ TypeCheckerVisitor.prototype.visitFor = function(node) {
|
| TypeCheckerVisitor.prototype.visitFunctionExpression = function(node) {
|
| var $0;
|
| var element = this.elements.$index(node);
|
| - var functionType = (($0 = element.computeType$2(this.compiler, this.types)) && $0.is$FunctionType());
|
| + var functionType = (($0 = element.computeType$2(this.compiler, this.types)) == null ? null : $0.assert$FunctionType());
|
| var returnType = functionType.returnType;
|
| var previous = this.expectedReturnType;
|
| this.expectedReturnType = returnType;
|
| @@ -11998,12 +12388,12 @@ TypeCheckerVisitor.prototype.visitIf = function(node) {
|
| TypeCheckerVisitor.prototype.visitSend = function(node) {
|
| var $0;
|
| var target = this.elements.$index(node);
|
| - var selector = (($0 = node.selector) && $0.is$Identifier());
|
| + var selector = (($0 = node.selector) == null ? null : $0.assert$Identifier());
|
| var name = selector.get$source().get$stringValue();
|
| if (target != null) {
|
| if (selector.asOperator() != null) {
|
| this.type(node.receiver);
|
| - if (node.get$arguments().get$head() != null) this.type((($0 = node.get$arguments().get$head()) && $0.is$Node()));
|
| + if (node.get$arguments().get$head() != null) this.type((($0 = node.get$arguments().get$head()) == null ? null : $0.assert$Node()));
|
| if (name === '+' || name === '=' || name === '-' || name === '*' || name === '/' || name === '%' || name === '~/' || name === '|' || name === '&' || name === '^' || name === '~' || name === '<<' || name === '>>') {
|
| return this.types.dynamicType;
|
| }
|
| @@ -12016,7 +12406,7 @@ TypeCheckerVisitor.prototype.visitSend = function(node) {
|
| }
|
| var targetType = target.computeType$2(this.compiler, this.types);
|
| if ($notnull_bool(node.get$isPropertyAccess())) {
|
| - return (targetType && targetType.is$Type());
|
| + return (targetType == null ? null : targetType.assert$Type());
|
| }
|
| else if ($notnull_bool(node.get$isFunctionObjectInvocation())) {
|
| this.fail(node);
|
| @@ -12028,15 +12418,15 @@ TypeCheckerVisitor.prototype.visitSend = function(node) {
|
| }
|
| this.fail(node, 'can only handle function types');
|
| }
|
| - var funType = (targetType && targetType.is$FunctionType());
|
| + var funType = (targetType == null ? null : targetType.assert$FunctionType());
|
| var formals = funType.parameterTypes;
|
| var arguments = node.get$arguments();
|
| while ((!$notnull_bool(formals.isEmpty())) && (!$notnull_bool(arguments.isEmpty()))) {
|
| - var argument = (($0 = arguments.get$head()) && $0.is$Node());
|
| + var argument = (($0 = arguments.get$head()) == null ? null : $0.assert$Node());
|
| var argumentType = this.type(argument);
|
| - this.checkAssignable(argument, (($0 = formals.get$head()) && $0.is$Type()), argumentType);
|
| - formals = (($0 = formals.get$tail()) && $0.is$Link_Type());
|
| - arguments = (($0 = arguments.get$tail()) && $0.is$Link_Node());
|
| + this.checkAssignable(argument, (($0 = formals.get$head()) == null ? null : $0.assert$Type()), argumentType);
|
| + formals = (($0 = formals.get$tail()) == null ? null : $0.assert$Link_Type());
|
| + arguments = (($0 = arguments.get$tail()) == null ? null : $0.assert$Link_Node());
|
| }
|
| if (!$notnull_bool(formals.isEmpty())) {
|
| this.reportTypeWarning(node, const$264/*MessageKind.MISSING_ARGUMENT*/, const$21/*const []*/);
|
| @@ -12053,7 +12443,7 @@ TypeCheckerVisitor.prototype.visitSend = function(node) {
|
| var firstArgument = node.receiver;
|
| this.checkAssignable(firstArgument, this.types.boolType, this.type(firstArgument));
|
| if (!$notnull_bool(arguments.isEmpty())) {
|
| - var secondArgument = (($0 = arguments.get$head()) && $0.is$Node());
|
| + var secondArgument = (($0 = arguments.get$head()) == null ? null : $0.assert$Node());
|
| this.checkAssignable(secondArgument, this.types.boolType, this.type(secondArgument));
|
| }
|
| return this.types.boolType;
|
| @@ -12064,18 +12454,18 @@ TypeCheckerVisitor.prototype.visitSend = function(node) {
|
| TypeCheckerVisitor.prototype.visitSendSet = function(node) {
|
| var $0;
|
| this.compiler.ensure(node.get$arguments() != null);
|
| - var selector = (($0 = node.selector) && $0.is$Identifier());
|
| + var selector = (($0 = node.selector) == null ? null : $0.assert$Identifier());
|
| var name = node.assignmentOperator.get$source().get$stringValue();
|
| if (name === '++' || name === '--') {
|
| this.compiler.ensure((node.selector instanceof Identifier));
|
| - var element = (($0 = this.elements.$index(node.selector)) && $0.is$Element());
|
| - var receiverType = (($0 = element.computeType(this.compiler, this.types)) && $0.is$Type());
|
| + var element = (($0 = this.elements.$index(node.selector)) == null ? null : $0.assert$Element());
|
| + var receiverType = (($0 = element.computeType(this.compiler, this.types)) == null ? null : $0.assert$Type());
|
| return $notnull_bool(node.get$isPrefix()) ? this.types.intType : receiverType;
|
| }
|
| else {
|
| this.compiler.ensure(!$notnull_bool(node.get$arguments().isEmpty()));
|
| - var targetType = (($0 = this.elements.$index(node).computeType$2(this.compiler, this.types)) && $0.is$Type());
|
| - var value = (($0 = node.get$arguments().get$head()) && $0.is$Node());
|
| + var targetType = (($0 = this.elements.$index(node).computeType$2(this.compiler, this.types)) == null ? null : $0.assert$Type());
|
| + var value = (($0 = node.get$arguments().get$head()) == null ? null : $0.assert$Node());
|
| this.checkAssignable(value, targetType, this.type(value));
|
| return targetType;
|
| }
|
| @@ -12098,8 +12488,8 @@ TypeCheckerVisitor.prototype.visitLiteralNull = function(node) {
|
| TypeCheckerVisitor.prototype.visitNodeList = function(node) {
|
| var $0;
|
| for (var link = node.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - this.type((($0 = link.get$head()) && $0.is$Node()));
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + this.type((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| }
|
| return null;
|
| }
|
| @@ -12131,7 +12521,7 @@ TypeCheckerVisitor.prototype.visitTypeAnnotation = function(node) {
|
| var $0;
|
| if (node.typeName == null) return this.types.dynamicType;
|
| var name = node.typeName.get$source();
|
| - var type = (($0 = this.elements.$index(node)) && $0.is$Type());
|
| + var type = (($0 = this.elements.$index(node)) == null ? null : $0.assert$Type());
|
| if (type == null) type = this.types.lookup(name);
|
| if (type == null) {
|
| return this.types.dynamicType;
|
| @@ -12146,11 +12536,11 @@ TypeCheckerVisitor.prototype.visitVariableDefinitions = function(node) {
|
| type = this.types.dynamicType;
|
| }
|
| for (var link = node.definitions.get$nodes();
|
| - !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link_Node())) {
|
| - var initialization = (($0 = link.get$head()) && $0.is$Node());
|
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) == null ? null : $0.assert$Link_Node())) {
|
| + var initialization = (($0 = link.get$head()) == null ? null : $0.assert$Node());
|
| this.compiler.ensure((initialization instanceof Identifier) || (initialization instanceof Send));
|
| if ((initialization instanceof Send)) {
|
| - var initializer = this.nonVoidType((($0 = link.get$head()) && $0.is$Node()));
|
| + var initializer = this.nonVoidType((($0 = link.get$head()) == null ? null : $0.assert$Node()));
|
| this.checkAssignable(node, type, initializer);
|
| }
|
| }
|
| @@ -12172,7 +12562,7 @@ function Universe() {
|
| }
|
| Universe.prototype.find = function(name) {
|
| var $0;
|
| - return (($0 = this.elements.$index(name)) && $0.is$Element());
|
| + return (($0 = this.elements.$index(name)) == null ? null : $0.assert$Element());
|
| }
|
| Universe.prototype.define = function(element) {
|
| $assert(this.elements.$index(element.name) == null, "elements[element.name] == null", "universe.dart", 20, 12);
|
| @@ -12282,7 +12672,7 @@ WorldCompiler.prototype.spanFromNode = function(node) {
|
| }
|
| WorldCompiler.prototype.reportWarning = function(node, message) {
|
| var $0;
|
| - this.world.warning(('' + message + '.'), (($0 = this.spanFromNode(node)) && $0.is$SourceSpan()));
|
| + this.world.warning(('' + message + '.'), (($0 = this.spanFromNode(node)) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| WorldCompiler.prototype.readScript = function(filename) {
|
| var text = $globals.world.files.readAll(filename);
|
| @@ -12302,7 +12692,7 @@ WorldCompiler.prototype.cancel = function(reason, node, token, instruction) {
|
| var end = begin + tokenString.length;
|
| print(this.script.file.getLocationMessage$4(("cancel leg: " + reason), begin, end, true));
|
| }
|
| - Compiler.prototype.cancel.call(this, reason, node, (token && token.is$Token()), (instruction && instruction.is$HInstruction()));
|
| + Compiler.prototype.cancel.call(this, reason, node, (token == null ? null : token.assert$Token()), (instruction == null ? null : instruction.assert$HInstruction()));
|
| }
|
| // ********** Code for top level **************
|
| function compile(world) {
|
| @@ -12320,7 +12710,7 @@ function CodeWriter() {
|
| this._buf = new StringBufferImpl("");
|
| // Initializers done
|
| }
|
| -CodeWriter.prototype.is$CodeWriter = function(){return this;};
|
| +CodeWriter.prototype.assert$CodeWriter = function(){return this};
|
| CodeWriter.prototype.get$text = function() {
|
| return this._buf.toString();
|
| }
|
| @@ -12373,10 +12763,8 @@ CodeWriter.prototype.nextBlock = function(text) {
|
| }
|
| // ********** Code for CoreJs **************
|
| function CoreJs() {
|
| - this.useTypeNameOf = false
|
| this.useStackTraceOf = false
|
| this.useThrow = false
|
| - this.useVarMethod = false
|
| this.useGenStub = false
|
| this.useMap = false
|
| this.useAssert = false
|
| @@ -12387,7 +12775,11 @@ function CoreJs() {
|
| this.useWrap1 = false
|
| this.useIsolates = false
|
| this.useToString = false
|
| + this._generatedTypeNameOf = false
|
| + this._generatedDynamicProto = false
|
| + this._generatedInherits = false
|
| this._usedOperators = $map([]);
|
| + this.writer = new CodeWriter();
|
| // Initializers done
|
| }
|
| CoreJs.prototype.useOperator = function(name) {
|
| @@ -12439,21 +12831,35 @@ CoreJs.prototype.useOperator = function(name) {
|
| }
|
| this._usedOperators.$setindex(name, code);
|
| }
|
| +CoreJs.prototype.ensureDynamicProto = function() {
|
| + if ($notnull_bool(this._generatedDynamicProto)) return;
|
| + this._generatedDynamicProto = true;
|
| + this.ensureTypeNameOf();
|
| + this.writer.writeln("function $dynamic(name) {\n var f = Object.prototype[name];\n if (f && f.methods) return f.methods;\n\n var methods = {};\n if (f) methods.Object = f;\n function $dynamicBind() {\n // Find the target method\n var method;\n var proto = Object.getPrototypeOf(this);\n var obj = proto;\n do {\n method = methods[obj.$typeNameOf()];\n if (method) break;\n obj = Object.getPrototypeOf(obj);\n } while (obj);\n\n // Patch the prototype, but don't overwrite an existing stub, like\n // the one on Object.prototype.\n if (!proto.hasOwnProperty(name)) proto[name] = method || methods.Object;\n\n return method.apply(this, Array.prototype.slice.call(arguments));\n };\n $dynamicBind.methods = methods;\n Object.prototype[name] = $dynamicBind;\n return methods;\n}");
|
| +}
|
| +CoreJs.prototype.ensureTypeNameOf = function() {
|
| + if ($notnull_bool(this._generatedTypeNameOf)) return;
|
| + this._generatedTypeNameOf = true;
|
| + this.writer.writeln("Object.prototype.$typeNameOf = function() {\n if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')\n || typeof(process) != 'undefined') { // fast-path for Chrome and Node\n return this.constructor.name;\n }\n var str = Object.prototype.toString.call(this);\n str = str.substring(8, str.length - 1);\n if (str == 'Window') str = 'DOMWindow';\n return str;\n}");
|
| +}
|
| +CoreJs.prototype.ensureInheritsHelper = function() {
|
| + if ($notnull_bool(this._generatedInherits)) return;
|
| + this._generatedInherits = true;
|
| + this.writer.writeln("/** Implements extends for Dart classes on JavaScript prototypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto__) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n function tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tmp();\n child.prototype.constructor = child;\n }\n}");
|
| +}
|
| CoreJs.prototype.generate = function(w) {
|
| - if ($notnull_bool(this.useVarMethod)) {
|
| - this.useTypeNameOf = true;
|
| - w.writeln("function $varMethod(name, methods) {\n Object.prototype[name] = function() {\n $patchMethod(this, name, methods);\n return this[name].apply(this, Array.prototype.slice.call(arguments));\n };\n}\nfunction $patchMethod(obj, name, methods) {\n // Get the prototype to patch.\n // Don't overwrite an existing stub, like the one on Object.prototype\n var proto = Object.getPrototypeOf(obj);\n if (!proto || proto.hasOwnProperty(name)) proto = obj;\n var method;\n while (obj && !(method = methods[obj.$typeNameOf()])) {\n obj = Object.getPrototypeOf(obj);\n }\n obj[name] = method || methods['Object'];\n}");
|
| - }
|
| + w.write(this.writer.get$text());
|
| + this.writer = w;
|
| if ($notnull_bool(this.useGenStub)) {
|
| this.useThrow = true;
|
| - w.writeln("/**\n * Generates a dynamic call stub for a function.\n * Our goal is to create a stub method like this on-the-fly:\n * function($0, $1, capture) { this($0, $1, true, capture); }\n *\n * This stub then replaces the dynamic one on Function, with one that is\n * specialized for that particular function, taking into account its default\n * arguments.\n */\nFunction.prototype.$genStub = function(argsLength, names) {\n // TODO(jmesserly): only emit $genStub if actually needed\n\n // Fast path: if no named arguments and arg count matches\n if (this.length == argsLength && !names) {\n return this;\n }\n\n function $throwArgMismatch() {\n // TODO(jmesserly): better error message\n $throw(new ClosureArgumentMismatchException());\n }\n\n var paramsNamed = this.$optional ? (this.$optional.length / 2) : 0;\n var paramsBare = this.length - paramsNamed;\n var argsNamed = names ? names.length : 0;\n var argsBare = argsLength - argsNamed;\n\n // Check we got the right number of arguments\n if (argsBare < paramsBare || argsLength > this.length ||\n argsNamed > paramsNamed) {\n return $throwArgMismatch;\n }\n\n // First, fill in all of the default values\n var p = new Array(paramsBare);\n if (paramsNamed) {\n p = p.concat(this.$optional.slice(paramsNamed));\n }\n // Fill in positional args\n var a = new Array(argsLength);\n for (var i = 0; i < argsBare; i++) {\n p[i] = a[i] = '$' + i;\n }\n // Then overwrite with supplied values for optional args\n var lastParameterIndex;\n var namesInOrder = true;\n for (var i = 0; i < argsNamed; i++) {\n var name = names[i];\n a[i + argsBare] = name;\n var j = this.$optional.indexOf(name, 0);\n if (j < 0 || j >= paramsNamed) {\n return $throwArgMismatch;\n } else if (lastParameterIndex && lastParameterIndex > j) {\n namesInOrder = false;\n }\n p[j + paramsBare] = name;\n lastParameterIndex = j;\n }\n\n if (this.length == argsLength && namesInOrder) {\n // Fast path #2: named arguments, but they're in order.\n return this;\n }\n\n // Note: using Function instead of 'eval' to get a clean scope.\n // TODO(jmesserly): evaluate the performance of these stubs.\n var f = 'function(' + a.join(',') + '){return $f(' + p.join(',') + ');}';\n return new Function('$f', 'return ' + f + '').call(null, this);\n}");
|
| + w.writeln("/**\n * Generates a dynamic call stub for a function.\n * Our goal is to create a stub method like this on-the-fly:\n * function($0, $1, capture) { return this($0, $1, true, capture); }\n *\n * This stub then replaces the dynamic one on Function, with one that is\n * specialized for that particular function, taking into account its default\n * arguments.\n */\nFunction.prototype.$genStub = function(argsLength, names) {\n // Fast path: if no named arguments and arg count matches\n if (this.length == argsLength && !names) {\n return this;\n }\n\n function $throwArgMismatch() {\n // TODO(jmesserly): better error message\n $throw(new ClosureArgumentMismatchException());\n }\n\n var paramsNamed = this.$optional ? (this.$optional.length / 2) : 0;\n var paramsBare = this.length - paramsNamed;\n var argsNamed = names ? names.length : 0;\n var argsBare = argsLength - argsNamed;\n\n // Check we got the right number of arguments\n if (argsBare < paramsBare || argsLength > this.length ||\n argsNamed > paramsNamed) {\n return $throwArgMismatch;\n }\n\n // First, fill in all of the default values\n var p = new Array(paramsBare);\n if (paramsNamed) {\n p = p.concat(this.$optional.slice(paramsNamed));\n }\n // Fill in positional args\n var a = new Array(argsLength);\n for (var i = 0; i < argsBare; i++) {\n p[i] = a[i] = '$' + i;\n }\n // Then overwrite with supplied values for optional args\n var lastParameterIndex;\n var namesInOrder = true;\n for (var i = 0; i < argsNamed; i++) {\n var name = names[i];\n a[i + argsBare] = name;\n var j = this.$optional.indexOf(name, 0);\n if (j < 0 || j >= paramsNamed) {\n return $throwArgMismatch;\n } else if (lastParameterIndex && lastParameterIndex > j) {\n namesInOrder = false;\n }\n p[j + paramsBare] = name;\n lastParameterIndex = j;\n }\n\n if (this.length == argsLength && namesInOrder) {\n // Fast path #2: named arguments, but they're in order.\n return this;\n }\n\n // Note: using Function instead of 'eval' to get a clean scope.\n // TODO(jmesserly): evaluate the performance of these stubs.\n var f = 'function(' + a.join(',') + '){return $f(' + p.join(',') + ');}';\n return new Function('$f', 'return ' + f + '').call(null, this);\n}");
|
| }
|
| if ($notnull_bool(this.useStackTraceOf)) {
|
| w.writeln("function $stackTraceOf(e) {\n // TODO(jmesserly): we shouldn't be relying on the e.stack property.\n // Need to mangle it.\n return (e && e.stack) ? e.stack : null;\n}");
|
| }
|
| if ($notnull_bool(this.useNotNullBool)) {
|
| this.useThrow = true;
|
| - w.writeln("function $notnull_bool(test) {\n return (test === true || test === false) ? test : test.is$bool(); // TypeError\n}");
|
| + w.writeln("function $notnull_bool(test) {\n if (test === true || test === false) return test;\n $throw(new TypeError(test, 'bool'));\n}");
|
| }
|
| if ($notnull_bool(this.useAssert)) {
|
| this.useThrow = true;
|
| @@ -12468,9 +12874,6 @@ CoreJs.prototype.generate = function(w) {
|
| if ($notnull_bool(this.useToString)) {
|
| w.writeln("function $toString(o) {\n if (o == null) return 'null';\n var t = typeof(o);\n if (t == 'object') { return o.toString(); }\n else if (t == 'string') { return o; }\n else if (t == 'bool') { return ''+o; }\n else if (t == 'number') { return ''+o; }\n else return o.toString();\n}");
|
| }
|
| - if ($notnull_bool(this.useTypeNameOf)) {
|
| - w.writeln("Object.prototype.$typeNameOf = function() {\n if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')\n || typeof(process) != 'undefined') { // fast-path for Chrome and Node\n return this.constructor.name;\n }\n var str = Object.prototype.toString.call(this);\n str = str.substring(8, str.length - 1);\n if (str == 'Window') \n str = 'DOMWindow';\n return str;\n}");
|
| - }
|
| if ($notnull_bool(this.useIndex)) {
|
| w.writeln("Object.prototype.$index = function(i) { return this[i]; }\nArray.prototype.$index = function(i) { return this[i]; }\nString.prototype.$index = function(i) { return this[i]; }");
|
| }
|
| @@ -12501,7 +12904,7 @@ CoreJs.prototype.generate = function(w) {
|
| }
|
| }
|
| CoreJs.prototype.generate$1 = function($0) {
|
| - return this.generate(($0 && $0.is$CodeWriter()));
|
| + return this.generate(($0 == null ? null : $0.assert$CodeWriter()));
|
| };
|
| // ********** Code for lang_Element **************
|
| function lang_Element(name, _enclosingElement) {
|
| @@ -12510,7 +12913,7 @@ function lang_Element(name, _enclosingElement) {
|
| // Initializers done
|
| this._jsname = this.name;
|
| }
|
| -lang_Element.prototype.is$lang_Element = function(){return this;};
|
| +lang_Element.prototype.assert$lang_Element = function(){return this};
|
| lang_Element.prototype.get$name = function() { return this.name; };
|
| lang_Element.prototype.set$name = function(value) { return this.name = value; };
|
| lang_Element.prototype.get$library = function() {
|
| @@ -12536,7 +12939,7 @@ lang_Element.prototype.get$typeParameters = function() {
|
| }
|
| lang_Element.prototype.get$enclosingElement = function() {
|
| var $0;
|
| - return (($0 = this._enclosingElement == null ? this.get$library() : this._enclosingElement) && $0.is$lang_Element());
|
| + return (($0 = this._enclosingElement == null ? this.get$library() : this._enclosingElement) == null ? null : $0.assert$lang_Element());
|
| }
|
| lang_Element.prototype.set$enclosingElement = function(e) {
|
| return this._enclosingElement = e;
|
| @@ -12546,7 +12949,7 @@ lang_Element.prototype.resolveType = function(node, typeErrors) {
|
| if (node == null) return $globals.world.varType;
|
| if (node.type != null) return node.type;
|
| if ((node instanceof NameTypeReference)) {
|
| - var typeRef = (node && node.is$NameTypeReference());
|
| + var typeRef = (node == null ? null : node.assert$NameTypeReference());
|
| var name;
|
| if (typeRef.names != null) {
|
| name = $assert_String(typeRef.names.last().get$name());
|
| @@ -12559,7 +12962,7 @@ lang_Element.prototype.resolveType = function(node, typeErrors) {
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var tp = $list.$index($i);
|
| if ($notnull_bool($eq(tp.get$name(), name))) {
|
| - typeRef.type = (tp && tp.is$lang_Type());
|
| + typeRef.type = (tp == null ? null : tp.assert$lang_Type());
|
| }
|
| }
|
| }
|
| @@ -12569,7 +12972,7 @@ lang_Element.prototype.resolveType = function(node, typeErrors) {
|
| return this.get$enclosingElement().resolveType(node, typeErrors);
|
| }
|
| else if ((node instanceof GenericTypeReference)) {
|
| - var typeRef = (node && node.is$GenericTypeReference());
|
| + var typeRef = (node == null ? null : node.assert$GenericTypeReference());
|
| var baseType = this.resolveType(typeRef.baseType, typeErrors);
|
| if (!$notnull_bool(baseType.get$isGeneric())) {
|
| $globals.world.error(('' + baseType.get$name() + ' is not generic'), typeRef.span);
|
| @@ -12583,16 +12986,16 @@ lang_Element.prototype.resolveType = function(node, typeErrors) {
|
| for (var i = 0;
|
| i < typeRef.typeArguments.length; i++) {
|
| var extendsType = baseType.get$typeParameters().$index(i).get$extendsType();
|
| - var typeArg = this.resolveType((($0 = typeRef.typeArguments.$index(i)) && $0.is$TypeReference()), typeErrors);
|
| + var typeArg = this.resolveType((($0 = typeRef.typeArguments.$index(i)) == null ? null : $0.assert$TypeReference()), typeErrors);
|
| typeArgs.add$1(typeArg);
|
| if ($notnull_bool($ne(extendsType, null)) && !(typeArg instanceof ParameterType)) {
|
| typeArg.ensureSubtypeOf$3(extendsType, typeRef.typeArguments.$index(i).get$span(), typeErrors);
|
| }
|
| }
|
| - typeRef.type = (($0 = baseType.getOrMakeConcreteType$1(typeArgs)) && $0.is$lang_Type());
|
| + typeRef.type = (($0 = baseType.getOrMakeConcreteType$1(typeArgs)) == null ? null : $0.assert$lang_Type());
|
| }
|
| else if ((node instanceof FunctionTypeReference)) {
|
| - var typeRef = (node && node.is$FunctionTypeReference());
|
| + var typeRef = (node == null ? null : node.assert$FunctionTypeReference());
|
| var name = '';
|
| if (typeRef.func.name != null) {
|
| name = typeRef.func.name.name;
|
| @@ -12609,7 +13012,6 @@ lang_Element.prototype.resolve$0 = lang_Element.prototype.resolve;
|
| // ********** Code for WorldGenerator **************
|
| function WorldGenerator(main, writer) {
|
| this.hasStatics = false
|
| - this._inheritsGenerated = false
|
| this.main = main;
|
| this.writer = writer;
|
| this.globals = $map([]);
|
| @@ -12620,7 +13022,7 @@ WorldGenerator.prototype.run = function() {
|
| var $0;
|
| var metaGen = new MethodGenerator(this.main, null);
|
| var mainTarget = new Value.type$ctor(this.main.declaringType, this.main.get$span());
|
| - var mainCall = this.main.invoke((metaGen && metaGen.is$MethodGenerator()), null, (mainTarget && mainTarget.is$Value()), Arguments.get$EMPTY(), false);
|
| + var mainCall = this.main.invoke((metaGen == null ? null : metaGen.assert$MethodGenerator()), null, (mainTarget == null ? null : mainTarget.assert$Value()), Arguments.get$EMPTY(), false);
|
| this.main.declaringType.markUsed();
|
| if ($notnull_bool($globals.options.compileAll)) {
|
| this.markLibraryUsed($globals.world.corelib);
|
| @@ -12630,17 +13032,17 @@ WorldGenerator.prototype.run = function() {
|
| $globals.world.corelib.types.$index('BadNumberFormatException').markUsed$0();
|
| $globals.world.get$coreimpl().types.$index('NumImplementation').markUsed$0();
|
| $globals.world.get$coreimpl().types.$index('StringImplementation').markUsed$0();
|
| - this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('StringImplementation').getMember$1('contains')) && $0.is$Member()));
|
| + this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('StringImplementation').getMember$1('contains')) == null ? null : $0.assert$Member()));
|
| }
|
| if ($notnull_bool($globals.world.corelib.types.$index('Isolate').get$isUsed()) || $notnull_bool($globals.world.get$coreimpl().types.$index('ReceivePortImpl').get$isUsed())) {
|
| if ($notnull_bool(this.corejs.useWrap0) || $notnull_bool(this.corejs.useWrap1)) {
|
| - this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('IsolateContext').getMember$1('eval')) && $0.is$Member()));
|
| - this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('EventLoop').getMember$1('run')) && $0.is$Member()));
|
| + this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('IsolateContext').getMember$1('eval')) == null ? null : $0.assert$Member()));
|
| + this.genMethod((($0 = $globals.world.get$coreimpl().types.$index('EventLoop').getMember$1('run')) == null ? null : $0.assert$Member()));
|
| }
|
| this.corejs.useIsolates = true;
|
| - var isolateMain = (($0 = $globals.world.get$coreimpl().topType.resolveMember('startRootIsolate').members.$index(0)) && $0.is$MethodMember());
|
| + var isolateMain = (($0 = $globals.world.get$coreimpl().topType.resolveMember('startRootIsolate').members.$index(0)) == null ? null : $0.assert$MethodMember());
|
| var isolateMainTarget = new Value.type$ctor($globals.world.get$coreimpl().topType, this.main.get$span());
|
| - mainCall = isolateMain.invoke((metaGen && metaGen.is$MethodGenerator()), null, (isolateMainTarget && isolateMainTarget.is$Value()), new Arguments(null, [this.main._get((metaGen && metaGen.is$MethodGenerator()), this.main.definition, null, false)]), false);
|
| + mainCall = isolateMain.invoke((metaGen == null ? null : metaGen.assert$MethodGenerator()), null, (isolateMainTarget == null ? null : isolateMainTarget.assert$Value()), new Arguments(null, [this.main._get((metaGen == null ? null : metaGen.assert$MethodGenerator()), this.main.definition, null, false)]), false);
|
| }
|
| this.writeTypes($globals.world.get$coreimpl());
|
| this.writeTypes($globals.world.corelib);
|
| @@ -12656,7 +13058,7 @@ WorldGenerator.prototype.markLibraryUsed = function(l) {
|
| l.isMarked = true;
|
| l.imports.forEach((function (i) {
|
| var $0;
|
| - return $this.markLibraryUsed((($0 = i.get$library()) && $0.is$Library()));
|
| + return $this.markLibraryUsed((($0 = i.get$library()) == null ? null : $0.assert$Library()));
|
| })
|
| );
|
| var $list = l.types.getValues();
|
| @@ -12672,10 +13074,10 @@ WorldGenerator.prototype.markLibraryUsed = function(l) {
|
| for (var $i0 = type.get$members().getValues$0().iterator$0(); $i0.hasNext$0(); ) {
|
| var member = $i0.next$0();
|
| if ((member instanceof PropertyMember)) {
|
| - if ($notnull_bool($ne(member.get$getter(), null))) this.genMethod((($0 = member.get$getter()) && $0.is$Member()));
|
| - if ($notnull_bool($ne(member.get$setter(), null))) this.genMethod((($0 = member.get$setter()) && $0.is$Member()));
|
| + if ($notnull_bool($ne(member.get$getter(), null))) this.genMethod((($0 = member.get$getter()) == null ? null : $0.assert$Member()));
|
| + if ($notnull_bool($ne(member.get$setter(), null))) this.genMethod((($0 = member.get$setter()) == null ? null : $0.assert$Member()));
|
| }
|
| - if ($notnull_bool(member.get$isMethod())) this.genMethod((member && member.is$Member()));
|
| + if ($notnull_bool(member.get$isMethod())) this.genMethod((member == null ? null : member.assert$Member()));
|
| }
|
| }
|
| }
|
| @@ -12686,7 +13088,7 @@ WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, depe
|
| if (!this.globals.containsKey(fullname)) {
|
| this.globals.$setindex(fullname, GlobalValue.GlobalValue$fromStatic$factory(field, fieldValue, dependencies));
|
| }
|
| - return (($0 = this.globals.$index(fullname)) && $0.is$GlobalValue());
|
| + return (($0 = this.globals.$index(fullname)) == null ? null : $0.assert$GlobalValue());
|
| }
|
| WorldGenerator.prototype.globalForConst = function(exp, dependencies) {
|
| var $0;
|
| @@ -12694,8 +13096,8 @@ WorldGenerator.prototype.globalForConst = function(exp, dependencies) {
|
| if (!this.globals.containsKey(key)) {
|
| this.globals.$setindex(key, GlobalValue.GlobalValue$fromConst$factory(this.globals.get$length(), exp, dependencies));
|
| }
|
| - $assert($eq(this.globals.$index(key).get$type(), exp.type), "globals[key].type == exp.type", "gen.dart", 128, 12);
|
| - return (($0 = this.globals.$index(key)) && $0.is$GlobalValue());
|
| + $assert($eq(this.globals.$index(key).get$type(), exp.type), "globals[key].type == exp.type", "gen.dart", 130, 12);
|
| + return (($0 = this.globals.$index(key)) == null ? null : $0.assert$GlobalValue());
|
| }
|
| WorldGenerator.prototype.writeTypes = function(lib) {
|
| var $0;
|
| @@ -12704,7 +13106,7 @@ WorldGenerator.prototype.writeTypes = function(lib) {
|
| var $list = lib.imports;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var import_ = $list.$index($i);
|
| - this.writeTypes((($0 = import_.get$library()) && $0.is$Library()));
|
| + this.writeTypes((($0 = import_.get$library()) == null ? null : $0.assert$Library()));
|
| }
|
| for (var i = 0;
|
| i < lib.sources.length; i++) {
|
| @@ -12726,19 +13128,19 @@ WorldGenerator.prototype.writeTypes = function(lib) {
|
| var $list = this._orderValues(lib.types);
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var type = $list.$index($i);
|
| - if ($notnull_bool(type.get$isUsed()) && $notnull_bool(type.get$isClass())) {
|
| - this.writeType((type && type.is$lang_Type()));
|
| + if (($notnull_bool(type.get$isUsed()) || $notnull_bool(type.get$isHiddenNativeType())) && $notnull_bool(type.get$isClass())) {
|
| + this.writeType((type == null ? null : type.assert$lang_Type()));
|
| if ($notnull_bool(type.get$isGeneric())) {
|
| var $list0 = this._orderValues(type._concreteTypes);
|
| for (var $i0 = 0;$i0 < $list0.length; $i0++) {
|
| var ct = $list0.$index($i0);
|
| - this.writeType((ct && ct.is$lang_Type()));
|
| + this.writeType((ct == null ? null : ct.assert$lang_Type()));
|
| }
|
| }
|
| }
|
| - if ($notnull_bool(type.get$isFunction()) && $notnull_bool($ne(type.get$varStubs(), null))) {
|
| + else if ($notnull_bool(type.get$isFunction()) && type.get$varStubs().length > 0) {
|
| this.writer.comment(('// ********** Code for ' + type.get$jsname() + ' **************'));
|
| - this._writeDynamicStubs((type && type.is$lang_Type()));
|
| + this._writeDynamicStubs((type == null ? null : type.assert$lang_Type()));
|
| }
|
| if ($notnull_bool($ne(type.get$typeCheckCode(), null))) {
|
| this.writer.writeln($assert_String(type.get$typeCheckCode()));
|
| @@ -12750,13 +13152,28 @@ WorldGenerator.prototype.genMethod = function(meth, enclosingMethod) {
|
| new MethodGenerator(meth, enclosingMethod).run();
|
| }
|
| }
|
| +WorldGenerator.prototype._prototypeOf = function(type, name) {
|
| + if ($notnull_bool(type.get$isHiddenNativeType())) {
|
| + this.corejs.ensureDynamicProto();
|
| + return ('\$dynamic("' + name + '").' + type.get$jsname());
|
| + }
|
| + else {
|
| + return ('' + type.get$jsname() + '.prototype.' + name);
|
| + }
|
| +}
|
| WorldGenerator.prototype._maybeIsTest = function(onType, checkType) {
|
| - if (!$notnull_bool(checkType.isTested)) return;
|
| - var value = 'false';
|
| - if ($notnull_bool(onType.isSubtypeOf(checkType))) {
|
| - value = 'function(){return this;}';
|
| + var isSubtype = onType.isSubtypeOf(checkType);
|
| + if ($notnull_bool(checkType.isTested)) {
|
| + this.writer.writeln(this._prototypeOf(onType, ('is\$' + checkType.get$jsname())) + (' = function(){return ' + isSubtype + '};'));
|
| + }
|
| + if ($notnull_bool(checkType.isChecked)) {
|
| + var body = 'return this';
|
| + var checkName = ('assert\$' + checkType.get$jsname());
|
| + if (!$notnull_bool(isSubtype)) {
|
| + body = $assert_String($globals.world.objectType.varStubs.$index(checkName).get$body());
|
| + }
|
| + this.writer.writeln(this._prototypeOf(onType, checkName) + (' = function(){' + body + '};'));
|
| }
|
| - this.writer.writeln(('' + onType.get$jsname() + '.prototype.is\$' + checkType.get$jsname() + ' = ') + ('' + value + ';'));
|
| }
|
| WorldGenerator.prototype.writeType = function(type) {
|
| var $0;
|
| @@ -12783,7 +13200,7 @@ WorldGenerator.prototype.writeType = function(type) {
|
| }
|
| }
|
| else {
|
| - var standardConstructor = (($0 = type.get$constructors().$index('')) && $0.is$Member());
|
| + var standardConstructor = (($0 = type.get$constructors().$index('')) == null ? null : $0.assert$Member());
|
| if (standardConstructor == null || standardConstructor.generator == null) {
|
| if (!$notnull_bool(type.get$isNative())) {
|
| this.writer.writeln(('function ' + type.get$jsname() + '() {}'));
|
| @@ -12802,8 +13219,8 @@ WorldGenerator.prototype.writeType = function(type) {
|
| }
|
| if (!$notnull_bool(type.get$isTop())) {
|
| if ((type instanceof ConcreteType)) {
|
| - var c = (type && type.is$ConcreteType());
|
| - this._ensureInheritsHelper();
|
| + var c = (type == null ? null : type.assert$ConcreteType());
|
| + this.corejs.ensureInheritsHelper();
|
| this.writer.writeln(('\$inherits(' + c.get$jsname() + ', ' + c.genericType.get$jsname() + ');'));
|
| for (var p = c._parent;
|
| (p instanceof ConcreteType); p = p._parent) {
|
| @@ -12813,7 +13230,7 @@ WorldGenerator.prototype.writeType = function(type) {
|
| }
|
| else if (!$notnull_bool(type.get$isNative())) {
|
| if (type.get$parent() != null && !$notnull_bool(type.get$parent().get$isObject())) {
|
| - this._ensureInheritsHelper();
|
| + this.corejs.ensureInheritsHelper();
|
| this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$parent().get$jsname() + ');'));
|
| }
|
| }
|
| @@ -12825,7 +13242,7 @@ WorldGenerator.prototype.writeType = function(type) {
|
| var $list = this._orderValues(type.get$genericType()._concreteTypes);
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var ct = $list.$index($i);
|
| - this._maybeIsTest(type, (ct && ct.is$lang_Type()));
|
| + this._maybeIsTest(type, (ct == null ? null : ct.assert$lang_Type()));
|
| }
|
| }
|
| if (type.get$interfaces() != null) {
|
| @@ -12835,12 +13252,12 @@ WorldGenerator.prototype.writeType = function(type) {
|
| seen.addAll(type.get$interfaces());
|
| while (!worklist.isEmpty()) {
|
| var interface_ = worklist.removeLast();
|
| - this._maybeIsTest(type, (($0 = interface_.get$genericType()) && $0.is$lang_Type()));
|
| + this._maybeIsTest(type, (($0 = interface_.get$genericType()) == null ? null : $0.assert$lang_Type()));
|
| if (interface_.get$genericType()._concreteTypes != null) {
|
| var $list = this._orderValues(interface_.get$genericType()._concreteTypes);
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var ct = $list.$index($i);
|
| - this._maybeIsTest(type, (ct && ct.is$lang_Type()));
|
| + this._maybeIsTest(type, (ct == null ? null : ct.assert$lang_Type()));
|
| }
|
| }
|
| var $list = interface_.get$interfaces();
|
| @@ -12858,22 +13275,17 @@ WorldGenerator.prototype.writeType = function(type) {
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var member = $list.$index($i);
|
| if ((member instanceof FieldMember)) {
|
| - this._writeField((member && member.is$FieldMember()));
|
| + this._writeField((member == null ? null : member.assert$FieldMember()));
|
| }
|
| if ((member instanceof PropertyMember)) {
|
| - this._writeProperty((member && member.is$PropertyMember()));
|
| + this._writeProperty((member == null ? null : member.assert$PropertyMember()));
|
| }
|
| if ($notnull_bool(member.get$isMethod())) {
|
| - this._writeMethod((member && member.is$Member()));
|
| + this._writeMethod((member == null ? null : member.assert$Member()));
|
| }
|
| }
|
| this._writeDynamicStubs(type);
|
| }
|
| -WorldGenerator.prototype._ensureInheritsHelper = function() {
|
| - if ($notnull_bool(this._inheritsGenerated)) return;
|
| - this._inheritsGenerated = true;
|
| - this.writer.writeln("/** Implements extends for Dart classes on JavaScript prototypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto__) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n function tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tmp();\n child.prototype.constructor = child;\n }\n}");
|
| -}
|
| WorldGenerator.prototype._ensureInheritMembersHelper = function() {
|
| if (this._mixins != null) return;
|
| this._mixins = new CodeWriter();
|
| @@ -12881,12 +13293,10 @@ WorldGenerator.prototype._ensureInheritMembersHelper = function() {
|
| this._mixins.writeln("/** Implements extends for generic types. */\nfunction $inheritsMembers(child, parent) {\n child = child.prototype;\n parent = parent.prototype;\n Object.getOwnPropertyNames(parent).forEach(function(name) {\n if (typeof(child[name]) == 'undefined') child[name] = parent[name];\n });\n}");
|
| }
|
| WorldGenerator.prototype._writeDynamicStubs = function(type) {
|
| - if (type.varStubs != null) {
|
| - var $list = orderValuesByKeys(type.varStubs);
|
| - for (var $i = 0;$i < $list.length; $i++) {
|
| - var stub = $list.$index($i);
|
| - stub.generate$1(this.writer);
|
| - }
|
| + var $list = orderValuesByKeys(type.varStubs);
|
| + for (var $i = 0;$i < $list.length; $i++) {
|
| + var stub = $list.$index($i);
|
| + stub.generate$1(this.writer);
|
| }
|
| }
|
| WorldGenerator.prototype._writeStaticField = function(field) {
|
| @@ -12907,9 +13317,9 @@ WorldGenerator.prototype._writeField = function(field) {
|
| this.writer.writeln(('var ' + field.get$jsname() + ';'));
|
| }
|
| if ($notnull_bool(field._providePropertySyntax)) {
|
| - this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.get\$' + field.get$jsname() + ' = ') + ('function() { return this.' + field.get$jsname() + '; };'));
|
| + this.writer.writeln(this._prototypeOf(field.declaringType, ('get\$' + field.get$jsname())) + (' = function() { return this.' + field.get$jsname() + '; };'));
|
| if (!$notnull_bool(field.isFinal)) {
|
| - this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.set\$' + field.get$jsname() + ' = ') + ('function(value) { return this.' + field.get$jsname() + ' = value; };'));
|
| + this.writer.writeln(this._prototypeOf(field.declaringType, ('set\$' + field.get$jsname())) + (' = function(value) { return this.' + field.get$jsname() + ' = value; };'));
|
| }
|
| }
|
| }
|
| @@ -12949,7 +13359,7 @@ WorldGenerator.prototype.writeGlobals = function() {
|
| for (var $i = list.iterator$0(); $i.hasNext$0(); ) {
|
| var global = $i.next$0();
|
| if ($notnull_bool($ne(global.get$field(), null))) {
|
| - this._writeStaticField((($0 = global.get$field()) && $0.is$FieldMember()));
|
| + this._writeStaticField((($0 = global.get$field()) == null ? null : $0.assert$FieldMember()));
|
| }
|
| }
|
| this.writer.exitBlock('}');
|
| @@ -12971,7 +13381,7 @@ WorldGenerator.prototype.writeGlobals = function() {
|
| }
|
| WorldGenerator.prototype._orderValues = function(map) {
|
| var $0;
|
| - var values = (($0 = map.getValues()) && $0.is$List());
|
| + var values = (($0 = map.getValues()) == null ? null : $0.assert$List());
|
| values.sort(this.get$_compareMembers());
|
| return values;
|
| }
|
| @@ -12992,10 +13402,10 @@ WorldGenerator.prototype.useMapFactory = function() {
|
| this.corejs.useMap = true;
|
| var factType = $globals.world.get$coreimpl().types.$index('HashMapImplementation');
|
| var m = factType.resolveMember$1('\$setindex');
|
| - this.genMethod((($0 = m.get$members().$index(0)) && $0.is$Member()));
|
| + this.genMethod((($0 = m.get$members().$index(0)) == null ? null : $0.assert$Member()));
|
| var c = factType.getConstructor$1('');
|
| - this.genMethod((c && c.is$Member()));
|
| - return (factType && factType.is$lang_Type());
|
| + this.genMethod((c == null ? null : c.assert$Member()));
|
| + return (factType == null ? null : factType.assert$lang_Type());
|
| }
|
| // ********** Code for BlockScope **************
|
| function BlockScope(enclosingMethod, parent, reentrant) {
|
| @@ -13012,7 +13422,7 @@ function BlockScope(enclosingMethod, parent, reentrant) {
|
| this.reentrant = $notnull_bool(reentrant) || $notnull_bool(this.parent.reentrant);
|
| }
|
| }
|
| -BlockScope.prototype.is$BlockScope = function(){return this;};
|
| +BlockScope.prototype.assert$BlockScope = function(){return this};
|
| BlockScope.prototype.get$enclosingMethod = function() { return this.enclosingMethod; };
|
| BlockScope.prototype.set$enclosingMethod = function(value) { return this.enclosingMethod = value; };
|
| BlockScope.prototype.get$parent = function() { return this.parent; };
|
| @@ -13027,7 +13437,7 @@ BlockScope.prototype.get$isMethodScope = function() {
|
| BlockScope.prototype.get$methodScope = function() {
|
| var s = this;
|
| while (!$notnull_bool(s.get$isMethodScope())) s = s.get$parent();
|
| - return (s && s.is$BlockScope());
|
| + return (s == null ? null : s.assert$BlockScope());
|
| }
|
| BlockScope.prototype.lookup = function(name) {
|
| var ret = this._vars.$index(name);
|
| @@ -13073,14 +13483,14 @@ BlockScope.prototype.create = function(name, type, span, isFinal, isParameter) {
|
| ret.set$isFinal(isFinal);
|
| this._vars.$setindex(name, ret);
|
| if (name != jsName) this._jsNames.add(jsName);
|
| - return (ret && ret.is$Value());
|
| + return (ret == null ? null : ret.assert$Value());
|
| }
|
| BlockScope.prototype.declareParameter = function(p) {
|
| return this.create(p.name, p.type, p.definition.span, false, true);
|
| }
|
| BlockScope.prototype.declare = function(id) {
|
| var type = this.enclosingMethod.method.resolveType(id.type, false);
|
| - return this.create(id.name.name, (type && type.is$lang_Type()), id.span, false, false);
|
| + return this.create(id.name.name, (type == null ? null : type.assert$lang_Type()), id.span, false, false);
|
| }
|
| BlockScope.prototype.getRethrow = function() {
|
| var $0;
|
| @@ -13088,7 +13498,7 @@ BlockScope.prototype.getRethrow = function() {
|
| while ($notnull_bool(scope.get$rethrow() == null) && $notnull_bool($ne(scope.get$parent(), null))) {
|
| scope = scope.get$parent();
|
| }
|
| - return (($0 = scope.get$rethrow()) && $0.is$Value());
|
| + return (($0 = scope.get$rethrow()) == null ? null : $0.assert$Value());
|
| }
|
| BlockScope.prototype.lookup$1 = function($0) {
|
| return this.lookup($assert_String($0));
|
| @@ -13109,14 +13519,14 @@ function MethodGenerator(method, enclosingMethod) {
|
| this._scope = new BlockScope(this, null, false);
|
| }
|
| if (this.enclosingMethod != null && this.method.name != '') {
|
| - var m = (($0 = this.method) && $0.is$MethodMember());
|
| + var m = (($0 = this.method) == null ? null : $0.assert$MethodMember());
|
| this._scope.create(m.name, m.get$functionType(), m.definition.span, true, false);
|
| }
|
| this._usedTemps = new HashSetImplementation();
|
| this._freeTemps = [];
|
| }
|
| -MethodGenerator.prototype.is$MethodGenerator = function(){return this;};
|
| -MethodGenerator.prototype.is$TreeVisitor = function(){return this;};
|
| +MethodGenerator.prototype.assert$MethodGenerator = function(){return this};
|
| +MethodGenerator.prototype.assert$TreeVisitor = function(){return this};
|
| MethodGenerator.prototype.get$enclosingMethod = function() { return this.enclosingMethod; };
|
| MethodGenerator.prototype.set$enclosingMethod = function(value) { return this.enclosingMethod = value; };
|
| MethodGenerator.prototype.get$needsThis = function() { return this.needsThis; };
|
| @@ -13192,11 +13602,11 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) {
|
| return x.compareTo$1(y);
|
| })
|
| );
|
| - paramCode = ListFactory.ListFactory$from$factory((names && names.is$Iterable()));
|
| + paramCode = ListFactory.ListFactory$from$factory((names == null ? null : names.assert$Iterable()));
|
| paramCode.addAll$1(this._paramCode);
|
| }
|
| var _params = ('(' + Strings.join(this._paramCode, ", ") + ')');
|
| - var params = ('(' + Strings.join((paramCode && paramCode.is$List_String()), ", ") + ')');
|
| + var params = ('(' + Strings.join((paramCode == null ? null : paramCode.assert$List_String()), ", ") + ')');
|
| if ($notnull_bool(this.method.declaringType.get$isTop()) && !$notnull_bool(this.get$isClosure())) {
|
| defWriter.enterBlock(('function ' + this.method.get$jsname() + params + ' {'));
|
| }
|
| @@ -13237,7 +13647,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) {
|
| defWriter.writeln('var \$this = this; // closure support');
|
| }
|
| if (this._usedTemps.get$length() > 0 || this._freeTemps.length > 0) {
|
| - $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.dart", 817, 14);
|
| + $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.dart", 812, 14);
|
| this._freeTemps.addAll(this._usedTemps);
|
| this._freeTemps.sort((function (x, y) {
|
| return x.compareTo$1(y);
|
| @@ -13247,7 +13657,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) {
|
| }
|
| defWriter.writeln(this.writer.get$text());
|
| if ($notnull_bool($ne(names, null))) {
|
| - defWriter.exitBlock(('}).bind(null, ' + Strings.join((names && names.is$List_String()), ", ") + ')'));
|
| + defWriter.exitBlock(('}).bind(null, ' + Strings.join((names == null ? null : names.assert$List_String()), ", ") + ')'));
|
| }
|
| else if ($notnull_bool(this.get$isClosure()) && this.method.name == '') {
|
| defWriter.exitBlock('})');
|
| @@ -13260,7 +13670,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) {
|
| }
|
| this._provideOptionalParamInfo(defWriter);
|
| if ((this.method instanceof MethodMember)) {
|
| - var m = (($0 = this.method) && $0.is$MethodMember());
|
| + var m = (($0 = this.method) == null ? null : $0.assert$MethodMember());
|
| if ($notnull_bool(m._providePropertySyntax)) {
|
| defWriter.enterBlock(('' + m.declaringType.get$jsname() + '.prototype') + ('.get\$' + m.get$jsname() + ' = function() {'));
|
| defWriter.writeln(('return ' + m.declaringType.get$jsname() + '.prototype.') + ('' + m.get$jsname() + '.bind(this);'));
|
| @@ -13274,7 +13684,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) {
|
| MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) {
|
| var $0;
|
| if ((this.method instanceof MethodMember)) {
|
| - var meth = (($0 = this.method) && $0.is$MethodMember());
|
| + var meth = (($0 = this.method) == null ? null : $0.assert$MethodMember());
|
| if ($notnull_bool(meth._provideOptionalParamInfo)) {
|
| var optNames = [];
|
| var optValues = [];
|
| @@ -13298,7 +13708,7 @@ MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) {
|
| start = meth.declaringType.get$jsname() + '.prototype.';
|
| }
|
| optNames.addAll$1(optValues);
|
| - var optional = "['" + Strings.join((optNames && optNames.is$List_String()), "', '") + "']";
|
| + var optional = "['" + Strings.join((optNames == null ? null : optNames.assert$List_String()), "', '") + "']";
|
| defWriter.writeln(('' + start + meth.get$jsname() + '.\$optional = ' + optional));
|
| }
|
| }
|
| @@ -13331,10 +13741,10 @@ MethodGenerator.prototype.writeBody = function() {
|
| if ($notnull_bool($ne(initializers, null)) && $notnull_bool(p.get$isInitializer())) {
|
| var field = this.method.declaringType.getMember($assert_String(p.get$name()));
|
| if ($notnull_bool(field == null)) {
|
| - $globals.world.error('bad this parameter - no matching field', (($0 = p.get$definition().get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('bad this parameter - no matching field', (($0 = p.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| if (!$notnull_bool(field.get$isField())) {
|
| - $globals.world.error(('"this.' + p.get$name() + '" does not refer to a field'), (($0 = p.get$definition().get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('"this.' + p.get$name() + '" does not refer to a field'), (($0 = p.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| var paramValue = new Value(field.get$returnType(), p.get$name(), p.get$definition().get$span(), false);
|
| this._paramCode.add(paramValue.get$code());
|
| @@ -13342,13 +13752,13 @@ MethodGenerator.prototype.writeBody = function() {
|
| initializedFields.add$1(p.get$name());
|
| }
|
| else {
|
| - var paramValue = this._scope.declareParameter((p && p.is$Parameter()));
|
| + var paramValue = this._scope.declareParameter((p == null ? null : p.assert$Parameter()));
|
| this._paramCode.add(paramValue.get$code());
|
| }
|
| }
|
| var body = this.method.get$definition().get$body();
|
| if ($notnull_bool(body == null) && !$notnull_bool(this.method.get$isConstructor()) && !$notnull_bool(this.method.get$isNative())) {
|
| - $globals.world.error(('unexpected empty body for ' + this.method.name), (($0 = this.method.get$definition().get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('unexpected empty body for ' + this.method.name), (($0 = this.method.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| var initializerCall = null;
|
| var declaredInitializers = this.method.get$definition().get$initializers();
|
| @@ -13362,57 +13772,57 @@ MethodGenerator.prototype.writeBody = function() {
|
| var init = $i.next$0();
|
| if ((init instanceof CallExpression)) {
|
| if ($notnull_bool($ne(initializerCall, null))) {
|
| - $globals.world.error('only one initializer redirecting call is allowed', (($0 = init.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('only one initializer redirecting call is allowed', (($0 = init.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| initializerCall = init;
|
| }
|
| else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign($assert_num(init.get$op().get$kind())) == 0) {
|
| var left = init.get$x();
|
| if (!((left instanceof DotExpression) && (left.get$self() instanceof ThisExpression) || (left instanceof VarExpression))) {
|
| - $globals.world.error('invalid left side of initializer', (($0 = left.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('invalid left side of initializer', (($0 = left.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| continue;
|
| }
|
| var f = this.method.declaringType.getMember($assert_String(left.get$name().get$name()));
|
| if ($notnull_bool(f == null)) {
|
| - $globals.world.error('bad initializer - no matching field', (($0 = left.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('bad initializer - no matching field', (($0 = left.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| continue;
|
| }
|
| else if (!$notnull_bool(f.get$isField())) {
|
| - $globals.world.error(('"' + left.get$name().get$name() + '" does not refer to a field'), (($0 = left.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('"' + left.get$name().get$name() + '" does not refer to a field'), (($0 = left.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| continue;
|
| }
|
| initializedFields.add$1(f.get$name());
|
| - this.writer.writeln(('this.' + f.get$jsname() + ' = ' + this.visitValue((($0 = init.get$y()) && $0.is$lang_Expression())).get$code() + ';'));
|
| + this.writer.writeln(('this.' + f.get$jsname() + ' = ' + this.visitValue((($0 = init.get$y()) == null ? null : $0.assert$lang_Expression())).get$code() + ';'));
|
| }
|
| else {
|
| - $globals.world.error('invalid initializer', (($0 = init.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('invalid initializer', (($0 = init.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| }
|
| this.writer.comment('// Initializers done');
|
| }
|
| - if ($notnull_bool(this.method.get$isConstructor()) && $notnull_bool(initializerCall == null)) {
|
| + if ($notnull_bool(this.method.get$isConstructor()) && $notnull_bool(initializerCall == null) && !$notnull_bool(this.method.get$isNative())) {
|
| var parentType = this.method.declaringType.get$parent();
|
| if ($notnull_bool($ne(parentType, null)) && !$notnull_bool(parentType.get$isObject())) {
|
| initializerCall = new CallExpression(new SuperExpression(this.method.get$span()), [], this.method.get$span());
|
| }
|
| }
|
| if ($notnull_bool($ne(initializerCall, null))) {
|
| - var target = this._writeInitializerCall((initializerCall && initializerCall.is$CallExpression()));
|
| + var target = this._writeInitializerCall((initializerCall == null ? null : initializerCall.assert$CallExpression()));
|
| if (!$notnull_bool(target.get$isSuper())) {
|
| if (initializers.length > 0) {
|
| var $list = this.method.get$parameters();
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var p = $list.$index($i);
|
| if ($notnull_bool(p.get$isInitializer())) {
|
| - $globals.world.error('no initialization allowed on redirecting constructors', (($0 = p.get$definition().get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('no initialization allowed on redirecting constructors', (($0 = p.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()));
|
| break;
|
| }
|
| }
|
| }
|
| if ($notnull_bool($ne(declaredInitializers, null)) && declaredInitializers.length > 1) {
|
| var init = $notnull_bool($eq(declaredInitializers.$index(0), initializerCall)) ? declaredInitializers.$index(1) : declaredInitializers.$index(0);
|
| - $globals.world.error('no initialization allowed on redirecting constructors', (($0 = init.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('no initialization allowed on redirecting constructors', (($0 = init.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| initializedFields = null;
|
| }
|
| @@ -13421,26 +13831,26 @@ MethodGenerator.prototype.writeBody = function() {
|
| for (var $i = allMembers.iterator$0(); $i.hasNext$0(); ) {
|
| var member = $i.next$0();
|
| if ($notnull_bool(member.get$isField()) && $notnull_bool(member.get$isFinal()) && !$notnull_bool(member.get$isStatic()) && !$notnull_bool(this.method.get$isNative()) && !$notnull_bool(initializedFields.contains$1(member.get$name()))) {
|
| - $globals.world.error(('Field "' + member.get$name() + '" is final and was not initialized'), (($0 = this.method.get$definition().get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('Field "' + member.get$name() + '" is final and was not initialized'), (($0 = this.method.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| }
|
| - this.visitStatementsInBlock((body && body.is$lang_Statement()));
|
| + this.visitStatementsInBlock((body == null ? null : body.assert$lang_Statement()));
|
| }
|
| MethodGenerator.prototype._writeInitializerCall = function(node) {
|
| var contructorName = '';
|
| var targetExp = node.target;
|
| if ((targetExp instanceof DotExpression)) {
|
| - var dot = (targetExp && targetExp.is$DotExpression());
|
| + var dot = (targetExp == null ? null : targetExp.assert$DotExpression());
|
| targetExp = dot.self;
|
| contructorName = dot.name.name;
|
| }
|
| var target = null;
|
| if ((targetExp instanceof SuperExpression)) {
|
| - target = this._makeSuperValue((targetExp && targetExp.is$lang_Node()));
|
| + target = this._makeSuperValue((targetExp == null ? null : targetExp.assert$lang_Node()));
|
| }
|
| else if ((targetExp instanceof ThisExpression)) {
|
| - target = this._makeThisValue((targetExp && targetExp.is$lang_Node()));
|
| + target = this._makeThisValue((targetExp == null ? null : targetExp.assert$lang_Node()));
|
| }
|
| else {
|
| $globals.world.error('bad call in initializers', node.span);
|
| @@ -13455,12 +13865,12 @@ MethodGenerator.prototype._writeInitializerCall = function(node) {
|
| }
|
| other = other.get$initDelegate();
|
| }
|
| - $globals.world.gen.genMethod((m && m.is$Member()));
|
| + $globals.world.gen.genMethod((m == null ? null : m.assert$Member()));
|
| var value = m.invoke$4(this, node, target, this._makeArgs(node.arguments));
|
| if ($notnull_bool($ne(target.get$type(), $globals.world.objectType))) {
|
| this.writer.writeln(('' + value.get$code() + ';'));
|
| }
|
| - return (target && target.is$Value());
|
| + return (target == null ? null : target.assert$Value());
|
| }
|
| MethodGenerator.prototype._makeArgs = function(arguments) {
|
| var $0;
|
| @@ -13472,9 +13882,9 @@ MethodGenerator.prototype._makeArgs = function(arguments) {
|
| seenLabel = true;
|
| }
|
| else if ($notnull_bool(seenLabel)) {
|
| - $globals.world.error('bare argument can not follow named arguments', (($0 = arg.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('bare argument can not follow named arguments', (($0 = arg.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| - args.add$1(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())));
|
| + args.add$1(this.visitValue((($0 = arg.get$value()) == null ? null : $0.assert$lang_Expression())));
|
| }
|
| return new Arguments(arguments, args);
|
| }
|
| @@ -13485,14 +13895,14 @@ MethodGenerator.prototype._invokeNative = function(name, arguments) {
|
| args = new Arguments(null, arguments);
|
| }
|
| var method = $globals.world.corelib.topType.members.$index(name);
|
| - return (($0 = method.invoke$4(this, method.get$definition(), new Value($globals.world.corelib.topType, null, null, true), args)) && $0.is$Value());
|
| + return (($0 = method.invoke$4(this, method.get$definition(), new Value($globals.world.corelib.topType, null, null, true), args)) == null ? null : $0.assert$Value());
|
| }
|
| MethodGenerator._escapeString = function(text) {
|
| return text.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('\n', '\\n').replaceAll('\r', '\\r');
|
| }
|
| MethodGenerator.prototype.visitStatementsInBlock = function(body) {
|
| if ((body instanceof BlockStatement)) {
|
| - var block = (body && body.is$BlockStatement());
|
| + var block = (body == null ? null : body.assert$BlockStatement());
|
| var $list = block.body;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var stmt = $list.$index($i);
|
| @@ -13515,8 +13925,8 @@ MethodGenerator.prototype._makeLambdaMethod = function(name, func) {
|
| meth.set$isLambda(true);
|
| meth.set$enclosingElement(this.method);
|
| meth.resolve$0();
|
| - $globals.world.gen.genMethod((meth && meth.is$Member()), this);
|
| - return (meth && meth.is$MethodMember());
|
| + $globals.world.gen.genMethod((meth == null ? null : meth.assert$Member()), this);
|
| + return (meth == null ? null : meth.assert$MethodMember());
|
| }
|
| MethodGenerator.prototype.visitBool = function(node) {
|
| return this.visitValue(node).convertTo$3(this, $globals.world.nonNullBool, node);
|
| @@ -13532,7 +13942,7 @@ MethodGenerator.prototype.visitTypedValue = function(node, expectedType) {
|
| }
|
| MethodGenerator.prototype.visitVoid = function(node) {
|
| if ((node instanceof PostfixExpression)) {
|
| - var value = this.visitPostfixExpression((node && node.is$PostfixExpression()), true);
|
| + var value = this.visitPostfixExpression((node == null ? null : node.assert$PostfixExpression()), true);
|
| value.checkFirstClass$1(node.span);
|
| return value;
|
| }
|
| @@ -13541,7 +13951,7 @@ MethodGenerator.prototype.visitVoid = function(node) {
|
| MethodGenerator.prototype.visitDietStatement = function(node) {
|
| var $0;
|
| var parser = new lang_Parser(node.span.file, false, false, false, node.span.start);
|
| - this.visitStatementsInBlock((($0 = parser.block$0()) && $0.is$lang_Statement()));
|
| + this.visitStatementsInBlock((($0 = parser.block$0()) == null ? null : $0.assert$lang_Statement()));
|
| return false;
|
| }
|
| MethodGenerator.prototype.visitVariableDefinition = function(node) {
|
| @@ -13559,7 +13969,7 @@ MethodGenerator.prototype.visitVariableDefinition = function(node) {
|
| this.writer.write(', ');
|
| }
|
| var name = node.names.$index(i).get$name();
|
| - var value = this.visitValue((($0 = node.values.$index(i)) && $0.is$lang_Expression()));
|
| + var value = this.visitValue((($0 = node.values.$index(i)) == null ? null : $0.assert$lang_Expression()));
|
| if ($notnull_bool(isFinal)) {
|
| if ($notnull_bool(value == null)) {
|
| $globals.world.error('no value specified for final variable', node.span);
|
| @@ -13568,7 +13978,7 @@ MethodGenerator.prototype.visitVariableDefinition = function(node) {
|
| if ($notnull_bool(thisType.get$isVar())) thisType = value.get$type();
|
| }
|
| }
|
| - var val = this._scope.create($assert_String(name), (thisType && thisType.is$lang_Type()), (($0 = node.names.$index(i).get$span()) && $0.is$SourceSpan()), $assert_bool(isFinal), false);
|
| + var val = this._scope.create($assert_String(name), (thisType == null ? null : thisType.assert$lang_Type()), (($0 = node.names.$index(i).get$span()) == null ? null : $0.assert$SourceSpan()), $assert_bool(isFinal), false);
|
| if ($notnull_bool(value == null)) {
|
| if ($notnull_bool(this._scope.reentrant)) {
|
| this.writer.write(('' + val.get$code() + ' = null'));
|
| @@ -13589,7 +13999,7 @@ MethodGenerator.prototype.visitFunctionDefinition = function(node) {
|
| var $0;
|
| var name = $globals.world.toJsIdentifier(node.name.name);
|
| var meth = this._makeLambdaMethod($assert_String(name), node);
|
| - var funcValue = this._scope.create($assert_String(name), (($0 = meth.get$functionType()) && $0.is$lang_Type()), (($0 = this.method.get$definition().get$span()) && $0.is$SourceSpan()), true, false);
|
| + var funcValue = this._scope.create($assert_String(name), (($0 = meth.get$functionType()) == null ? null : $0.assert$lang_Type()), (($0 = this.method.get$definition().get$span()) == null ? null : $0.assert$SourceSpan()), true, false);
|
| meth.get$generator().writeDefinition$2(this.writer);
|
| return false;
|
| }
|
| @@ -13629,8 +14039,8 @@ MethodGenerator.prototype.visitAssertStatement = function(node) {
|
| var test = this.visitValue(node.test);
|
| if ($notnull_bool($globals.options.enableAsserts)) {
|
| var err = $globals.world.corelib.types.$index('AssertError');
|
| - $globals.world.gen.genMethod((($0 = err.getConstructor$1('')) && $0.is$Member()));
|
| - $globals.world.gen.genMethod((($0 = err.get$members().$index('toString')) && $0.is$Member()));
|
| + $globals.world.gen.genMethod((($0 = err.getConstructor$1('_internal')) == null ? null : $0.assert$Member()));
|
| + $globals.world.gen.genMethod((($0 = err.get$members().$index('toString')) == null ? null : $0.assert$Member()));
|
| var span = node.test.span;
|
| var line = span.get$file().getLine$1(span.get$start());
|
| var column = span.get$file().getColumn$2(line, span.get$start());
|
| @@ -13703,7 +14113,7 @@ MethodGenerator.prototype.visitForStatement = function(node) {
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var s = $list.$index($i);
|
| if ($notnull_bool(needsComma)) this.writer.write(', ');
|
| - var sv = this.visitVoid((s && s.is$lang_Expression()));
|
| + var sv = this.visitVoid((s == null ? null : s.assert$lang_Expression()));
|
| this.writer.write($assert_String(sv.get$code()));
|
| needsComma = true;
|
| }
|
| @@ -13727,10 +14137,10 @@ MethodGenerator.prototype.visitForInStatement = function(node) {
|
| var list = node.list.visit(this);
|
| this._pushBlock(true);
|
| var isFinal = this._isFinal(node.item.type);
|
| - var item = this._scope.create($assert_String(itemName), (itemType && itemType.is$lang_Type()), node.item.name.span, isFinal, false);
|
| - var listVar = (list && list.is$Value());
|
| + var item = this._scope.create($assert_String(itemName), (itemType == null ? null : itemType.assert$lang_Type()), node.item.name.span, isFinal, false);
|
| + var listVar = (list == null ? null : list.assert$Value());
|
| if ($notnull_bool(list.get$needsTemp())) {
|
| - listVar = this._scope.create('\$list', (($0 = list.get$type()) && $0.is$lang_Type()), null, false, false);
|
| + listVar = this._scope.create('\$list', (($0 = list.get$type()) == null ? null : $0.assert$lang_Type()), null, false, false);
|
| this.writer.writeln(('var ' + listVar.code + ' = ' + list.get$code() + ';'));
|
| }
|
| if ($notnull_bool(list.get$type().get$isList())) {
|
| @@ -13742,7 +14152,7 @@ MethodGenerator.prototype.visitForInStatement = function(node) {
|
| else {
|
| this._pushBlock(false);
|
| var iterator = list.invoke$4(this, 'iterator', node.list, Arguments.get$EMPTY());
|
| - var tmpi = this._scope.create('\$i', (($0 = iterator.get$type()) && $0.is$lang_Type()), null, false, false);
|
| + var tmpi = this._scope.create('\$i', (($0 = iterator.get$type()) == null ? null : $0.assert$lang_Type()), null, false, false);
|
| var hasNext = tmpi.invoke$4(this, 'hasNext', node.list, Arguments.get$EMPTY());
|
| var next = tmpi.invoke$4(this, 'next', node.list, Arguments.get$EMPTY());
|
| this.writer.enterBlock(('for (var ' + tmpi.get$code() + ' = ' + iterator.get$code() + '; ' + hasNext.get$code() + '; ) {'));
|
| @@ -13766,26 +14176,26 @@ MethodGenerator.prototype.visitTryStatement = function(node) {
|
| if (node.catches.length == 1) {
|
| var catch_ = node.catches.$index(0);
|
| this._pushBlock(false);
|
| - var ex = this._scope.declare((($0 = catch_.get$exception()) && $0.is$DeclaredIdentifier()));
|
| - this._scope.rethrow = (ex && ex.is$Value());
|
| + var ex = this._scope.declare((($0 = catch_.get$exception()) == null ? null : $0.assert$DeclaredIdentifier()));
|
| + this._scope.rethrow = (ex == null ? null : ex.assert$Value());
|
| this.writer.nextBlock(('} catch (' + ex.get$code() + ') {'));
|
| if ($notnull_bool($ne(catch_.get$trace(), null))) {
|
| - var trace = this._scope.declare((($0 = catch_.get$trace()) && $0.is$DeclaredIdentifier()));
|
| + var trace = this._scope.declare((($0 = catch_.get$trace()) == null ? null : $0.assert$DeclaredIdentifier()));
|
| this.writer.writeln(('var ' + trace.get$code() + ' = \$stackTraceOf(' + ex.get$code() + ');'));
|
| $globals.world.gen.corejs.useStackTraceOf = true;
|
| }
|
| - this._genToDartException((ex && ex.is$Value()), node);
|
| + this._genToDartException((ex == null ? null : ex.assert$Value()), node);
|
| if (!$notnull_bool(ex.get$type().get$isVarOrObject())) {
|
| var test = ex.instanceOf$3$isTrue$forceCheck(this, ex.get$type(), catch_.get$exception().get$span(), false, true);
|
| this.writer.writeln(('if (' + test.get$code() + ') throw ' + ex.get$code() + ';'));
|
| }
|
| - this.visitStatementsInBlock((($0 = node.catches.$index(0).get$body()) && $0.is$lang_Statement()));
|
| + this.visitStatementsInBlock((($0 = node.catches.$index(0).get$body()) == null ? null : $0.assert$lang_Statement()));
|
| this._popBlock();
|
| }
|
| else if (node.catches.length > 0) {
|
| this._pushBlock(false);
|
| var ex = this._scope.create('\$ex', $globals.world.varType, null, false, false);
|
| - this._scope.rethrow = (ex && ex.is$Value());
|
| + this._scope.rethrow = (ex == null ? null : ex.assert$Value());
|
| this.writer.nextBlock(('} catch (' + ex.get$code() + ') {'));
|
| var trace = null;
|
| if (node.catches.some((function (c) {
|
| @@ -13796,13 +14206,13 @@ MethodGenerator.prototype.visitTryStatement = function(node) {
|
| this.writer.writeln(('var ' + trace.get$code() + ' = \$stackTraceOf(' + ex.get$code() + ');'));
|
| $globals.world.gen.corejs.useStackTraceOf = true;
|
| }
|
| - this._genToDartException((ex && ex.is$Value()), node);
|
| + this._genToDartException((ex == null ? null : ex.assert$Value()), node);
|
| var needsRethrow = true;
|
| for (var i = 0;
|
| i < node.catches.length; i++) {
|
| var catch_ = node.catches.$index(i);
|
| this._pushBlock(false);
|
| - var tmp = this._scope.declare((($0 = catch_.get$exception()) && $0.is$DeclaredIdentifier()));
|
| + var tmp = this._scope.declare((($0 = catch_.get$exception()) == null ? null : $0.assert$DeclaredIdentifier()));
|
| if (!$notnull_bool(tmp.get$type().get$isVarOrObject())) {
|
| var test = ex.instanceOf$3$isTrue$forceCheck(this, tmp.get$type(), catch_.get$exception().get$span(), true, true);
|
| if (i == 0) {
|
| @@ -13817,14 +14227,14 @@ MethodGenerator.prototype.visitTryStatement = function(node) {
|
| }
|
| this.writer.writeln(('var ' + tmp.get$code() + ' = ' + ex.get$code() + ';'));
|
| if ($notnull_bool($ne(catch_.get$trace(), null))) {
|
| - var tmptrace = this._scope.declare((($0 = catch_.get$trace()) && $0.is$DeclaredIdentifier()));
|
| + var tmptrace = this._scope.declare((($0 = catch_.get$trace()) == null ? null : $0.assert$DeclaredIdentifier()));
|
| this.writer.writeln(('var ' + tmptrace.get$code() + ' = ' + trace.get$code() + ';'));
|
| }
|
| - this.visitStatementsInBlock((($0 = catch_.get$body()) && $0.is$lang_Statement()));
|
| + this.visitStatementsInBlock((($0 = catch_.get$body()) == null ? null : $0.assert$lang_Statement()));
|
| this._popBlock();
|
| if ($notnull_bool(tmp.get$type().get$isVarOrObject())) {
|
| if (i + 1 < node.catches.length) {
|
| - $globals.world.warning('Unreachable catch clause', (($0 = node.catches.$index(i + 1)) && $0.is$SourceSpan()));
|
| + $globals.world.warning('Unreachable catch clause', (($0 = node.catches.$index(i + 1)) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| if (i > 0) {
|
| this.writer.exitBlock('}');
|
| @@ -13857,7 +14267,7 @@ MethodGenerator.prototype.visitSwitchStatement = function(node) {
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var case_ = $list.$index($i);
|
| if ($notnull_bool($ne(case_.get$label(), null))) {
|
| - $globals.world.error('unimplemented: labeled case statement', (($0 = case_.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('unimplemented: labeled case statement', (($0 = case_.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this._pushBlock(false);
|
| for (var i = 0;
|
| @@ -13865,12 +14275,12 @@ MethodGenerator.prototype.visitSwitchStatement = function(node) {
|
| var expr = case_.get$cases().$index(i);
|
| if ($notnull_bool(expr == null)) {
|
| if (i < case_.get$cases().length - 1) {
|
| - $globals.world.error('default clause must be the last case', (($0 = case_.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('default clause must be the last case', (($0 = case_.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.writer.writeln('default:');
|
| }
|
| else {
|
| - var value = this.visitValue((expr && expr.is$lang_Expression()));
|
| + var value = this.visitValue((expr == null ? null : expr.assert$lang_Expression()));
|
| this.writer.writeln(('case ' + value.get$code() + ':'));
|
| }
|
| }
|
| @@ -13894,7 +14304,7 @@ MethodGenerator.prototype._visitAllStatements = function(statementList, exits) {
|
| var stmt = statementList.$index(i);
|
| exits = stmt.visit$1(this);
|
| if ($notnull_bool($ne(stmt, statementList.$index(statementList.length - 1))) && $notnull_bool(exits)) {
|
| - $globals.world.warning('unreachable code', (($0 = statementList.$index(i + 1).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.warning('unreachable code', (($0 = statementList.$index(i + 1).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| return $assert_bool(exits);
|
| @@ -13983,13 +14393,13 @@ MethodGenerator.prototype.visitCallExpression = function(node) {
|
| var position = node.target;
|
| var name = '\$call';
|
| if ((node.target instanceof DotExpression)) {
|
| - var dot = (($0 = node.target) && $0.is$DotExpression());
|
| + var dot = (($0 = node.target) == null ? null : $0.assert$DotExpression());
|
| target = dot.self.visit(this);
|
| name = dot.name.name;
|
| position = dot.name;
|
| }
|
| else if ((node.target instanceof VarExpression)) {
|
| - var varExpr = (($0 = node.target) && $0.is$VarExpression());
|
| + var varExpr = (($0 = node.target) == null ? null : $0.assert$VarExpression());
|
| name = varExpr.name.name;
|
| target = this._scope.lookup($assert_String(name));
|
| if ($notnull_bool($ne(target, null))) {
|
| @@ -14073,13 +14483,13 @@ MethodGenerator.prototype._visitAssign = function(kind, xn, yn, position, captur
|
| ;
|
| }
|
| if ((xn instanceof VarExpression)) {
|
| - return this._visitVarAssign(kind, (xn && xn.is$VarExpression()), yn, position, captureOriginal);
|
| + return this._visitVarAssign(kind, (xn == null ? null : xn.assert$VarExpression()), yn, position, captureOriginal);
|
| }
|
| else if ((xn instanceof IndexExpression)) {
|
| - return this._visitIndexAssign(kind, (xn && xn.is$IndexExpression()), yn, position, captureOriginal);
|
| + return this._visitIndexAssign(kind, (xn == null ? null : xn.assert$IndexExpression()), yn, position, captureOriginal);
|
| }
|
| else if ((xn instanceof DotExpression)) {
|
| - return this._visitDotAssign(kind, (xn && xn.is$DotExpression()), yn, position, captureOriginal);
|
| + return this._visitDotAssign(kind, (xn == null ? null : xn.assert$DotExpression()), yn, position, captureOriginal);
|
| }
|
| else {
|
| $globals.world.error('illegal lhs', position.span);
|
| @@ -14098,7 +14508,7 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap
|
| }
|
| else if (!$notnull_bool(members.get$treatAsField()) || $notnull_bool(members.get$containsMethods())) {
|
| var right = x.get_$3(this, name, position);
|
| - right = captureOriginal((right && right.is$Value()));
|
| + right = captureOriginal((right == null ? null : right.assert$Value()));
|
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y]));
|
| return x.set_$4(this, name, position, y);
|
| }
|
| @@ -14116,7 +14526,7 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap
|
| if (!$notnull_bool(members.get$treatAsField()) || $notnull_bool(members.get$containsMethods())) {
|
| if (kind != 0) {
|
| var right = members._get$3(this, position, x);
|
| - right = captureOriginal((right && right.is$Value()));
|
| + right = captureOriginal((right == null ? null : right.assert$Value()));
|
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y]));
|
| }
|
| return members._set$4(this, position, x, y);
|
| @@ -14131,17 +14541,17 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap
|
| }
|
| y = y.convertTo$3(this, x.get$type(), yn);
|
| if (kind == 0) {
|
| - x = captureOriginal((x && x.is$Value()));
|
| + x = captureOriginal((x == null ? null : x.assert$Value()));
|
| return new Value(y.get$type(), ('' + x.get$code() + ' = ' + y.get$code()), position.span, true);
|
| }
|
| else if ($notnull_bool(x.get$type().get$isNum()) && $notnull_bool(y.get$type().get$isNum()) && (kind != 46/*TokenKind.TRUNCDIV*/)) {
|
| - x = captureOriginal((x && x.is$Value()));
|
| + x = captureOriginal((x == null ? null : x.assert$Value()));
|
| var op = TokenKind.kindToString(kind);
|
| return new Value(y.get$type(), ('' + x.get$code() + ' ' + op + '= ' + y.get$code()), position.span, true);
|
| }
|
| else {
|
| var right = x;
|
| - right = captureOriginal((right && right.is$Value()));
|
| + right = captureOriginal((right == null ? null : right.assert$Value()));
|
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y]));
|
| return new Value(y.get$type(), ('' + x.get$code() + ' = ' + y.get$code()), position.span, true);
|
| }
|
| @@ -14153,16 +14563,16 @@ MethodGenerator.prototype._visitIndexAssign = function(kind, xn, yn, position, c
|
| var tmptarget = target;
|
| var tmpindex = index;
|
| if (kind != 0) {
|
| - tmptarget = this.getTemp((target && target.is$Value()));
|
| - tmpindex = this.getTemp((index && index.is$Value()));
|
| - index = this.assignTemp((tmpindex && tmpindex.is$Value()), (index && index.is$Value()));
|
| + tmptarget = this.getTemp((target == null ? null : target.assert$Value()));
|
| + tmpindex = this.getTemp((index == null ? null : index.assert$Value()));
|
| + index = this.assignTemp((tmpindex == null ? null : tmpindex.assert$Value()), (index == null ? null : index.assert$Value()));
|
| var right = tmptarget.invoke$4(this, '\$index', position, new Arguments(null, [tmpindex]));
|
| - right = captureOriginal((right && right.is$Value()));
|
| + right = captureOriginal((right == null ? null : right.assert$Value()));
|
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y]));
|
| }
|
| - var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && target.is$Value())).invoke(this, '\$setindex', position, new Arguments(null, [index, y]), false);
|
| - if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarget.is$Value()));
|
| - if ($notnull_bool($ne(tmpindex, index))) this.freeTemp((tmpindex && tmpindex.is$Value()));
|
| + var ret = this.assignTemp((tmptarget == null ? null : tmptarget.assert$Value()), (target == null ? null : target.assert$Value())).invoke(this, '\$setindex', position, new Arguments(null, [index, y]), false);
|
| + if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget == null ? null : tmptarget.assert$Value()));
|
| + if ($notnull_bool($ne(tmpindex, index))) this.freeTemp((tmpindex == null ? null : tmpindex.assert$Value()));
|
| return ret;
|
| }
|
| MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, captureOriginal) {
|
| @@ -14170,13 +14580,13 @@ MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, cap
|
| var y = this.visitValue(yn);
|
| var tmptarget = target;
|
| if (kind != 0) {
|
| - tmptarget = this.getTemp((target && target.is$Value()));
|
| + tmptarget = this.getTemp((target == null ? null : target.assert$Value()));
|
| var right = tmptarget.get_$3(this, xn.name.name, xn.name);
|
| - right = captureOriginal((right && right.is$Value()));
|
| + right = captureOriginal((right == null ? null : right.assert$Value()));
|
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y]));
|
| }
|
| - var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && target.is$Value())).set_(this, xn.name.name, xn.name, (y && y.is$Value()), false);
|
| - if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarget.is$Value()));
|
| + var ret = this.assignTemp((tmptarget == null ? null : tmptarget.assert$Value()), (target == null ? null : target.assert$Value())).set_(this, xn.name.name, xn.name, (y == null ? null : y.assert$Value()), false);
|
| + if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget == null ? null : tmptarget.assert$Value()));
|
| return ret;
|
| }
|
| MethodGenerator.prototype.visitUnaryExpression = function(node) {
|
| @@ -14192,14 +14602,14 @@ MethodGenerator.prototype.visitUnaryExpression = function(node) {
|
| else {
|
| var kind = (16/*TokenKind.INCR*/ == node.op.kind ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/);
|
| var operand = new LiteralExpression(1, new TypeReference(node.span, $globals.world.numType), '1', node.span);
|
| - return this._visitAssign($assert_num(kind), node.self, (operand && operand.is$lang_Expression()), node, to$call$1(null));
|
| + return this._visitAssign($assert_num(kind), node.self, (operand == null ? null : operand.assert$lang_Expression()), node, to$call$1(null));
|
| }
|
|
|
| case 19/*TokenKind.NOT*/:
|
|
|
| if ($notnull_bool(value.get$type().get$isBool()) && $notnull_bool(value.get$isConst())) {
|
| var newVal = !$notnull_bool(value.get$actualValue());
|
| - return EvaluatedValue.EvaluatedValue$factory((($0 = value.get$type()) && $0.is$lang_Type()), newVal, ('' + newVal), node.span);
|
| + return EvaluatedValue.EvaluatedValue$factory((($0 = value.get$type()) == null ? null : $0.assert$lang_Type()), newVal, ('' + newVal), node.span);
|
| }
|
| else {
|
| var newVal = value.convertTo$3(this, $globals.world.nonNullBool, node);
|
| @@ -14239,14 +14649,14 @@ MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) {
|
| var kind = (16/*TokenKind.INCR*/ == node.op.kind) ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/;
|
| var operand = new LiteralExpression(1, new TypeReference(node.span, $globals.world.numType), '1', node.span);
|
| var tmpleft = null, left = null;
|
| - var ret = this._visitAssign($assert_num(kind), node.body, (operand && operand.is$lang_Expression()), node, (function (l) {
|
| + var ret = this._visitAssign($assert_num(kind), node.body, (operand == null ? null : operand.assert$lang_Expression()), node, (function (l) {
|
| if ($notnull_bool(isVoid)) {
|
| return l;
|
| }
|
| else {
|
| left = l;
|
| - tmpleft = $this.forceTemp((l && l.is$Value()));
|
| - return $this.assignTemp((tmpleft && tmpleft.is$Value()), (left && left.is$Value()));
|
| + tmpleft = $this.forceTemp((l == null ? null : l.assert$Value()));
|
| + return $this.assignTemp((tmpleft == null ? null : tmpleft.assert$Value()), (left == null ? null : left.assert$Value()));
|
| }
|
| })
|
| );
|
| @@ -14254,7 +14664,7 @@ MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) {
|
| ret = new Value(ret.get$type(), ("(" + ret.get$code() + ", " + tmpleft.get$code() + ")"), node.span, true);
|
| }
|
| if ($notnull_bool($ne(tmpleft, left))) {
|
| - this.freeTemp((tmpleft && tmpleft.is$Value()));
|
| + this.freeTemp((tmpleft == null ? null : tmpleft.assert$Value()));
|
| }
|
| return ret;
|
| }
|
| @@ -14266,12 +14676,12 @@ MethodGenerator.prototype.visitNewExpression = function(node) {
|
| constructorName = node.name.name;
|
| }
|
| if ($notnull_bool($eq(constructorName, '')) && !(typeRef instanceof GenericTypeReference) && $notnull_bool($ne(typeRef.get$names(), null))) {
|
| - var names = ListFactory.ListFactory$from$factory((($0 = typeRef.get$names()) && $0.is$Iterable()));
|
| + var names = ListFactory.ListFactory$from$factory((($0 = typeRef.get$names()) == null ? null : $0.assert$Iterable()));
|
| constructorName = names.removeLast$0().get$name();
|
| if ($notnull_bool($eq(names.length, 0))) names = null;
|
| - typeRef = new NameTypeReference(typeRef.get$isFinal(), typeRef.get$name(), names, (($0 = typeRef.get$span()) && $0.is$SourceSpan()));
|
| + typeRef = new NameTypeReference(typeRef.get$isFinal(), typeRef.get$name(), names, (($0 = typeRef.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| - var type = this.method.resolveType((typeRef && typeRef.is$TypeReference()), true);
|
| + var type = this.method.resolveType((typeRef == null ? null : typeRef.assert$TypeReference()), true);
|
| if ($notnull_bool(type.get$isTop())) {
|
| type = type.get$library().findTypeByName$1(constructorName);
|
| constructorName = '';
|
| @@ -14292,8 +14702,8 @@ MethodGenerator.prototype.visitNewExpression = function(node) {
|
| var $list = node.arguments;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var arg = $list.$index($i);
|
| - if (!$notnull_bool(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())).get$isConst())) {
|
| - $globals.world.error('const constructor expects const arguments', (($0 = arg.get$span()) && $0.is$SourceSpan()));
|
| + if (!$notnull_bool(this.visitValue((($0 = arg.get$value()) == null ? null : $0.assert$lang_Expression())).get$isConst())) {
|
| + $globals.world.error('const constructor expects const arguments', (($0 = arg.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| }
|
| @@ -14307,11 +14717,11 @@ MethodGenerator.prototype.visitListExpression = function(node) {
|
| var $list = node.values;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var item = $list.$index($i);
|
| - var arg = this.visitValue((item && item.is$lang_Expression()));
|
| + var arg = this.visitValue((item == null ? null : item.assert$lang_Expression()));
|
| argValues.add$1(arg);
|
| if ($notnull_bool(node.isConst)) {
|
| if (!$notnull_bool(arg.get$isConst())) {
|
| - $globals.world.error('const list can only contain const values', (($0 = item.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('const list can only contain const values', (($0 = item.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| argsCode.add$1(arg.get$code());
|
| }
|
| else {
|
| @@ -14323,13 +14733,13 @@ MethodGenerator.prototype.visitListExpression = function(node) {
|
| }
|
| }
|
| $globals.world.get$coreimpl().types.$index('ListFactory').markUsed$0();
|
| - var code = ('[' + Strings.join((argsCode && argsCode.is$List_String()), ", ") + ']');
|
| + var code = ('[' + Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ", ") + ']');
|
| var value = new Value($globals.world.listType, code, node.span, true);
|
| if ($notnull_bool(node.isConst)) {
|
| var immutableList = $globals.world.get$coreimpl().types.$index('ImmutableList');
|
| var immutableListCtor = immutableList.getConstructor$1('from');
|
| var result = immutableListCtor.invoke$4(this, node, new Value.type$ctor(value.get$type(), node.span), new Arguments(null, [value]));
|
| - value = $globals.world.gen.globalForConst(ConstListValue.ConstListValue$factory((immutableList && immutableList.is$lang_Type()), (argValues && argValues.is$List_EvaluatedValue()), ('const ' + code), $assert_String(result.get$code()), node.span), (argValues && argValues.is$List_Value()));
|
| + value = $globals.world.gen.globalForConst(ConstListValue.ConstListValue$factory((immutableList == null ? null : immutableList.assert$lang_Type()), (argValues == null ? null : argValues.assert$List_EvaluatedValue()), ('const ' + code), $assert_String(result.get$code()), node.span), (argValues == null ? null : argValues.assert$List_Value()));
|
| }
|
| return value;
|
| }
|
| @@ -14340,14 +14750,14 @@ MethodGenerator.prototype.visitMapExpression = function(node) {
|
| var argsCode = [];
|
| for (var i = 0;
|
| i < node.items.length; i += 2) {
|
| - var key = this.visitTypedValue((($0 = node.items.$index(i)) && $0.is$lang_Expression()), $globals.world.stringType);
|
| + var key = this.visitTypedValue((($0 = node.items.$index(i)) == null ? null : $0.assert$lang_Expression()), $globals.world.stringType);
|
| var valueItem = node.items.$index(i + 1);
|
| - var value = this.visitValue((valueItem && valueItem.is$lang_Expression()));
|
| + var value = this.visitValue((valueItem == null ? null : valueItem.assert$lang_Expression()));
|
| argValues.add$1(key);
|
| argValues.add$1(value);
|
| if ($notnull_bool(node.isConst)) {
|
| if (!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst())) {
|
| - $globals.world.error('const map can only contain const values', (($0 = valueItem.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('const map can only contain const values', (($0 = valueItem.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| argsCode.add$1(key.get$code());
|
| argsCode.add$1(value.get$code());
|
| }
|
| @@ -14361,15 +14771,15 @@ MethodGenerator.prototype.visitMapExpression = function(node) {
|
| argsCode.add$1(value.get$code());
|
| }
|
| }
|
| - var argList = ('[' + Strings.join((argsCode && argsCode.is$List_String()), ", ") + ']');
|
| + var argList = ('[' + Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ", ") + ']');
|
| var code = ('\$map(' + argList + ')');
|
| if ($notnull_bool(node.isConst)) {
|
| var immutableMap = $globals.world.get$coreimpl().types.$index('ImmutableMap');
|
| var immutableMapCtor = immutableMap.getConstructor$1('');
|
| var argsValue = new Value($globals.world.listType, argList, node.span, true);
|
| var result = immutableMapCtor.invoke$4(this, node, new Value.type$ctor(immutableMap, node.span), new Arguments(null, [argsValue]));
|
| - var value = ConstMapValue.ConstMapValue$factory((immutableMap && immutableMap.is$lang_Type()), (argValues && argValues.is$List_EvaluatedValue()), code, $assert_String(result.get$code()), node.span);
|
| - return $globals.world.gen.globalForConst(value, (argValues && argValues.is$List_Value()));
|
| + var value = ConstMapValue.ConstMapValue$factory((immutableMap == null ? null : immutableMap.assert$lang_Type()), (argValues == null ? null : argValues.assert$List_EvaluatedValue()), code, $assert_String(result.get$code()), node.span);
|
| + return $globals.world.gen.globalForConst(value, (argValues == null ? null : argValues.assert$List_Value()));
|
| }
|
| return new Value(mapImplType, code, node.span, true);
|
| }
|
| @@ -14379,7 +14789,7 @@ MethodGenerator.prototype.visitConditionalExpression = function(node) {
|
| var trueBranch = this.visitValue(node.trueBranch);
|
| var falseBranch = this.visitValue(node.falseBranch);
|
| var code = ('' + test.get$code() + ' ? ' + trueBranch.get$code() + ' : ' + falseBranch.get$code());
|
| - return new Value(lang_Type.union((($0 = trueBranch.get$type()) && $0.is$lang_Type()), (($0 = falseBranch.get$type()) && $0.is$lang_Type())), code, node.span, true);
|
| + return new Value(lang_Type.union((($0 = trueBranch.get$type()) == null ? null : $0.assert$lang_Type()), (($0 = falseBranch.get$type()) == null ? null : $0.assert$lang_Type())), code, node.span, true);
|
| }
|
| MethodGenerator.prototype.visitIsExpression = function(node) {
|
| var value = this.visitValue(node.x);
|
| @@ -14390,7 +14800,7 @@ MethodGenerator.prototype.visitParenExpression = function(node) {
|
| var $0;
|
| var body = this.visitValue(node.body);
|
| if ($notnull_bool(body.get$isConst())) {
|
| - return EvaluatedValue.EvaluatedValue$factory((($0 = body.get$type()) && $0.is$lang_Type()), body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.span);
|
| + return EvaluatedValue.EvaluatedValue$factory((($0 = body.get$type()) == null ? null : $0.assert$lang_Type()), body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.span);
|
| }
|
| return new Value(body.get$type(), ('(' + body.get$code() + ')'), node.span, true);
|
| }
|
| @@ -14409,7 +14819,7 @@ MethodGenerator.prototype._makeMissingValue = function(name) {
|
| }
|
| MethodGenerator.prototype._makeThisOrType = function(span) {
|
| var $0;
|
| - return new BareValue(this, (($0 = this._getOutermostMethod()) && $0.is$MethodGenerator()), span);
|
| + return new BareValue(this, (($0 = this._getOutermostMethod()) == null ? null : $0.assert$MethodGenerator()), span);
|
| }
|
| MethodGenerator.prototype.visitThisExpression = function(node) {
|
| return this._makeThisValue(node);
|
| @@ -14422,7 +14832,7 @@ MethodGenerator.prototype.visitNullExpression = function(node) {
|
| }
|
| MethodGenerator.prototype._isUnaryIncrement = function(item) {
|
| if ((item instanceof UnaryExpression)) {
|
| - var u = (item && item.is$UnaryExpression());
|
| + var u = (item == null ? null : item.assert$UnaryExpression());
|
| return u.op.kind == 16/*TokenKind.INCR*/ || u.op.kind == 17/*TokenKind.DECR*/;
|
| }
|
| else {
|
| @@ -14432,23 +14842,23 @@ MethodGenerator.prototype._isUnaryIncrement = function(item) {
|
| MethodGenerator.prototype.visitLiteralExpression = function(node) {
|
| var $0;
|
| var type = node.type.type;
|
| - $assert($ne(type, null), "type != null", "gen.dart", 2269, 12);
|
| - if (!!(($0 = node.value) && $0.is$List)) {
|
| + $assert($ne(type, null), "type != null", "gen.dart", 2264, 12);
|
| + if (!!(($0 = node.value) && $0.is$List())) {
|
| var items = [];
|
| var $list = node.value;
|
| for (var $i = node.value.iterator$0(); $i.hasNext$0(); ) {
|
| var item = $i.next$0();
|
| - var val = this.visitValue((item && item.is$lang_Expression()));
|
| + var val = this.visitValue((item == null ? null : item.assert$lang_Expression()));
|
| val.invoke$4(this, 'toString', item, Arguments.get$EMPTY());
|
| var code = val.get$code();
|
| - if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpression) || (item instanceof PostfixExpression) || $notnull_bool(this._isUnaryIncrement((item && item.is$lang_Expression())))) {
|
| + if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpression) || (item instanceof PostfixExpression) || $notnull_bool(this._isUnaryIncrement((item == null ? null : item.assert$lang_Expression())))) {
|
| code = ('(' + code + ')');
|
| }
|
| if ($notnull_bool($eq(items.length, 0)) || ($notnull_bool($ne(code, "''")) && $notnull_bool($ne(code, '""')))) {
|
| items.add$1(code);
|
| }
|
| }
|
| - return new Value(type, ('(' + Strings.join((items && items.is$List_String()), " + ") + ')'), node.span, true);
|
| + return new Value(type, ('(' + Strings.join((items == null ? null : items.assert$List_String()), " + ") + ')'), node.span, true);
|
| }
|
| var text = node.text;
|
| if ($notnull_bool(type.get$isString())) {
|
| @@ -14467,13 +14877,13 @@ MethodGenerator.prototype.visitLiteralExpression = function(node) {
|
| node.text = $assert_String(text);
|
| }
|
| }
|
| - return EvaluatedValue.EvaluatedValue$factory((type && type.is$lang_Type()), node.value, node.text, null);
|
| + return EvaluatedValue.EvaluatedValue$factory((type == null ? null : type.assert$lang_Type()), node.value, node.text, null);
|
| }
|
| MethodGenerator.prototype.visitPostfixExpression$1 = function($0) {
|
| - return this.visitPostfixExpression(($0 && $0.is$PostfixExpression()), false);
|
| + return this.visitPostfixExpression(($0 == null ? null : $0.assert$PostfixExpression()), false);
|
| };
|
| MethodGenerator.prototype.writeDefinition$2 = function($0, $1) {
|
| - return this.writeDefinition(($0 && $0.is$CodeWriter()), ($1 && $1.is$LambdaExpression()));
|
| + return this.writeDefinition(($0 == null ? null : $0.assert$CodeWriter()), ($1 == null ? null : $1.assert$LambdaExpression()));
|
| };
|
| // ********** Code for Arguments **************
|
| function Arguments(nodes, values) {
|
| @@ -14481,7 +14891,7 @@ function Arguments(nodes, values) {
|
| this.values = values;
|
| // Initializers done
|
| }
|
| -Arguments.prototype.is$Arguments = function(){return this;};
|
| +Arguments.prototype.assert$Arguments = function(){return this};
|
| Arguments.Arguments$bare$factory = function(arity) {
|
| var values = [];
|
| for (var i = 0;
|
| @@ -14527,7 +14937,7 @@ Arguments.prototype.getIndexOfName = function(name) {
|
| Arguments.prototype.getValue = function(name) {
|
| var $0;
|
| var i = this.getIndexOfName(name);
|
| - return (($0 = i >= 0 ? this.values.$index(i) : null) && $0.is$Value());
|
| + return (($0 = i >= 0 ? this.values.$index(i) : null) == null ? null : $0.assert$Value());
|
| }
|
| Arguments.prototype.get$bareCount = function() {
|
| if (this._bareCount == null) {
|
| @@ -14550,8 +14960,8 @@ Arguments.prototype.getCode = function() {
|
| i < this.get$length(); i++) {
|
| argsCode.add$1(this.values.$index(i).get$code());
|
| }
|
| - Arguments.removeTrailingNulls((argsCode && argsCode.is$List_Value()));
|
| - return Strings.join((argsCode && argsCode.is$List_String()), ", ");
|
| + Arguments.removeTrailingNulls((argsCode == null ? null : argsCode.assert$List_Value()));
|
| + return Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ", ");
|
| }
|
| Arguments.removeTrailingNulls = function(argsCode) {
|
| while (argsCode.length > 0 && $notnull_bool($eq(argsCode.last(), 'null'))) {
|
| @@ -14564,7 +14974,7 @@ Arguments.prototype.getNames = function() {
|
| i < this.get$length(); i++) {
|
| names.add$1(this.getName(i));
|
| }
|
| - return (names && names.is$List_String());
|
| + return (names == null ? null : names.assert$List_String());
|
| }
|
| Arguments.prototype.toCallStubArgs = function() {
|
| var result = [];
|
| @@ -14606,7 +15016,7 @@ function Library(baseSource) {
|
| this._privateMembers = $map([]);
|
| }
|
| $inherits(Library, lang_Element);
|
| -Library.prototype.is$Library = function(){return this;};
|
| +Library.prototype.assert$Library = function(){return this};
|
| Library.prototype.get$baseSource = function() { return this.baseSource; };
|
| Library.prototype.get$types = function() { return this.types; };
|
| Library.prototype.set$types = function(value) { return this.types = value; };
|
| @@ -14648,10 +15058,10 @@ Library.prototype.addNative = function(fullname) {
|
| Library.prototype._findMembers = function(name) {
|
| var $0;
|
| if (name.startsWith('_')) {
|
| - return (($0 = this._privateMembers.$index(name)) && $0.is$MemberSet());
|
| + return (($0 = this._privateMembers.$index(name)) == null ? null : $0.assert$MemberSet());
|
| }
|
| else {
|
| - return (($0 = $globals.world._members.$index(name)) && $0.is$MemberSet());
|
| + return (($0 = $globals.world._members.$index(name)) == null ? null : $0.assert$MemberSet());
|
| }
|
| }
|
| Library.prototype._addMember = function(member) {
|
| @@ -14701,13 +15111,13 @@ Library.prototype.addType = function(name, definition, isClass) {
|
| existingType.setDefinition$1(definition);
|
| }
|
| else {
|
| - $globals.world.warning(('duplicate definition of ' + name), definition.span, (($0 = existingType.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.warning(('duplicate definition of ' + name), definition.span, (($0 = existingType.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| else {
|
| - this.types.$setindex(name, new DefinedType(name, this, (definition && definition.is$Definition()), isClass));
|
| + this.types.$setindex(name, new DefinedType(name, this, (definition == null ? null : definition.assert$Definition()), isClass));
|
| }
|
| - return (($0 = this.types.$index(name)) && $0.is$DefinedType());
|
| + return (($0 = this.types.$index(name)) == null ? null : $0.assert$DefinedType());
|
| }
|
| Library.prototype.findType = function(type) {
|
| var result = this.findTypeByName(type.name.name);
|
| @@ -14738,21 +15148,21 @@ Library.prototype.findTypeByName = function(name) {
|
| }
|
| if ($notnull_bool($ne(newRet, null))) {
|
| if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) {
|
| - $globals.world.error(('conflicting types for "' + name + '"'), (($0 = ret.get$span()) && $0.is$SourceSpan()), (($0 = newRet.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('conflicting types for "' + name + '"'), (($0 = ret.get$span()) == null ? null : $0.assert$SourceSpan()), (($0 = newRet.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| ret = newRet;
|
| }
|
| }
|
| }
|
| - return (ret && ret.is$lang_Type());
|
| + return (ret == null ? null : ret.assert$lang_Type());
|
| }
|
| Library.prototype.resolveType = function(node, typeErrors) {
|
| if (node == null) return $globals.world.varType;
|
| if (node.type != null) return node.type;
|
| - node.type = this.findType((node && node.is$NameTypeReference()));
|
| + node.type = this.findType((node == null ? null : node.assert$NameTypeReference()));
|
| if (node.type == null) {
|
| - var message = ('cannot find type ' + Library._getDottedName((node && node.is$NameTypeReference())));
|
| + var message = ('cannot find type ' + Library._getDottedName((node == null ? null : node.assert$NameTypeReference())));
|
| if ($notnull_bool(typeErrors)) {
|
| $globals.world.error($assert_String(message), node.span);
|
| node.type = $globals.world.objectType;
|
| @@ -14770,7 +15180,7 @@ Library._getDottedName = function(type) {
|
| return n.get$name();
|
| })
|
| );
|
| - return type.name.name + '.' + Strings.join((names && names.is$List_String()), '.');
|
| + return type.name.name + '.' + Strings.join((names == null ? null : names.assert$List_String()), '.');
|
| }
|
| else {
|
| return type.name.name;
|
| @@ -14786,7 +15196,7 @@ Library.prototype.lookup = function(name, span) {
|
| var newRet = this.topType.getMember(name);
|
| if ($notnull_bool($ne(newRet, null))) {
|
| if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) {
|
| - $globals.world.error(('conflicting members for "' + name + '"'), span, (($0 = ret.get$span()) && $0.is$SourceSpan()), (($0 = newRet.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('conflicting members for "' + name + '"'), span, (($0 = ret.get$span()) == null ? null : $0.assert$SourceSpan()), (($0 = newRet.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| ret = newRet;
|
| @@ -14799,7 +15209,7 @@ Library.prototype.lookup = function(name, span) {
|
| newRet = imported.get$library().get$topType().getMember$1(name);
|
| if ($notnull_bool($ne(newRet, null))) {
|
| if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) {
|
| - $globals.world.error(('conflicting members for "' + name + '"'), span, (($0 = ret.get$span()) && $0.is$SourceSpan()), (($0 = newRet.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('conflicting members for "' + name + '"'), span, (($0 = ret.get$span()) == null ? null : $0.assert$SourceSpan()), (($0 = newRet.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| ret = newRet;
|
| @@ -14807,7 +15217,7 @@ Library.prototype.lookup = function(name, span) {
|
| }
|
| }
|
| }
|
| - return (ret && ret.is$Member());
|
| + return (ret == null ? null : ret.assert$Member());
|
| }
|
| Library.prototype.resolve = function() {
|
| if (this.name == null) {
|
| @@ -14852,7 +15262,7 @@ function _LibraryVisitor(library) {
|
| this.currentType = this.library.topType;
|
| this.sources = [];
|
| }
|
| -_LibraryVisitor.prototype.is$TreeVisitor = function(){return this;};
|
| +_LibraryVisitor.prototype.assert$TreeVisitor = function(){return this};
|
| _LibraryVisitor.prototype.get$library = function() { return this.library; };
|
| _LibraryVisitor.prototype.get$isTop = function() { return this.isTop; };
|
| _LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = value; };
|
| @@ -14894,7 +15304,7 @@ _LibraryVisitor.prototype.addSource = function(source) {
|
| this.sources = [];
|
| for (var $i = newSources.iterator$0(); $i.hasNext$0(); ) {
|
| var source0 = $i.next$0();
|
| - this.addSource((source0 && source0.is$SourceFile()));
|
| + this.addSource((source0 == null ? null : source0.assert$SourceFile()));
|
| }
|
| }
|
| _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) {
|
| @@ -14989,7 +15399,7 @@ _LibraryVisitor.prototype.getFirstStringArg = function(node) {
|
| if ($notnull_bool($ne(arg.get$label(), null))) {
|
| $globals.world.error('label not allowed for directive', node.span);
|
| }
|
| - return this._parseStringArgument((arg && arg.is$ArgumentNode()));
|
| + return this._parseStringArgument((arg == null ? null : arg.assert$ArgumentNode()));
|
| }
|
| _LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) {
|
| var args = node.arguments.filter((function (a) {
|
| @@ -15004,14 +15414,14 @@ _LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) {
|
| }
|
| for (var $i = args.iterator$0(); $i.hasNext$0(); ) {
|
| var arg = $i.next$0();
|
| - return this._parseStringArgument((arg && arg.is$ArgumentNode()));
|
| + return this._parseStringArgument((arg == null ? null : arg.assert$ArgumentNode()));
|
| }
|
| }
|
| _LibraryVisitor.prototype._parseStringArgument = function(arg) {
|
| var $0;
|
| var expr = arg.value;
|
| if (!(expr instanceof LiteralExpression) || !$notnull_bool(expr.get$type().get$type().get$isString())) {
|
| - $globals.world.error('expected string', (($0 = expr.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('expected string', (($0 = expr.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| return parseStringLiteral($assert_String(expr.get$value()));
|
| }
|
| @@ -15023,7 +15433,7 @@ _LibraryVisitor.prototype.visitTypeDefinition = function(node) {
|
| var member = $list.$index($i);
|
| member.visit$1(this);
|
| }
|
| - this.currentType = (oldType && oldType.is$DefinedType());
|
| + this.currentType = (oldType == null ? null : oldType.assert$DefinedType());
|
| }
|
| _LibraryVisitor.prototype.visitVariableDefinition = function(node) {
|
| this.currentType.addField(node);
|
| @@ -15036,7 +15446,7 @@ _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) {
|
| type.addMethod$2('\$call', node.func);
|
| }
|
| _LibraryVisitor.prototype.addSource$1 = function($0) {
|
| - return this.addSource(($0 && $0.is$SourceFile()));
|
| + return this.addSource(($0 == null ? null : $0.assert$SourceFile()));
|
| };
|
| // ********** Code for Parameter **************
|
| function Parameter(definition, method) {
|
| @@ -15045,7 +15455,7 @@ function Parameter(definition, method) {
|
| this.method = method;
|
| // Initializers done
|
| }
|
| -Parameter.prototype.is$Parameter = function(){return this;};
|
| +Parameter.prototype.assert$Parameter = function(){return this};
|
| Parameter.prototype.get$definition = function() { return this.definition; };
|
| Parameter.prototype.set$definition = function(value) { return this.definition = value; };
|
| Parameter.prototype.get$name = function() { return this.name; };
|
| @@ -15089,7 +15499,7 @@ Parameter.prototype.genValue = function(method, context) {
|
| if (context == null) {
|
| context = new MethodGenerator(method, null);
|
| }
|
| - this.value = (($0 = this.definition.value.visit(context)) && $0.is$Value());
|
| + this.value = (($0 = this.definition.value.visit(context)) == null ? null : $0.assert$Value());
|
| this.value = this.value.convertTo(context, this.type, this.definition.value, false);
|
| }
|
| Parameter.prototype.copyWithNewType = function(newMethod, newType) {
|
| @@ -15098,16 +15508,16 @@ Parameter.prototype.copyWithNewType = function(newMethod, newType) {
|
| ret.set$type(newType);
|
| ret.set$name(this.name);
|
| ret.set$isInitializer(this.isInitializer);
|
| - return (ret && ret.is$Parameter());
|
| + return (ret == null ? null : ret.assert$Parameter());
|
| }
|
| Parameter.prototype.get$isOptional = function() {
|
| return this.definition != null && this.definition.value != null;
|
| }
|
| Parameter.prototype.copyWithNewType$2 = function($0, $1) {
|
| - return this.copyWithNewType(($0 && $0.is$Member()), ($1 && $1.is$lang_Type()));
|
| + return this.copyWithNewType(($0 == null ? null : $0.assert$Member()), ($1 == null ? null : $1.assert$lang_Type()));
|
| };
|
| Parameter.prototype.genValue$2 = function($0, $1) {
|
| - return this.genValue(($0 && $0.is$MethodMember()), ($1 && $1.is$MethodGenerator()));
|
| + return this.genValue(($0 == null ? null : $0.assert$MethodMember()), ($1 == null ? null : $1.assert$MethodGenerator()));
|
| };
|
| Parameter.prototype.resolve$0 = Parameter.prototype.resolve;
|
| // ********** Code for Member **************
|
| @@ -15118,7 +15528,7 @@ function Member(name, declaringType) {
|
| lang_Element.call(this, name, declaringType);
|
| }
|
| $inherits(Member, lang_Element);
|
| -Member.prototype.is$Member = function(){return this;};
|
| +Member.prototype.assert$Member = function(){return this};
|
| Member.prototype.get$declaringType = function() { return this.declaringType; };
|
| Member.prototype.get$generator = function() { return this.generator; };
|
| Member.prototype.set$generator = function(value) { return this.generator = value; };
|
| @@ -15190,7 +15600,7 @@ Member.prototype.get$inferredResult = function() {
|
| if ($notnull_bool(t.get$isBool()) && ($notnull_bool(this.get$library().get$isCore()) || $notnull_bool(this.get$library().get$isCoreImpl()))) {
|
| return $globals.world.nonNullBool;
|
| }
|
| - return (t && t.is$lang_Type());
|
| + return (t == null ? null : t.assert$lang_Type());
|
| }
|
| Member.prototype.get$definition = function() {
|
| return null;
|
| @@ -15204,7 +15614,7 @@ Member.prototype.canInvoke = function(context, args) {
|
| Member.prototype.invoke = function(context, node, target, args, isDynamic) {
|
| var $0;
|
| var newTarget = this._get(context, node, target, isDynamic);
|
| - return (($0 = newTarget.invoke$5(context, '\$call', node, args, isDynamic)) && $0.is$Value());
|
| + return (($0 = newTarget.invoke$5(context, '\$call', node, args, isDynamic)) == null ? null : $0.assert$Value());
|
| }
|
| Member.prototype.override = function(other) {
|
| if ($notnull_bool(this.get$isStatic())) {
|
| @@ -15231,24 +15641,24 @@ Member.prototype.hashCode = function() {
|
| return (this.declaringType.hashCode() << 4) ^ this.name.hashCode();
|
| }
|
| Member.prototype._get$3 = function($0, $1, $2) {
|
| - return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()));
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()));
|
| };
|
| Member.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()));
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()));
|
| };
|
| Member.prototype.canInvoke$2 = function($0, $1) {
|
| - return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
|
| + return this.canInvoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$Arguments()));
|
| };
|
| Member.prototype.computeValue$0 = Member.prototype.computeValue;
|
| Member.prototype.hashCode$0 = Member.prototype.hashCode;
|
| Member.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| Member.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| Member.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax;
|
| Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySyntax;
|
| @@ -15259,7 +15669,7 @@ function TypeMember(type) {
|
| Member.call(this, type.name, type.library.topType);
|
| }
|
| $inherits(TypeMember, Member);
|
| -TypeMember.prototype.is$TypeMember = function(){return this;};
|
| +TypeMember.prototype.assert$TypeMember = function(){return this};
|
| TypeMember.prototype.get$type = function() { return this.type; };
|
| TypeMember.prototype.get$span = function() {
|
| return this.type.definition.span;
|
| @@ -15289,22 +15699,22 @@ TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) {
|
| $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);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| TypeMember.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| TypeMember.prototype.canInvoke$2 = function($0, $1) {
|
| - return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
|
| + return this.canInvoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$Arguments()));
|
| };
|
| TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| TypeMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| TypeMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| // ********** Code for FieldMember **************
|
| function FieldMember(name, declaringType, definition, value) {
|
| @@ -15317,7 +15727,7 @@ function FieldMember(name, declaringType, definition, value) {
|
| Member.call(this, name, declaringType);
|
| }
|
| $inherits(FieldMember, Member);
|
| -FieldMember.prototype.is$FieldMember = function(){return this;};
|
| +FieldMember.prototype.assert$FieldMember = function(){return this};
|
| FieldMember.prototype.get$definition = function() { return this.definition; };
|
| FieldMember.prototype.get$value = function() { return this.value; };
|
| FieldMember.prototype.get$type = function() { return this.type; };
|
| @@ -15352,7 +15762,7 @@ FieldMember.prototype.providePropertySyntax = function() {
|
| }
|
| FieldMember.prototype.get$span = function() {
|
| var $0;
|
| - return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan());
|
| + return (($0 = this.definition == null ? null : this.definition.span) == null ? null : $0.assert$SourceSpan());
|
| }
|
| FieldMember.prototype.get$returnType = function() {
|
| return this.type;
|
| @@ -15376,18 +15786,18 @@ FieldMember.prototype.resolve = function() {
|
| var mod = $list.$index($i);
|
| if ($notnull_bool($eq(mod.get$kind(), 86/*TokenKind.STATIC*/))) {
|
| if ($notnull_bool(this.isStatic)) {
|
| - $globals.world.error('duplicate static modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate static modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.isStatic = true;
|
| }
|
| else if ($notnull_bool($eq(mod.get$kind(), 97/*TokenKind.FINAL*/))) {
|
| if ($notnull_bool(this.isFinal)) {
|
| - $globals.world.error('duplicate final modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate final modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.isFinal = true;
|
| }
|
| else {
|
| - $globals.world.error(('' + mod + ' modifier not allowed on field'), (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('' + mod + ' modifier not allowed on field'), (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| }
|
| @@ -15412,7 +15822,7 @@ FieldMember.prototype.computeValue = function() {
|
| var finalMethod = new MethodMember('final_context', this.declaringType, null);
|
| finalMethod.set$isStatic(true);
|
| var finalGen = new MethodGenerator(finalMethod, null);
|
| - this._computedValue = (($0 = this.value.visit((finalGen && finalGen.is$TreeVisitor()))) && $0.is$Value());
|
| + this._computedValue = (($0 = this.value.visit((finalGen == null ? null : finalGen.assert$TreeVisitor()))) == null ? null : $0.assert$Value());
|
| if (!$notnull_bool(this._computedValue.get$isConst())) {
|
| if ($notnull_bool(this.isStatic)) {
|
| $globals.world.error('non constant static field must be initialized in functions', this.value.span);
|
| @@ -15436,7 +15846,7 @@ FieldMember.prototype._get = function(context, node, target, isDynamic) {
|
| if ($notnull_bool(this.isStatic)) {
|
| var cv = this.computeValue();
|
| if ($notnull_bool(this.isFinal)) {
|
| - return (cv && cv.is$Value());
|
| + return (cv == null ? null : cv.assert$Value());
|
| }
|
| $globals.world.gen.hasStatics = true;
|
| if ($notnull_bool(this.declaringType.get$isTop())) {
|
| @@ -15460,7 +15870,7 @@ FieldMember.prototype._get = function(context, node, target, isDynamic) {
|
| else if ($notnull_bool(target.get$isConst()) && $notnull_bool(this.isFinal)) {
|
| var constTarget = (target instanceof GlobalValue) ? target.get$dynamic().get$exp() : target;
|
| if ((constTarget instanceof ConstObjectValue)) {
|
| - return (($0 = constTarget.get$fields().$index(this.name)) && $0.is$Value());
|
| + return (($0 = constTarget.get$fields().$index(this.name)) == null ? null : $0.assert$Value());
|
| }
|
| else if ($notnull_bool($eq(constTarget.get$type(), $globals.world.stringType)) && this.name == 'length') {
|
| return new Value(this.type, ('' + constTarget.get$actualValue().length), node.span, true);
|
| @@ -15474,10 +15884,10 @@ FieldMember.prototype._set = function(context, node, target, value, isDynamic) {
|
| return new Value(this.type, ('' + lhs.get$code() + ' = ' + value.code), node.span, true);
|
| }
|
| FieldMember.prototype._get$3 = function($0, $1, $2) {
|
| - return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| FieldMember.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue;
|
| FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldSyntax;
|
| @@ -15490,14 +15900,14 @@ function PropertyMember(name, declaringType) {
|
| Member.call(this, name, declaringType);
|
| }
|
| $inherits(PropertyMember, Member);
|
| -PropertyMember.prototype.is$PropertyMember = function(){return this;};
|
| +PropertyMember.prototype.assert$PropertyMember = function(){return this};
|
| PropertyMember.prototype.get$getter = function() { return this.getter; };
|
| PropertyMember.prototype.set$getter = function(value) { return this.getter = value; };
|
| PropertyMember.prototype.get$setter = function() { return this.setter; };
|
| PropertyMember.prototype.set$setter = function(value) { return this.setter = value; };
|
| PropertyMember.prototype.get$span = function() {
|
| var $0;
|
| - return (($0 = this.getter != null ? this.getter.get$span() : null) && $0.is$SourceSpan());
|
| + return (($0 = this.getter != null ? this.getter.get$span() : null) == null ? null : $0.assert$SourceSpan());
|
| }
|
| PropertyMember.prototype.get$canGet = function() {
|
| return this.getter != null;
|
| @@ -15560,11 +15970,11 @@ PropertyMember.prototype.addFromParent = function(parentMember) {
|
| var $0;
|
| var parent;
|
| if ((parentMember instanceof ConcreteMember)) {
|
| - var c = (parentMember && parentMember.is$ConcreteMember());
|
| - parent = (($0 = c.baseMember) && $0.is$PropertyMember());
|
| + var c = (parentMember == null ? null : parentMember.assert$ConcreteMember());
|
| + parent = (($0 = c.baseMember) == null ? null : $0.assert$PropertyMember());
|
| }
|
| else {
|
| - parent = (parentMember && parentMember.is$PropertyMember());
|
| + parent = (parentMember == null ? null : parentMember.assert$PropertyMember());
|
| }
|
| if (this.getter == null) this.getter = parent.getter;
|
| if (this.setter == null) this.setter = parent.setter;
|
| @@ -15575,10 +15985,10 @@ PropertyMember.prototype.resolve = function() {
|
| this.get$library()._addMember(this);
|
| }
|
| PropertyMember.prototype._get$3 = function($0, $1, $2) {
|
| - return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| PropertyMember.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provideFieldSyntax;
|
| PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.providePropertySyntax;
|
| @@ -15603,7 +16013,7 @@ function ConcreteMember(name, declaringType, baseMember) {
|
| }
|
| }
|
| $inherits(ConcreteMember, Member);
|
| -ConcreteMember.prototype.is$ConcreteMember = function(){return this;};
|
| +ConcreteMember.prototype.assert$ConcreteMember = function(){return this};
|
| ConcreteMember.prototype.get$returnType = function() { return this.returnType; };
|
| ConcreteMember.prototype.set$returnType = function(value) { return this.returnType = value; };
|
| ConcreteMember.prototype.get$parameters = function() { return this.parameters; };
|
| @@ -15670,7 +16080,7 @@ ConcreteMember.prototype.get$constructorName = function() {
|
| }
|
| ConcreteMember.prototype.get$definition = function() {
|
| var $0;
|
| - return (($0 = this.baseMember.get$definition()) && $0.is$Definition());
|
| + return (($0 = this.baseMember.get$definition()) == null ? null : $0.assert$Definition());
|
| }
|
| ConcreteMember.prototype.get$initDelegate = function() {
|
| return this.baseMember.get$initDelegate();
|
| @@ -15681,7 +16091,7 @@ ConcreteMember.prototype.set$initDelegate = function(ctor) {
|
| ConcreteMember.prototype.resolveType = function(node, isRequired) {
|
| var $0;
|
| var type = this.baseMember.resolveType(node, isRequired);
|
| - return (($0 = type.resolveTypeParams$1(this.declaringType)) && $0.is$lang_Type());
|
| + return (($0 = type.resolveTypeParams$1(this.declaringType)) == null ? null : $0.assert$lang_Type());
|
| }
|
| ConcreteMember.prototype.computeValue = function() {
|
| return this.baseMember.computeValue();
|
| @@ -15709,23 +16119,23 @@ ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami
|
| return new Value(this.get$inferredResult(), code, node.span, true);
|
| }
|
| ConcreteMember.prototype._get$3 = function($0, $1, $2) {
|
| - return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| ConcreteMember.prototype.canInvoke$2 = function($0, $1) {
|
| - return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
|
| + return this.canInvoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$Arguments()));
|
| };
|
| ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue;
|
| ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| ConcreteMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| ConcreteMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provideFieldSyntax;
|
| ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.providePropertySyntax;
|
| @@ -15744,7 +16154,7 @@ function MethodMember(name, declaringType, definition) {
|
| Member.call(this, name, declaringType);
|
| }
|
| $inherits(MethodMember, Member);
|
| -MethodMember.prototype.is$MethodMember = function(){return this;};
|
| +MethodMember.prototype.assert$MethodMember = function(){return this};
|
| MethodMember.prototype.get$definition = function() { return this.definition; };
|
| MethodMember.prototype.set$definition = function(value) { return this.definition = value; };
|
| MethodMember.prototype.get$returnType = function() { return this.returnType; };
|
| @@ -15782,7 +16192,7 @@ MethodMember.prototype.get$canSet = function() {
|
| }
|
| MethodMember.prototype.get$span = function() {
|
| var $0;
|
| - return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan());
|
| + return (($0 = this.definition == null ? null : this.definition.span) == null ? null : $0.assert$SourceSpan());
|
| }
|
| MethodMember.prototype.get$constructorName = function() {
|
| var returnType = this.definition.returnType;
|
| @@ -15999,9 +16409,9 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
|
| }
|
| $globals.world.internalError(('wrong named arguments calling ' + this.name), node.span);
|
| }
|
| - Arguments.removeTrailingNulls((argsCode && argsCode.is$List_Value()));
|
| + Arguments.removeTrailingNulls((argsCode == null ? null : argsCode.assert$List_Value()));
|
| }
|
| - var argsString = Strings.join((argsCode && argsCode.is$List_String()), ', ');
|
| + var argsString = Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ', ');
|
| if ($notnull_bool(this.get$isConstructor())) {
|
| return this._invokeConstructor(context, node, target, args, argsString);
|
| }
|
| @@ -16024,7 +16434,7 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
|
| var code = ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')');
|
| if ($notnull_bool(target.get$isConst())) {
|
| if ((target instanceof GlobalValue)) {
|
| - target = (($0 = target.get$dynamic().get$exp()) && $0.is$Value());
|
| + target = (($0 = target.get$dynamic().get$exp()) == null ? null : $0.assert$Value());
|
| }
|
| if (this.name == 'get\$length') {
|
| if ((target instanceof ConstListValue) || (target instanceof ConstMapValue)) {
|
| @@ -16038,7 +16448,7 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic)
|
| }
|
| }
|
| if (this.name == 'get\$typeName' && $eq(this.declaringType.get$library(), $globals.world.get$dom())) {
|
| - $globals.world.gen.corejs.useTypeNameOf = true;
|
| + $globals.world.gen.corejs.ensureTypeNameOf();
|
| }
|
| return new Value(this.get$inferredResult(), code, node.span, true);
|
| }
|
| @@ -16099,10 +16509,10 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var init = $list.$index($i);
|
| if ((init instanceof CallExpression)) {
|
| - var delegateArgs = this.generator._makeArgs((($0 = init.get$arguments()) && $0.is$List_ArgumentNode()));
|
| - var value = this.initDelegate.invoke(this.generator, node, target, (delegateArgs && delegateArgs.is$Arguments()), false);
|
| + var delegateArgs = this.generator._makeArgs((($0 = init.get$arguments()) == null ? null : $0.assert$List_ArgumentNode()));
|
| + var value = this.initDelegate.invoke(this.generator, node, target, (delegateArgs == null ? null : delegateArgs.assert$Arguments()), false);
|
| if ((init.get$target() instanceof ThisExpression)) {
|
| - return (value && value.is$Value());
|
| + return (value == null ? null : value.assert$Value());
|
| }
|
| else {
|
| if ((value instanceof GlobalValue)) {
|
| @@ -16116,7 +16526,7 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar
|
| }
|
| }
|
| else {
|
| - var assign = (init && init.is$BinaryExpression());
|
| + var assign = (init == null ? null : init.assert$BinaryExpression());
|
| var x = assign.x;
|
| var fname = x.get$name().get$name();
|
| var val = this.generator.visitValue(assign.y);
|
| @@ -16279,7 +16689,7 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar
|
| }
|
| else if (this.name == '\$add') {
|
| if ($notnull_bool(allConst)) {
|
| - var value = this._normConcat(target, (($0 = args.values.$index(0)) && $0.is$Value()));
|
| + var value = this._normConcat(target, (($0 = args.values.$index(0)) == null ? null : $0.assert$Value()));
|
| return EvaluatedValue.EvaluatedValue$factory($globals.world.stringType, value, value, node.span);
|
| }
|
| return new Value(this.declaringType, ('' + target.code + ' + ' + argsCode.$index(0)), node.span, true);
|
| @@ -16315,7 +16725,7 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar
|
| }
|
| if ($notnull_bool(this.get$isCallMethod())) {
|
| this.declaringType.markUsed();
|
| - return new Value(this.get$inferredResult(), ('' + target.code + '(' + Strings.join((argsCode && argsCode.is$List_String()), ", ") + ')'), node.span, true);
|
| + return new Value(this.get$inferredResult(), ('' + target.code + '(' + Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ", ") + ')'), node.span, true);
|
| }
|
| if (this.name == '\$index') {
|
| $globals.world.gen.corejs.useIndex = true;
|
| @@ -16323,7 +16733,7 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar
|
| else if (this.name == '\$setindex') {
|
| $globals.world.gen.corejs.useSetIndex = true;
|
| }
|
| - var argsString = Strings.join((argsCode && argsCode.is$List_String()), ', ');
|
| + var argsString = Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ', ');
|
| return new Value(this.get$inferredResult(), ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true);
|
| }
|
| MethodMember.prototype._normConcat = function(a, b) {
|
| @@ -16363,35 +16773,35 @@ MethodMember.prototype.resolve = function() {
|
| var mod = $list.$index($i);
|
| if ($notnull_bool($eq(mod.get$kind(), 86/*TokenKind.STATIC*/))) {
|
| if ($notnull_bool(this.isStatic)) {
|
| - $globals.world.error('duplicate static modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate static modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.isStatic = true;
|
| }
|
| else if ($notnull_bool(this.get$isConstructor()) && $notnull_bool($eq(mod.get$kind(), 91/*TokenKind.CONST*/))) {
|
| if ($notnull_bool(this.isConst)) {
|
| - $globals.world.error('duplicate const modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate const modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.isConst = true;
|
| }
|
| else if ($notnull_bool($eq(mod.get$kind(), 75/*TokenKind.FACTORY*/))) {
|
| if ($notnull_bool(this.isFactory)) {
|
| - $globals.world.error('duplicate factory modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate factory modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.isFactory = true;
|
| }
|
| else if ($notnull_bool($eq(mod.get$kind(), 71/*TokenKind.ABSTRACT*/))) {
|
| if ($notnull_bool(this.isAbstract)) {
|
| if ($notnull_bool(this.declaringType.get$isClass())) {
|
| - $globals.world.error('duplicate abstract modifier', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('duplicate abstract modifier', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| - $globals.world.error('abstract modifier not allowed on interface members', (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('abstract modifier not allowed on interface members', (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| this.isAbstract = true;
|
| }
|
| else {
|
| - $globals.world.error(('' + mod + ' modifier not allowed on method'), (($0 = mod.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('' + mod + ' modifier not allowed on method'), (($0 = mod.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| }
|
| @@ -16400,7 +16810,7 @@ MethodMember.prototype.resolve = function() {
|
| }
|
| if (this.definition.typeParameters != null) {
|
| if (!$notnull_bool(this.isFactory)) {
|
| - $globals.world.error('Only factories are allowed to have explicit type parameters', (($0 = this.definition.typeParameters.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('Only factories are allowed to have explicit type parameters', (($0 = this.definition.typeParameters.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| this.typeParameters = this.definition.typeParameters;
|
| @@ -16447,25 +16857,25 @@ MethodMember.prototype.resolve = function() {
|
| }
|
| }
|
| 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);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| MethodMember.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| MethodMember.prototype.canInvoke$2 = function($0, $1) {
|
| - return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
|
| + return this.canInvoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$Arguments()));
|
| };
|
| MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| MethodMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| MethodMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| MethodMember.prototype.namesInOrder$1 = function($0) {
|
| - return this.namesInOrder(($0 && $0.is$Arguments()));
|
| + return this.namesInOrder(($0 == null ? null : $0.assert$Arguments()));
|
| };
|
| MethodMember.prototype.provideFieldSyntax$0 = MethodMember.prototype.provideFieldSyntax;
|
| MethodMember.prototype.providePropertySyntax$0 = MethodMember.prototype.providePropertySyntax;
|
| @@ -16478,7 +16888,7 @@ function MemberSet(member, isVar) {
|
| this.isVar = isVar;
|
| // Initializers done
|
| }
|
| -MemberSet.prototype.is$MemberSet = function(){return this;};
|
| +MemberSet.prototype.assert$MemberSet = function(){return this};
|
| MemberSet.prototype.get$name = function() { return this.name; };
|
| MemberSet.prototype.get$members = function() { return this.members; };
|
| MemberSet.prototype.get$jsname = function() { return this.jsname; };
|
| @@ -16551,7 +16961,7 @@ MemberSet.prototype._get = function(context, node, target, isDynamic) {
|
| return m._get(context, node, target, true);
|
| })
|
| );
|
| - returnValue = new Value(this._foldTypes((targets && targets.is$List_Member())), null, node.span, true);
|
| + returnValue = new Value(this._foldTypes((targets == null ? null : targets.assert$List_Member())), null, node.span, true);
|
| }
|
| else {
|
| if (this.members.length == 1) {
|
| @@ -16590,7 +17000,7 @@ MemberSet.prototype._set = function(context, node, target, value, isDynamic) {
|
| return m._set(context, node, target, value, true);
|
| })
|
| );
|
| - returnValue = new Value(this._foldTypes((targets && targets.is$List_Member())), null, node.span, true);
|
| + returnValue = new Value(this._foldTypes((targets == null ? null : targets.assert$List_Member())), null, node.span, true);
|
| }
|
| else {
|
| if (this.members.length == 1) {
|
| @@ -16624,20 +17034,20 @@ MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) {
|
| return this.invokeOnVar(context, node, target, args);
|
| }
|
| if (this.members.length == 1) {
|
| - return (($0 = this.members.$index(0).invoke$5(context, node, target, args, isDynamic)) && $0.is$Value());
|
| + return (($0 = this.members.$index(0).invoke$5(context, node, target, args, isDynamic)) == null ? null : $0.assert$Value());
|
| }
|
| var targets = this.members.filter((function (m) {
|
| return m.canInvoke$2(context, args);
|
| })
|
| );
|
| if ($notnull_bool($eq(targets.length, 1))) {
|
| - return (($0 = targets.$index(0).invoke$5(context, node, target, args, isDynamic)) && $0.is$Value());
|
| + return (($0 = targets.$index(0).invoke$5(context, node, target, args, isDynamic)) == null ? null : $0.assert$Value());
|
| }
|
| var returnValue = null;
|
| for (var $i = targets.iterator$0(); $i.hasNext$0(); ) {
|
| var member = $i.next$0();
|
| var res = member.invoke$4$isDynamic(context, node, target, args, true);
|
| - returnValue = this._tryUnion(returnValue, (res && res.is$Value()), node);
|
| + returnValue = this._tryUnion(returnValue, (res == null ? null : res.assert$Value()), node);
|
| }
|
| if (returnValue == null) {
|
| return this._makeError(node, target, 'method');
|
| @@ -16658,7 +17068,7 @@ MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) {
|
| MemberSet.prototype.invokeOnVar = function(context, node, target, args) {
|
| var $0;
|
| var member = this.getVarMember(context, node, args);
|
| - return (($0 = member.invoke$4(context, node, target, args)) && $0.is$Value());
|
| + return (($0 = member.invoke$4(context, node, target, args)) == null ? null : $0.assert$Value());
|
| }
|
| MemberSet.prototype._tryUnion = function(x, y, node) {
|
| if (x == null) return y;
|
| @@ -16675,7 +17085,7 @@ MemberSet.prototype._tryUnion = function(x, y, node) {
|
| ret.set$isSuper($notnull_bool(x.isSuper) && $notnull_bool(y.isSuper));
|
| ret.set$needsTemp($notnull_bool(x.needsTemp) || $notnull_bool(y.needsTemp));
|
| ret.set$isType($notnull_bool(x.isType) && $notnull_bool(y.isType));
|
| - return (ret && ret.is$Value());
|
| + return (ret == null ? null : ret.assert$Value());
|
| }
|
| }
|
| else {
|
| @@ -16694,38 +17104,38 @@ MemberSet.prototype.getVarMember = function(context, node, args) {
|
| return m.canInvoke$2(context, args);
|
| })
|
| );
|
| - stub = new VarMethodSet($assert_String(stubName), targets, args, this._foldTypes((targets && targets.is$List_Member())));
|
| + stub = new VarMethodSet($assert_String(stubName), targets, args, this._foldTypes((targets == null ? null : targets.assert$List_Member())));
|
| $globals.world.objectType.varStubs.$setindex(stubName, stub);
|
| }
|
| - return (stub && stub.is$VarMember());
|
| + return (stub == null ? null : stub.assert$VarMember());
|
| }
|
| MemberSet.prototype._foldTypes = function(targets) {
|
| var $0;
|
| return (($0 = reduce(map(targets, (function (t) {
|
| return t.get$returnType();
|
| })
|
| - ), lang_Type.union, $globals.world.varType)) && $0.is$lang_Type());
|
| + ), lang_Type.union, $globals.world.varType)) == null ? null : $0.assert$lang_Type());
|
| }
|
| MemberSet.prototype._get$3 = function($0, $1, $2) {
|
| - return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false);
|
| + return this._get(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), false);
|
| };
|
| MemberSet.prototype._set$4 = function($0, $1, $2, $3) {
|
| - return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false);
|
| + return this._set(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| MemberSet.prototype.add$1 = function($0) {
|
| - return this.add(($0 && $0.is$Member()));
|
| + return this.add(($0 == null ? null : $0.assert$Member()));
|
| };
|
| MemberSet.prototype.canInvoke$2 = function($0, $1) {
|
| - return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments()));
|
| + return this.canInvoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$Arguments()));
|
| };
|
| MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| MemberSet.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| MemberSet.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| MemberSet.prototype.toString$0 = MemberSet.prototype.toString;
|
| // ********** Code for FactoryMap **************
|
| @@ -16739,14 +17149,14 @@ FactoryMap.prototype.getFactoriesFor = function(typeName) {
|
| ret = $map([]);
|
| this.factories.$setindex(typeName, ret);
|
| }
|
| - return (ret && ret.is$Map_String$Member());
|
| + return (ret == null ? null : ret.assert$Map_String$Member());
|
| }
|
| FactoryMap.prototype.addFactory = function(typeName, name, member) {
|
| this.getFactoriesFor(typeName).$setindex(name, member);
|
| }
|
| FactoryMap.prototype.getFactory = function(typeName, name) {
|
| var $0;
|
| - return (($0 = this.getFactoriesFor(typeName).$index(name)) && $0.is$Member());
|
| + return (($0 = this.getFactoriesFor(typeName).$index(name)) == null ? null : $0.assert$Member());
|
| }
|
| FactoryMap.prototype.forEach = function(f) {
|
| this.factories.forEach((function (_, constructors) {
|
| @@ -16771,7 +17181,7 @@ function lang_Token(kind, source, start, end) {
|
| this.end = end;
|
| // Initializers done
|
| }
|
| -lang_Token.prototype.is$lang_Token = function(){return this;};
|
| +lang_Token.prototype.assert$lang_Token = function(){return this};
|
| lang_Token.prototype.get$kind = function() { return this.kind; };
|
| lang_Token.prototype.get$source = function() { return this.source; };
|
| lang_Token.prototype.get$end = function() { return this.end; };
|
| @@ -16802,8 +17212,8 @@ function SourceFile(filename, _text) {
|
| this._text = _text;
|
| // Initializers done
|
| }
|
| -SourceFile.prototype.is$SourceFile = function(){return this;};
|
| -SourceFile.prototype.is$Comparable = function(){return this;};
|
| +SourceFile.prototype.assert$SourceFile = function(){return this};
|
| +SourceFile.prototype.assert$Comparable = function(){return this};
|
| SourceFile.prototype.get$filename = function() { return this.filename; };
|
| SourceFile.prototype.get$orderInLibrary = function() { return this.orderInLibrary; };
|
| SourceFile.prototype.set$orderInLibrary = function(value) { return this.orderInLibrary = value; };
|
| @@ -16820,7 +17230,7 @@ SourceFile.prototype.get$lineStarts = function() {
|
| starts.add$1(index);
|
| }
|
| starts.add$1(this.get$text().length + 1);
|
| - this._lineStarts = (starts && starts.is$List_int());
|
| + this._lineStarts = (starts == null ? null : starts.assert$List_int());
|
| }
|
| return this._lineStarts;
|
| }
|
| @@ -16869,7 +17279,7 @@ SourceFile.prototype.compareTo = function(other) {
|
| }
|
| }
|
| SourceFile.prototype.compareTo$1 = function($0) {
|
| - return this.compareTo(($0 && $0.is$SourceFile()));
|
| + return this.compareTo(($0 == null ? null : $0.assert$SourceFile()));
|
| };
|
| SourceFile.prototype.getColumn$2 = function($0, $1) {
|
| return this.getColumn($assert_num($0), $assert_num($1));
|
| @@ -16887,8 +17297,8 @@ function SourceSpan(file, start, end) {
|
| this.end = end;
|
| // Initializers done
|
| }
|
| -SourceSpan.prototype.is$SourceSpan = function(){return this;};
|
| -SourceSpan.prototype.is$Comparable = function(){return this;};
|
| +SourceSpan.prototype.assert$SourceSpan = function(){return this};
|
| +SourceSpan.prototype.assert$Comparable = function(){return this};
|
| SourceSpan.prototype.get$file = function() { return this.file; };
|
| SourceSpan.prototype.get$start = function() { return this.start; };
|
| SourceSpan.prototype.get$end = function() { return this.end; };
|
| @@ -16911,7 +17321,7 @@ SourceSpan.prototype.compareTo = function(other) {
|
| return this.file.compareTo(other.file);
|
| }
|
| SourceSpan.prototype.compareTo$1 = function($0) {
|
| - return this.compareTo(($0 && $0.is$SourceSpan()));
|
| + return this.compareTo(($0 == null ? null : $0.assert$SourceSpan()));
|
| };
|
| SourceSpan.prototype.toMessageString$1 = function($0) {
|
| return this.toMessageString($assert_String($0));
|
| @@ -16924,7 +17334,7 @@ function InterpStack(previous, quote, isMultiline) {
|
| this.depth = -1;
|
| // Initializers done
|
| }
|
| -InterpStack.prototype.is$InterpStack = function(){return this;};
|
| +InterpStack.prototype.assert$InterpStack = function(){return this};
|
| InterpStack.prototype.get$previous = function() { return this.previous; };
|
| InterpStack.prototype.set$previous = function(value) { return this.previous = value; };
|
| InterpStack.prototype.get$quote = function() { return this.quote; };
|
| @@ -16937,7 +17347,7 @@ InterpStack.prototype.pop = function() {
|
| InterpStack.push = function(stack, quote, isMultiline) {
|
| var newStack = new InterpStack(stack, quote, isMultiline);
|
| if (stack != null) newStack.set$previous(stack);
|
| - return (newStack && newStack.is$InterpStack());
|
| + return (newStack == null ? null : newStack.assert$InterpStack());
|
| }
|
| InterpStack.prototype.next$0 = function() {
|
| return this.next();
|
| @@ -18656,7 +19066,7 @@ function lang_Parser(source, diet, throwOnIncomplete, optionalSemicolons, startO
|
| this.optionalSemicolons = optionalSemicolons;
|
| // Initializers done
|
| this.tokenizer = new Tokenizer(this.source, true, startOffset);
|
| - this._peekToken = (($0 = this.tokenizer.next()) && $0.is$lang_Token());
|
| + this._peekToken = (($0 = this.tokenizer.next()) == null ? null : $0.assert$lang_Token());
|
| this._previousToken = null;
|
| this._inInitializers = false;
|
| this._afterParens = [];
|
| @@ -18680,7 +19090,7 @@ lang_Parser.prototype._peek = function() {
|
| lang_Parser.prototype._lang_next = function() {
|
| var $0;
|
| this._previousToken = this._peekToken;
|
| - this._peekToken = (($0 = this.tokenizer.next()) && $0.is$lang_Token());
|
| + this._peekToken = (($0 = this.tokenizer.next()) == null ? null : $0.assert$lang_Token());
|
| return this._previousToken;
|
| }
|
| lang_Parser.prototype._peekKind = function(kind) {
|
| @@ -18693,7 +19103,7 @@ lang_Parser.prototype._maybeEat = function(kind) {
|
| var $0;
|
| if (this._peekToken.kind == kind) {
|
| this._previousToken = this._peekToken;
|
| - this._peekToken = (($0 = this.tokenizer.next()) && $0.is$lang_Token());
|
| + this._peekToken = (($0 = this.tokenizer.next()) == null ? null : $0.assert$lang_Token());
|
| return true;
|
| }
|
| else {
|
| @@ -18714,7 +19124,7 @@ lang_Parser.prototype._errorExpected = function(expected) {
|
| if ($notnull_bool(this.throwOnIncomplete)) this.isPrematureEndOfFile();
|
| var tok = this._lang_next();
|
| var message = ('expected ' + expected + ', but found ' + tok);
|
| - this._lang_error($assert_String(message), (($0 = tok.get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error($assert_String(message), (($0 = tok.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| lang_Parser.prototype._lang_error = function(message, location) {
|
| if (location == null) {
|
| @@ -18736,7 +19146,7 @@ lang_Parser.prototype._skipBlock = function() {
|
| if (depth == 0) return;
|
| }
|
| else if ($notnull_bool($eq(tok.get$kind(), 1/*TokenKind.END_OF_FILE*/))) {
|
| - this._lang_error('unexpected end of file during diet parse', (($0 = tok.get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error('unexpected end of file during diet parse', (($0 = tok.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| return;
|
| }
|
| }
|
| @@ -18753,7 +19163,7 @@ lang_Parser.prototype.compilationUnit = function() {
|
| while (!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) {
|
| ret.add$1(this.topLevelDefinition());
|
| }
|
| - return (ret && ret.is$List_Definition());
|
| + return (ret == null ? null : ret.assert$List_Definition());
|
| }
|
| lang_Parser.prototype.directive = function() {
|
| var start = this._peekToken.start;
|
| @@ -18933,7 +19343,7 @@ lang_Parser.prototype.declaration = function(includeOperators) {
|
| return this.factoryConstructorDeclaration();
|
| }
|
| var modifiers = this._readModifiers();
|
| - return this.finishDefinition(start, (modifiers && modifiers.is$List_Token()), this.declaredIdentifier(includeOperators), null);
|
| + return this.finishDefinition(start, (modifiers == null ? null : modifiers.assert$List_Token()), this.declaredIdentifier(includeOperators), null);
|
| }
|
| lang_Parser.prototype.factoryConstructorDeclaration = function() {
|
| var $0;
|
| @@ -18957,41 +19367,41 @@ lang_Parser.prototype.factoryConstructorDeclaration = function() {
|
| name = names.removeLast$0();
|
| }
|
| else {
|
| - name = new lang_Identifier('', (($0 = names.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + name = new lang_Identifier('', (($0 = names.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| else {
|
| - name = new lang_Identifier('', (($0 = names.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + name = new lang_Identifier('', (($0 = names.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| if (names.length > 1) {
|
| - this._lang_error('unsupported qualified name for factory', (($0 = names.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error('unsupported qualified name for factory', (($0 = names.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| - type = new NameTypeReference(false, names.$index(0), null, (($0 = names.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + type = new NameTypeReference(false, names.$index(0), null, (($0 = names.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| var di = new DeclaredIdentifier(type, name, this._makeSpan(start));
|
| - return this.finishDefinition(start, [factoryToken], di, (typeParams && typeParams.is$List_ParameterType()));
|
| + return this.finishDefinition(start, [factoryToken], di, (typeParams == null ? null : typeParams.assert$List_ParameterType()));
|
| }
|
| lang_Parser.prototype.statement = function() {
|
| var $0;
|
| switch (this._peek()) {
|
| case 88/*TokenKind.BREAK*/:
|
|
|
| - return (($0 = this.breakStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.breakStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 92/*TokenKind.CONTINUE*/:
|
|
|
| - return (($0 = this.continueStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.continueStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 105/*TokenKind.RETURN*/:
|
|
|
| - return (($0 = this.returnStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.returnStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 109/*TokenKind.THROW*/:
|
|
|
| - return (($0 = this.throwStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.throwStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 72/*TokenKind.ASSERT*/:
|
|
|
| - return (($0 = this.assertStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.assertStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 114/*TokenKind.WHILE*/:
|
|
|
| @@ -19003,7 +19413,7 @@ lang_Parser.prototype.statement = function() {
|
|
|
| case 99/*TokenKind.FOR*/:
|
|
|
| - return (($0 = this.forStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.forStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 100/*TokenKind.IF*/:
|
|
|
| @@ -19011,11 +19421,11 @@ lang_Parser.prototype.statement = function() {
|
|
|
| case 107/*TokenKind.SWITCH*/:
|
|
|
| - return (($0 = this.switchStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.switchStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 111/*TokenKind.TRY*/:
|
|
|
| - return (($0 = this.tryStatement()) && $0.is$lang_Statement());
|
| + return (($0 = this.tryStatement()) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 6/*TokenKind.LBRACE*/:
|
|
|
| @@ -19027,15 +19437,15 @@ lang_Parser.prototype.statement = function() {
|
|
|
| case 97/*TokenKind.FINAL*/:
|
|
|
| - return (($0 = this.declaration(false)) && $0.is$lang_Statement());
|
| + return (($0 = this.declaration(false)) == null ? null : $0.assert$lang_Statement());
|
|
|
| case 112/*TokenKind.VAR*/:
|
|
|
| - return (($0 = this.declaration(false)) && $0.is$lang_Statement());
|
| + return (($0 = this.declaration(false)) == null ? null : $0.assert$lang_Statement());
|
|
|
| default:
|
|
|
| - return (($0 = this.finishExpressionAsStatement(this.expression())) && $0.is$lang_Statement());
|
| + return (($0 = this.finishExpressionAsStatement(this.expression())) == null ? null : $0.assert$lang_Statement());
|
|
|
| }
|
| }
|
| @@ -19061,13 +19471,13 @@ lang_Parser.prototype.finishExpressionAsStatement = function(expr) {
|
| return this.finishField(start, null, null, expr.get$type(), expr.get$name(), value);
|
| }
|
| else if ($notnull_bool(this._isBin(expr, 20/*TokenKind.ASSIGN*/)) && ((expr.get$x() instanceof DeclaredIdentifier))) {
|
| - var di = (($0 = expr.get$x()) && $0.is$DeclaredIdentifier());
|
| + var di = (($0 = expr.get$x()) == null ? null : $0.assert$DeclaredIdentifier());
|
| return this.finishField(start, null, null, di.type, di.name, expr.get$y());
|
| }
|
| else if ($notnull_bool(this._isBin(expr, 52/*TokenKind.LT*/)) && $notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) {
|
| var baseType = this._makeType(expr.get$x());
|
| var typeArgs = [this._makeType(expr.get$y())];
|
| - var gt = this._finishTypeArguments((baseType && baseType.is$TypeReference()), 0, typeArgs);
|
| + var gt = this._finishTypeArguments((baseType == null ? null : baseType.assert$TypeReference()), 0, typeArgs);
|
| var name = this.identifier();
|
| var value = null;
|
| if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) {
|
| @@ -19084,7 +19494,7 @@ lang_Parser.prototype.testCondition = function() {
|
| this._eatLeftParen();
|
| var ret = this.expression();
|
| this._eat(3/*TokenKind.RPAREN*/);
|
| - return (ret && ret.is$lang_Expression());
|
| + return (ret == null ? null : ret.assert$lang_Expression());
|
| }
|
| lang_Parser.prototype.block = function() {
|
| var start = this._peekToken.start;
|
| @@ -19163,12 +19573,12 @@ lang_Parser.prototype.forInitializerStatement = function(start) {
|
| this._eat(11/*TokenKind.COMMA*/);
|
| var baseType = this._makeType(init.get$x());
|
| var typeArgs = [this._makeType(init.get$y())];
|
| - var gt = this._finishTypeArguments((baseType && baseType.is$TypeReference()), 0, typeArgs);
|
| + var gt = this._finishTypeArguments((baseType == null ? null : baseType.assert$TypeReference()), 0, typeArgs);
|
| var name = this.identifier();
|
| init = new DeclaredIdentifier(gt, name, this._makeSpan($assert_num(init.get$span().get$start())));
|
| }
|
| if ($notnull_bool(this._maybeEat(101/*TokenKind.IN*/))) {
|
| - return this._finishForIn(start, (($0 = this._makeDeclaredIdentifier(init)) && $0.is$DeclaredIdentifier()));
|
| + return this._finishForIn(start, (($0 = this._makeDeclaredIdentifier(init)) == null ? null : $0.assert$DeclaredIdentifier()));
|
| }
|
| else {
|
| return this.finishExpressionAsStatement(init);
|
| @@ -19315,7 +19725,7 @@ lang_Parser.prototype.expression = function() {
|
| lang_Parser.prototype._makeType = function(expr) {
|
| var $0;
|
| if ((expr instanceof VarExpression)) {
|
| - return new NameTypeReference(false, expr.get$name(), null, (($0 = expr.get$span()) && $0.is$SourceSpan()));
|
| + return new NameTypeReference(false, expr.get$name(), null, (($0 = expr.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else if ((expr instanceof DotExpression)) {
|
| var type = this._makeType(expr.get$self());
|
| @@ -19335,7 +19745,7 @@ lang_Parser.prototype._makeType = function(expr) {
|
| }
|
| lang_Parser.prototype.infixExpression = function(precedence) {
|
| var $0;
|
| - return this.finishInfixExpression((($0 = this.unaryExpression()) && $0.is$lang_Expression()), precedence);
|
| + return this.finishInfixExpression((($0 = this.unaryExpression()) == null ? null : $0.assert$lang_Expression()), precedence);
|
| }
|
| lang_Parser.prototype._finishDeclaredId = function(type) {
|
| var name = this.identifier();
|
| @@ -19353,13 +19763,13 @@ lang_Parser.prototype._fixAsType = function(x) {
|
| $assert(this._peekKind(52/*TokenKind.LT*/), "_peekKind(TokenKind.LT)", "parser.dart", 810, 14);
|
| var base = this._makeType(x.x);
|
| var paramBase = this._makeType(x.y);
|
| - var firstParam = this.addTypeArguments((paramBase && paramBase.is$TypeReference()), 1);
|
| + var firstParam = this.addTypeArguments((paramBase == null ? null : paramBase.assert$TypeReference()), 1);
|
| var type;
|
| if (firstParam.get$depth() <= 0) {
|
| type = new GenericTypeReference(base, [firstParam], 0, this._makeSpan(x.span.start));
|
| }
|
| else if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) {
|
| - type = this._finishTypeArguments((base && base.is$TypeReference()), 0, [firstParam]);
|
| + type = this._finishTypeArguments((base == null ? null : base.assert$TypeReference()), 0, [firstParam]);
|
| }
|
| else {
|
| this._eat(53/*TokenKind.GT*/);
|
| @@ -19375,7 +19785,7 @@ lang_Parser.prototype.finishInfixExpression = function(x, precedence) {
|
| if (prec >= precedence) {
|
| if (kind == 52/*TokenKind.LT*/ || kind == 53/*TokenKind.GT*/) {
|
| if ($notnull_bool(this._isBin(x, 52/*TokenKind.LT*/))) {
|
| - return this._fixAsType((x && x.is$BinaryExpression()));
|
| + return this._fixAsType((x == null ? null : x.assert$BinaryExpression()));
|
| }
|
| }
|
| var op = this._lang_next();
|
| @@ -19507,7 +19917,7 @@ lang_Parser.prototype.finishCallOrLambdaExpression = function(expr) {
|
| }
|
| else {
|
| if ((expr instanceof DeclaredIdentifier)) {
|
| - this._lang_error('illegal target for call, did you mean to declare a function?', (($0 = expr.get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error('illegal target for call, did you mean to declare a function?', (($0 = expr.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| var args = this.arguments();
|
| return this.finishPostfixExpression(new CallExpression(expr, args, this._makeSpan($assert_num(expr.get$span().get$start()))));
|
| @@ -19653,7 +20063,7 @@ lang_Parser.prototype.stringInterpolation = function() {
|
| else {
|
| text = $add($add(startQuote, text.substring$2(0, text.length - 1)), endQuote);
|
| }
|
| - lits.add$1(this.makeStringLiteral($assert_String(text), (($0 = token.get$span()) && $0.is$SourceSpan())));
|
| + lits.add$1(this.makeStringLiteral($assert_String(text), (($0 = token.get$span()) == null ? null : $0.assert$SourceSpan())));
|
| if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) {
|
| lits.add$1(this.expression());
|
| this._eat(7/*TokenKind.RBRACE*/);
|
| @@ -19663,7 +20073,7 @@ lang_Parser.prototype.stringInterpolation = function() {
|
| }
|
| else {
|
| var id = this.identifier();
|
| - lits.add$1(new VarExpression(id, (($0 = id.get$span()) && $0.is$SourceSpan())));
|
| + lits.add$1(new VarExpression(id, (($0 = id.get$span()) == null ? null : $0.assert$SourceSpan())));
|
| }
|
| }
|
| var tok = this._lang_next();
|
| @@ -19671,9 +20081,9 @@ lang_Parser.prototype.stringInterpolation = function() {
|
| this._errorExpected('interpolated string');
|
| }
|
| var text = $add(startQuote, tok.get$text());
|
| - lits.add$1(this.makeStringLiteral($assert_String(text), (($0 = tok.get$span()) && $0.is$SourceSpan())));
|
| + lits.add$1(this.makeStringLiteral($assert_String(text), (($0 = tok.get$span()) == null ? null : $0.assert$SourceSpan())));
|
| var span = this._makeSpan(start);
|
| - return new LiteralExpression(lits, this._stringTypeRef((span && span.is$SourceSpan())), '\$\$\$', (span && span.is$SourceSpan()));
|
| + return new LiteralExpression(lits, this._stringTypeRef((span == null ? null : span.assert$SourceSpan())), '\$\$\$', (span == null ? null : span.assert$SourceSpan()));
|
| }
|
| lang_Parser.prototype.makeStringLiteral = function(text, span) {
|
| return new LiteralExpression(text, this._stringTypeRef(span), text, span);
|
| @@ -19681,7 +20091,7 @@ lang_Parser.prototype.makeStringLiteral = function(text, span) {
|
| lang_Parser.prototype.stringLiteralExpr = function() {
|
| var $0;
|
| var token = this._lang_next();
|
| - return this.makeStringLiteral($assert_String(token.get$text()), (($0 = token.get$span()) && $0.is$SourceSpan()));
|
| + return this.makeStringLiteral($assert_String(token.get$text()), (($0 = token.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| lang_Parser.prototype.maybeStringLiteral = function() {
|
| var kind = this._peek();
|
| @@ -19705,7 +20115,7 @@ lang_Parser.prototype._parenOrLambda = function() {
|
| var formals = this.formalParameterList();
|
| var body = this.functionBody(true);
|
| var func = new FunctionDefinition(null, null, null, formals, null, null, null, body, this._makeSpan(start));
|
| - return new LambdaExpression(func, (($0 = func.get$span()) && $0.is$SourceSpan()));
|
| + return new LambdaExpression(func, (($0 = func.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else {
|
| var saved = this._inInitializers;
|
| @@ -19733,17 +20143,17 @@ lang_Parser.prototype._eatLeftParen = function() {
|
| lang_Parser.prototype._peekAfterCloseParen = function() {
|
| var $0;
|
| if (this._afterParensIndex < this._afterParens.length) {
|
| - return (($0 = this._afterParens.$index(this._afterParensIndex)) && $0.is$lang_Token());
|
| + return (($0 = this._afterParens.$index(this._afterParensIndex)) == null ? null : $0.assert$lang_Token());
|
| }
|
| this._afterParensIndex = 0;
|
| this._afterParens.clear();
|
| var tokens = [this._lang_next()];
|
| - this._lookaheadAfterParens((tokens && tokens.is$List_Token()));
|
| + this._lookaheadAfterParens((tokens == null ? null : tokens.assert$List_Token()));
|
| var after = this._peekToken;
|
| tokens.add$1(after);
|
| this.tokenizer = new DivertedTokenSource(tokens, this, this.tokenizer);
|
| this._lang_next();
|
| - return (after && after.is$lang_Token());
|
| + return (after == null ? null : after.assert$lang_Token());
|
| }
|
| lang_Parser.prototype._lookaheadAfterParens = function(tokens) {
|
| var saved = this._afterParens.length;
|
| @@ -19920,13 +20330,13 @@ lang_Parser.prototype.finishMapLiteral = function(start, isConst, type) {
|
| }
|
| lang_Parser.prototype.finishTypedLiteral = function(start, isConst) {
|
| var span = this._makeSpan(start);
|
| - var typeToBeNamedLater = new NameTypeReference(false, null, null, (span && span.is$SourceSpan()));
|
| - var genericType = this.addTypeArguments((typeToBeNamedLater && typeToBeNamedLater.is$TypeReference()), 0);
|
| + var typeToBeNamedLater = new NameTypeReference(false, null, null, (span == null ? null : span.assert$SourceSpan()));
|
| + var genericType = this.addTypeArguments((typeToBeNamedLater == null ? null : typeToBeNamedLater.assert$TypeReference()), 0);
|
| if ($notnull_bool(this._peekKind(4/*TokenKind.LBRACK*/)) || $notnull_bool(this._peekKind(56/*TokenKind.INDEX*/))) {
|
| - return this.finishListLiteral(start, isConst, (genericType && genericType.is$TypeReference()));
|
| + return this.finishListLiteral(start, isConst, (genericType == null ? null : genericType.assert$TypeReference()));
|
| }
|
| else if ($notnull_bool(this._peekKind(6/*TokenKind.LBRACE*/))) {
|
| - return this.finishMapLiteral(start, isConst, (genericType && genericType.is$TypeReference()));
|
| + return this.finishMapLiteral(start, isConst, (genericType == null ? null : genericType.assert$TypeReference()));
|
| }
|
| else {
|
| this._errorExpected('array or map literal');
|
| @@ -19983,7 +20393,7 @@ lang_Parser.prototype.typeParameters = function() {
|
| if (!$notnull_bool(closed)) {
|
| this._eat(53/*TokenKind.GT*/);
|
| }
|
| - return (ret && ret.is$List_ParameterType());
|
| + return (ret == null ? null : ret.assert$List_ParameterType());
|
| }
|
| lang_Parser.prototype.get$typeParameters = function() {
|
| return lang_Parser.prototype.typeParameters.bind(this);
|
| @@ -20025,7 +20435,7 @@ lang_Parser.prototype._finishTypeArguments = function(baseType, depth, types) {
|
| depth = this._eatClosingAngle(depth);
|
| }
|
| var span = this._makeSpan(baseType.span.start);
|
| - return new GenericTypeReference(baseType, types, depth, (span && span.is$SourceSpan()));
|
| + return new GenericTypeReference(baseType, types, depth, (span == null ? null : span.assert$SourceSpan()));
|
| }
|
| lang_Parser.prototype.typeList = function() {
|
| var types = [];
|
| @@ -20069,7 +20479,7 @@ lang_Parser.prototype.type = function(depth) {
|
| }
|
| var typeRef = new NameTypeReference(isFinal, name, names, this._makeSpan(start));
|
| if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) {
|
| - return this.addTypeArguments((typeRef && typeRef.is$TypeReference()), depth);
|
| + return this.addTypeArguments((typeRef == null ? null : typeRef.assert$TypeReference()), depth);
|
| }
|
| else {
|
| return typeRef;
|
| @@ -20096,7 +20506,7 @@ lang_Parser.prototype.formalParameter = function(inOptionalBlock) {
|
| else if ($notnull_bool(this._peekKind(2/*TokenKind.LPAREN*/))) {
|
| var formals = this.formalParameterList();
|
| var func = new FunctionDefinition(null, type, name, formals, null, null, null, null, this._makeSpan(start));
|
| - type = new FunctionTypeReference(false, func, (($0 = func.get$span()) && $0.is$SourceSpan()));
|
| + type = new FunctionTypeReference(false, func, (($0 = func.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| if ($notnull_bool(inOptionalBlock) && $notnull_bool(value == null)) {
|
| value = new NullExpression(this._makeSpan(start));
|
| @@ -20132,7 +20542,7 @@ lang_Parser.prototype.identifier = function() {
|
| var $0;
|
| var tok = this._lang_next();
|
| if (!$notnull_bool(TokenKind.isIdentifier($assert_num(tok.get$kind())))) {
|
| - this._lang_error(('expected identifier, but found ' + tok), (($0 = tok.get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error(('expected identifier, but found ' + tok), (($0 = tok.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| return new lang_Identifier(tok.get$text(), this._makeSpan($assert_num(tok.get$start())));
|
| }
|
| @@ -20148,23 +20558,23 @@ lang_Parser.prototype._makeFunction = function(expr, formals, body) {
|
| type = expr.get$type();
|
| }
|
| else {
|
| - this._lang_error('bad function body', (($0 = expr.get$span()) && $0.is$SourceSpan()));
|
| + this._lang_error('bad function body', (($0 = expr.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| var span = new SourceSpan(expr.get$span().get$file(), expr.get$span().get$start(), body.get$span().get$end());
|
| - var func = new FunctionDefinition(null, type, name, formals, null, null, null, body, (span && span.is$SourceSpan()));
|
| - return new LambdaExpression(func, (($0 = func.get$span()) && $0.is$SourceSpan()));
|
| + var func = new FunctionDefinition(null, type, name, formals, null, null, null, body, (span == null ? null : span.assert$SourceSpan()));
|
| + return new LambdaExpression(func, (($0 = func.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| lang_Parser.prototype._makeDeclaredIdentifier = function(e) {
|
| var $0;
|
| if ((e instanceof VarExpression)) {
|
| - return new DeclaredIdentifier(null, e.get$name(), (($0 = e.get$span()) && $0.is$SourceSpan()));
|
| + return new DeclaredIdentifier(null, e.get$name(), (($0 = e.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| else if ((e instanceof DeclaredIdentifier)) {
|
| return e;
|
| }
|
| else {
|
| this._lang_error('expected declared identifier');
|
| - return new DeclaredIdentifier(null, null, (($0 = e.get$span()) && $0.is$SourceSpan()));
|
| + return new DeclaredIdentifier(null, null, (($0 = e.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| lang_Parser.prototype._makeLabel = function(expr) {
|
| @@ -20209,11 +20619,11 @@ function lang_Node(span) {
|
| this.span = span;
|
| // Initializers done
|
| }
|
| -lang_Node.prototype.is$lang_Node = function(){return this;};
|
| +lang_Node.prototype.assert$lang_Node = function(){return this};
|
| lang_Node.prototype.get$span = function() { return this.span; };
|
| lang_Node.prototype.set$span = function(value) { return this.span = value; };
|
| lang_Node.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for Definition **************
|
| function Definition(span) {
|
| @@ -20221,7 +20631,7 @@ function Definition(span) {
|
| lang_Statement.call(this, span);
|
| }
|
| $inherits(Definition, lang_Statement);
|
| -Definition.prototype.is$Definition = function(){return this;};
|
| +Definition.prototype.assert$Definition = function(){return this};
|
| Definition.prototype.get$typeParameters = function() {
|
| return null;
|
| }
|
| @@ -20234,14 +20644,14 @@ function lang_Statement(span) {
|
| lang_Node.call(this, span);
|
| }
|
| $inherits(lang_Statement, lang_Node);
|
| -lang_Statement.prototype.is$lang_Statement = function(){return this;};
|
| +lang_Statement.prototype.assert$lang_Statement = function(){return this};
|
| // ********** Code for lang_Expression **************
|
| function lang_Expression(span) {
|
| // Initializers done
|
| lang_Node.call(this, span);
|
| }
|
| $inherits(lang_Expression, lang_Node);
|
| -lang_Expression.prototype.is$lang_Expression = function(){return this;};
|
| +lang_Expression.prototype.assert$lang_Expression = function(){return this};
|
| // ********** Code for TypeReference **************
|
| function TypeReference(span, type) {
|
| this.type = type;
|
| @@ -20249,7 +20659,7 @@ function TypeReference(span, type) {
|
| lang_Node.call(this, span);
|
| }
|
| $inherits(TypeReference, lang_Node);
|
| -TypeReference.prototype.is$TypeReference = function(){return this;};
|
| +TypeReference.prototype.assert$TypeReference = function(){return this};
|
| TypeReference.prototype.get$type = function() { return this.type; };
|
| TypeReference.prototype.set$type = function(value) { return this.type = value; };
|
| TypeReference.prototype.visit = function(visitor) {
|
| @@ -20259,7 +20669,7 @@ TypeReference.prototype.get$isFinal = function() {
|
| return false;
|
| }
|
| TypeReference.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for DirectiveDefinition **************
|
| function DirectiveDefinition(name, arguments, span) {
|
| @@ -20277,7 +20687,7 @@ DirectiveDefinition.prototype.visit = function(visitor) {
|
| return visitor.visitDirectiveDefinition(this);
|
| }
|
| DirectiveDefinition.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for TypeDefinition **************
|
| function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsTypes, nativeType, factoryType, body, span) {
|
| @@ -20293,7 +20703,7 @@ function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT
|
| Definition.call(this, span);
|
| }
|
| $inherits(TypeDefinition, Definition);
|
| -TypeDefinition.prototype.is$TypeDefinition = function(){return this;};
|
| +TypeDefinition.prototype.assert$TypeDefinition = function(){return this};
|
| TypeDefinition.prototype.get$isClass = function() { return this.isClass; };
|
| TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = value; };
|
| TypeDefinition.prototype.get$name = function() { return this.name; };
|
| @@ -20308,7 +20718,7 @@ TypeDefinition.prototype.visit = function(visitor) {
|
| return visitor.visitTypeDefinition(this);
|
| }
|
| TypeDefinition.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for FunctionTypeDefinition **************
|
| function FunctionTypeDefinition(func, typeParameters, span) {
|
| @@ -20326,7 +20736,7 @@ FunctionTypeDefinition.prototype.visit = function(visitor) {
|
| return visitor.visitFunctionTypeDefinition(this);
|
| }
|
| FunctionTypeDefinition.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for VariableDefinition **************
|
| function VariableDefinition(modifiers, type, names, values, span) {
|
| @@ -20348,7 +20758,7 @@ VariableDefinition.prototype.visit = function(visitor) {
|
| return visitor.visitVariableDefinition(this);
|
| }
|
| VariableDefinition.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for FunctionDefinition **************
|
| function FunctionDefinition(modifiers, returnType, name, formals, typeParameters, initializers, nativeBody, body, span) {
|
| @@ -20364,7 +20774,7 @@ function FunctionDefinition(modifiers, returnType, name, formals, typeParameters
|
| Definition.call(this, span);
|
| }
|
| $inherits(FunctionDefinition, Definition);
|
| -FunctionDefinition.prototype.is$FunctionDefinition = function(){return this;};
|
| +FunctionDefinition.prototype.assert$FunctionDefinition = function(){return this};
|
| FunctionDefinition.prototype.get$returnType = function() { return this.returnType; };
|
| FunctionDefinition.prototype.set$returnType = function(value) { return this.returnType = value; };
|
| FunctionDefinition.prototype.get$name = function() { return this.name; };
|
| @@ -20381,7 +20791,7 @@ FunctionDefinition.prototype.visit = function(visitor) {
|
| return visitor.visitFunctionDefinition(this);
|
| }
|
| FunctionDefinition.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ReturnStatement **************
|
| function ReturnStatement(value, span) {
|
| @@ -20396,7 +20806,7 @@ ReturnStatement.prototype.visit = function(visitor) {
|
| return visitor.visitReturnStatement(this);
|
| }
|
| ReturnStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ThrowStatement **************
|
| function ThrowStatement(value, span) {
|
| @@ -20411,7 +20821,7 @@ ThrowStatement.prototype.visit = function(visitor) {
|
| return visitor.visitThrowStatement(this);
|
| }
|
| ThrowStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for AssertStatement **************
|
| function AssertStatement(test, span) {
|
| @@ -20424,7 +20834,7 @@ AssertStatement.prototype.visit = function(visitor) {
|
| return visitor.visitAssertStatement(this);
|
| }
|
| AssertStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for BreakStatement **************
|
| function BreakStatement(label, span) {
|
| @@ -20439,7 +20849,7 @@ BreakStatement.prototype.visit = function(visitor) {
|
| return visitor.visitBreakStatement(this);
|
| }
|
| BreakStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ContinueStatement **************
|
| function ContinueStatement(label, span) {
|
| @@ -20454,7 +20864,7 @@ ContinueStatement.prototype.visit = function(visitor) {
|
| return visitor.visitContinueStatement(this);
|
| }
|
| ContinueStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for IfStatement **************
|
| function IfStatement(test, trueBranch, falseBranch, span) {
|
| @@ -20469,7 +20879,7 @@ IfStatement.prototype.visit = function(visitor) {
|
| return visitor.visitIfStatement(this);
|
| }
|
| IfStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for WhileStatement **************
|
| function WhileStatement(test, body, span) {
|
| @@ -20485,7 +20895,7 @@ WhileStatement.prototype.visit = function(visitor) {
|
| return visitor.visitWhileStatement(this);
|
| }
|
| WhileStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for DoStatement **************
|
| function DoStatement(body, test, span) {
|
| @@ -20501,7 +20911,7 @@ DoStatement.prototype.visit = function(visitor) {
|
| return visitor.visitDoStatement(this);
|
| }
|
| DoStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ForStatement **************
|
| function ForStatement(init, test, step, body, span) {
|
| @@ -20519,7 +20929,7 @@ ForStatement.prototype.visit = function(visitor) {
|
| return visitor.visitForStatement(this);
|
| }
|
| ForStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ForInStatement **************
|
| function ForInStatement(item, list, body, span) {
|
| @@ -20536,7 +20946,7 @@ ForInStatement.prototype.visit = function(visitor) {
|
| return visitor.visitForInStatement(this);
|
| }
|
| ForInStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for TryStatement **************
|
| function TryStatement(body, catches, finallyBlock, span) {
|
| @@ -20553,7 +20963,7 @@ TryStatement.prototype.visit = function(visitor) {
|
| return visitor.visitTryStatement(this);
|
| }
|
| TryStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for SwitchStatement **************
|
| function SwitchStatement(test, cases, span) {
|
| @@ -20569,7 +20979,7 @@ SwitchStatement.prototype.visit = function(visitor) {
|
| return visitor.visitSwitchStatement(this);
|
| }
|
| SwitchStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for BlockStatement **************
|
| function BlockStatement(body, span) {
|
| @@ -20578,14 +20988,14 @@ function BlockStatement(body, span) {
|
| lang_Statement.call(this, span);
|
| }
|
| $inherits(BlockStatement, lang_Statement);
|
| -BlockStatement.prototype.is$BlockStatement = function(){return this;};
|
| +BlockStatement.prototype.assert$BlockStatement = function(){return this};
|
| BlockStatement.prototype.get$body = function() { return this.body; };
|
| BlockStatement.prototype.set$body = function(value) { return this.body = value; };
|
| BlockStatement.prototype.visit = function(visitor) {
|
| return visitor.visitBlockStatement(this);
|
| }
|
| BlockStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for LabeledStatement **************
|
| function LabeledStatement(name, body, span) {
|
| @@ -20603,7 +21013,7 @@ LabeledStatement.prototype.visit = function(visitor) {
|
| return visitor.visitLabeledStatement(this);
|
| }
|
| LabeledStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for lang_ExpressionStatement **************
|
| function lang_ExpressionStatement(body, span) {
|
| @@ -20618,7 +21028,7 @@ lang_ExpressionStatement.prototype.visit = function(visitor) {
|
| return visitor.visitExpressionStatement(this);
|
| }
|
| lang_ExpressionStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for EmptyStatement **************
|
| function EmptyStatement(span) {
|
| @@ -20630,7 +21040,7 @@ EmptyStatement.prototype.visit = function(visitor) {
|
| return visitor.visitEmptyStatement(this);
|
| }
|
| EmptyStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for DietStatement **************
|
| function DietStatement(span) {
|
| @@ -20642,7 +21052,7 @@ DietStatement.prototype.visit = function(visitor) {
|
| return visitor.visitDietStatement(this);
|
| }
|
| DietStatement.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for LambdaExpression **************
|
| function LambdaExpression(func, span) {
|
| @@ -20651,14 +21061,14 @@ function LambdaExpression(func, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(LambdaExpression, lang_Expression);
|
| -LambdaExpression.prototype.is$LambdaExpression = function(){return this;};
|
| +LambdaExpression.prototype.assert$LambdaExpression = function(){return this};
|
| LambdaExpression.prototype.get$func = function() { return this.func; };
|
| LambdaExpression.prototype.set$func = function(value) { return this.func = value; };
|
| LambdaExpression.prototype.visit = function(visitor) {
|
| return visitor.visitLambdaExpression(this);
|
| }
|
| LambdaExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for CallExpression **************
|
| function CallExpression(target, arguments, span) {
|
| @@ -20668,7 +21078,7 @@ function CallExpression(target, arguments, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(CallExpression, lang_Expression);
|
| -CallExpression.prototype.is$CallExpression = function(){return this;};
|
| +CallExpression.prototype.assert$CallExpression = function(){return this};
|
| CallExpression.prototype.get$target = function() { return this.target; };
|
| CallExpression.prototype.set$target = function(value) { return this.target = value; };
|
| CallExpression.prototype.get$arguments = function() { return this.arguments; };
|
| @@ -20677,7 +21087,7 @@ CallExpression.prototype.visit = function(visitor) {
|
| return visitor.visitCallExpression(this);
|
| }
|
| CallExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for IndexExpression **************
|
| function IndexExpression(target, index, span) {
|
| @@ -20687,14 +21097,14 @@ function IndexExpression(target, index, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(IndexExpression, lang_Expression);
|
| -IndexExpression.prototype.is$IndexExpression = function(){return this;};
|
| +IndexExpression.prototype.assert$IndexExpression = function(){return this};
|
| IndexExpression.prototype.get$target = function() { return this.target; };
|
| IndexExpression.prototype.set$target = function(value) { return this.target = value; };
|
| IndexExpression.prototype.visit = function(visitor) {
|
| return visitor.visitIndexExpression(this);
|
| }
|
| IndexExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for BinaryExpression **************
|
| function BinaryExpression(op, x, y, span) {
|
| @@ -20705,7 +21115,7 @@ function BinaryExpression(op, x, y, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(BinaryExpression, lang_Expression);
|
| -BinaryExpression.prototype.is$BinaryExpression = function(){return this;};
|
| +BinaryExpression.prototype.assert$BinaryExpression = function(){return this};
|
| BinaryExpression.prototype.get$op = function() { return this.op; };
|
| BinaryExpression.prototype.set$op = function(value) { return this.op = value; };
|
| BinaryExpression.prototype.get$x = function() { return this.x; };
|
| @@ -20716,7 +21126,7 @@ BinaryExpression.prototype.visit = function(visitor) {
|
| return visitor.visitBinaryExpression(this);
|
| }
|
| BinaryExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for UnaryExpression **************
|
| function UnaryExpression(op, self, span) {
|
| @@ -20726,7 +21136,7 @@ function UnaryExpression(op, self, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(UnaryExpression, lang_Expression);
|
| -UnaryExpression.prototype.is$UnaryExpression = function(){return this;};
|
| +UnaryExpression.prototype.assert$UnaryExpression = function(){return this};
|
| UnaryExpression.prototype.get$op = function() { return this.op; };
|
| UnaryExpression.prototype.set$op = function(value) { return this.op = value; };
|
| UnaryExpression.prototype.get$self = function() { return this.self; };
|
| @@ -20735,7 +21145,7 @@ UnaryExpression.prototype.visit = function(visitor) {
|
| return visitor.visitUnaryExpression(this);
|
| }
|
| UnaryExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for PostfixExpression **************
|
| function PostfixExpression(body, op, span) {
|
| @@ -20745,7 +21155,7 @@ function PostfixExpression(body, op, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(PostfixExpression, lang_Expression);
|
| -PostfixExpression.prototype.is$PostfixExpression = function(){return this;};
|
| +PostfixExpression.prototype.assert$PostfixExpression = function(){return this};
|
| PostfixExpression.prototype.get$body = function() { return this.body; };
|
| PostfixExpression.prototype.set$body = function(value) { return this.body = value; };
|
| PostfixExpression.prototype.get$op = function() { return this.op; };
|
| @@ -20754,7 +21164,7 @@ PostfixExpression.prototype.visit = function(visitor) {
|
| return visitor.visitPostfixExpression$1(this);
|
| }
|
| PostfixExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for lang_NewExpression **************
|
| function lang_NewExpression(isConst, type, name, arguments, span) {
|
| @@ -20778,7 +21188,7 @@ lang_NewExpression.prototype.visit = function(visitor) {
|
| return visitor.visitNewExpression(this);
|
| }
|
| lang_NewExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ListExpression **************
|
| function ListExpression(isConst, type, values, span) {
|
| @@ -20799,7 +21209,7 @@ ListExpression.prototype.visit = function(visitor) {
|
| return visitor.visitListExpression(this);
|
| }
|
| ListExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for MapExpression **************
|
| function MapExpression(isConst, type, items, span) {
|
| @@ -20818,7 +21228,7 @@ MapExpression.prototype.visit = function(visitor) {
|
| return visitor.visitMapExpression(this);
|
| }
|
| MapExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ConditionalExpression **************
|
| function ConditionalExpression(test, trueBranch, falseBranch, span) {
|
| @@ -20833,7 +21243,7 @@ ConditionalExpression.prototype.visit = function(visitor) {
|
| return visitor.visitConditionalExpression(this);
|
| }
|
| ConditionalExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for IsExpression **************
|
| function IsExpression(isTrue, x, type, span) {
|
| @@ -20852,7 +21262,7 @@ IsExpression.prototype.visit = function(visitor) {
|
| return visitor.visitIsExpression(this);
|
| }
|
| IsExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ParenExpression **************
|
| function ParenExpression(body, span) {
|
| @@ -20867,7 +21277,7 @@ ParenExpression.prototype.visit = function(visitor) {
|
| return visitor.visitParenExpression(this);
|
| }
|
| ParenExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for DotExpression **************
|
| function DotExpression(self, name, span) {
|
| @@ -20877,7 +21287,7 @@ function DotExpression(self, name, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(DotExpression, lang_Expression);
|
| -DotExpression.prototype.is$DotExpression = function(){return this;};
|
| +DotExpression.prototype.assert$DotExpression = function(){return this};
|
| DotExpression.prototype.get$self = function() { return this.self; };
|
| DotExpression.prototype.set$self = function(value) { return this.self = value; };
|
| DotExpression.prototype.get$name = function() { return this.name; };
|
| @@ -20886,7 +21296,7 @@ DotExpression.prototype.visit = function(visitor) {
|
| return visitor.visitDotExpression(this);
|
| }
|
| DotExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for VarExpression **************
|
| function VarExpression(name, span) {
|
| @@ -20895,14 +21305,14 @@ function VarExpression(name, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(VarExpression, lang_Expression);
|
| -VarExpression.prototype.is$VarExpression = function(){return this;};
|
| +VarExpression.prototype.assert$VarExpression = function(){return this};
|
| VarExpression.prototype.get$name = function() { return this.name; };
|
| VarExpression.prototype.set$name = function(value) { return this.name = value; };
|
| VarExpression.prototype.visit = function(visitor) {
|
| return visitor.visitVarExpression(this);
|
| }
|
| VarExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ThisExpression **************
|
| function ThisExpression(span) {
|
| @@ -20914,7 +21324,7 @@ ThisExpression.prototype.visit = function(visitor) {
|
| return visitor.visitThisExpression(this);
|
| }
|
| ThisExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for SuperExpression **************
|
| function SuperExpression(span) {
|
| @@ -20926,7 +21336,7 @@ SuperExpression.prototype.visit = function(visitor) {
|
| return visitor.visitSuperExpression(this);
|
| }
|
| SuperExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for NullExpression **************
|
| function NullExpression(span) {
|
| @@ -20938,7 +21348,7 @@ NullExpression.prototype.visit = function(visitor) {
|
| return visitor.visitNullExpression(this);
|
| }
|
| NullExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for LiteralExpression **************
|
| function LiteralExpression(value, type, text, span) {
|
| @@ -20959,7 +21369,7 @@ LiteralExpression.prototype.visit = function(visitor) {
|
| return visitor.visitLiteralExpression(this);
|
| }
|
| LiteralExpression.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for NameTypeReference **************
|
| function NameTypeReference(isFinal, name, names, span) {
|
| @@ -20970,7 +21380,7 @@ function NameTypeReference(isFinal, name, names, span) {
|
| TypeReference.call(this, span);
|
| }
|
| $inherits(NameTypeReference, TypeReference);
|
| -NameTypeReference.prototype.is$NameTypeReference = function(){return this;};
|
| +NameTypeReference.prototype.assert$NameTypeReference = function(){return this};
|
| NameTypeReference.prototype.get$isFinal = function() { return this.isFinal; };
|
| NameTypeReference.prototype.set$isFinal = function(value) { return this.isFinal = value; };
|
| NameTypeReference.prototype.get$name = function() { return this.name; };
|
| @@ -20981,7 +21391,7 @@ NameTypeReference.prototype.visit = function(visitor) {
|
| return visitor.visitNameTypeReference(this);
|
| }
|
| NameTypeReference.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for GenericTypeReference **************
|
| function GenericTypeReference(baseType, typeArguments, depth, span) {
|
| @@ -20992,7 +21402,7 @@ function GenericTypeReference(baseType, typeArguments, depth, span) {
|
| TypeReference.call(this, span);
|
| }
|
| $inherits(GenericTypeReference, TypeReference);
|
| -GenericTypeReference.prototype.is$GenericTypeReference = function(){return this;};
|
| +GenericTypeReference.prototype.assert$GenericTypeReference = function(){return this};
|
| GenericTypeReference.prototype.get$baseType = function() { return this.baseType; };
|
| GenericTypeReference.prototype.set$baseType = function(value) { return this.baseType = value; };
|
| GenericTypeReference.prototype.get$depth = function() { return this.depth; };
|
| @@ -21001,7 +21411,7 @@ GenericTypeReference.prototype.visit = function(visitor) {
|
| return visitor.visitGenericTypeReference(this);
|
| }
|
| GenericTypeReference.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for FunctionTypeReference **************
|
| function FunctionTypeReference(isFinal, func, span) {
|
| @@ -21011,7 +21421,7 @@ function FunctionTypeReference(isFinal, func, span) {
|
| TypeReference.call(this, span);
|
| }
|
| $inherits(FunctionTypeReference, TypeReference);
|
| -FunctionTypeReference.prototype.is$FunctionTypeReference = function(){return this;};
|
| +FunctionTypeReference.prototype.assert$FunctionTypeReference = function(){return this};
|
| FunctionTypeReference.prototype.get$isFinal = function() { return this.isFinal; };
|
| FunctionTypeReference.prototype.set$isFinal = function(value) { return this.isFinal = value; };
|
| FunctionTypeReference.prototype.get$func = function() { return this.func; };
|
| @@ -21020,7 +21430,7 @@ FunctionTypeReference.prototype.visit = function(visitor) {
|
| return visitor.visitFunctionTypeReference(this);
|
| }
|
| FunctionTypeReference.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for ArgumentNode **************
|
| function ArgumentNode(label, value, span) {
|
| @@ -21030,7 +21440,7 @@ function ArgumentNode(label, value, span) {
|
| lang_Node.call(this, span);
|
| }
|
| $inherits(ArgumentNode, lang_Node);
|
| -ArgumentNode.prototype.is$ArgumentNode = function(){return this;};
|
| +ArgumentNode.prototype.assert$ArgumentNode = function(){return this};
|
| ArgumentNode.prototype.get$label = function() { return this.label; };
|
| ArgumentNode.prototype.set$label = function(value) { return this.label = value; };
|
| ArgumentNode.prototype.get$value = function() { return this.value; };
|
| @@ -21039,7 +21449,7 @@ ArgumentNode.prototype.visit = function(visitor) {
|
| return visitor.visitArgumentNode(this);
|
| }
|
| ArgumentNode.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for FormalNode **************
|
| function FormalNode(isThis, isRest, type, name, value, span) {
|
| @@ -21062,7 +21472,7 @@ FormalNode.prototype.visit = function(visitor) {
|
| return visitor.visitFormalNode(this);
|
| }
|
| FormalNode.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for CatchNode **************
|
| function CatchNode(exception, trace, body, span) {
|
| @@ -21083,7 +21493,7 @@ CatchNode.prototype.visit = function(visitor) {
|
| return visitor.visitCatchNode(this);
|
| }
|
| CatchNode.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for CaseNode **************
|
| function CaseNode(label, cases, statements, span) {
|
| @@ -21104,7 +21514,7 @@ CaseNode.prototype.visit = function(visitor) {
|
| return visitor.visitCaseNode(this);
|
| }
|
| CaseNode.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for TypeParameter **************
|
| function TypeParameter(name, extendsType, span) {
|
| @@ -21122,7 +21532,7 @@ TypeParameter.prototype.visit = function(visitor) {
|
| return visitor.visitTypeParameter(this);
|
| }
|
| TypeParameter.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for lang_Identifier **************
|
| function lang_Identifier(name, span) {
|
| @@ -21131,14 +21541,14 @@ function lang_Identifier(name, span) {
|
| lang_Node.call(this, span);
|
| }
|
| $inherits(lang_Identifier, lang_Node);
|
| -lang_Identifier.prototype.is$lang_Identifier = function(){return this;};
|
| +lang_Identifier.prototype.assert$lang_Identifier = function(){return this};
|
| lang_Identifier.prototype.get$name = function() { return this.name; };
|
| lang_Identifier.prototype.set$name = function(value) { return this.name = value; };
|
| lang_Identifier.prototype.visit = function(visitor) {
|
| return visitor.visitIdentifier(this);
|
| }
|
| lang_Identifier.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for DeclaredIdentifier **************
|
| function DeclaredIdentifier(type, name, span) {
|
| @@ -21148,7 +21558,7 @@ function DeclaredIdentifier(type, name, span) {
|
| lang_Expression.call(this, span);
|
| }
|
| $inherits(DeclaredIdentifier, lang_Expression);
|
| -DeclaredIdentifier.prototype.is$DeclaredIdentifier = function(){return this;};
|
| +DeclaredIdentifier.prototype.assert$DeclaredIdentifier = function(){return this};
|
| DeclaredIdentifier.prototype.get$type = function() { return this.type; };
|
| DeclaredIdentifier.prototype.set$type = function(value) { return this.type = value; };
|
| DeclaredIdentifier.prototype.get$name = function() { return this.name; };
|
| @@ -21157,17 +21567,19 @@ DeclaredIdentifier.prototype.visit = function(visitor) {
|
| return visitor.visitDeclaredIdentifier(this);
|
| }
|
| DeclaredIdentifier.prototype.visit$1 = function($0) {
|
| - return this.visit(($0 && $0.is$TreeVisitor()));
|
| + return this.visit(($0 == null ? null : $0.assert$TreeVisitor()));
|
| };
|
| // ********** Code for lang_Type **************
|
| function lang_Type(name) {
|
| - this.isTested = false;
|
| + this.isTested = false
|
| + this.isChecked = false
|
| this._resolvedMembers = $map([]);
|
| + this.varStubs = $map([]);
|
| // Initializers done
|
| lang_Element.call(this, name, null);
|
| }
|
| $inherits(lang_Type, lang_Element);
|
| -lang_Type.prototype.is$lang_Type = function(){return this;};
|
| +lang_Type.prototype.assert$lang_Type = function(){return this};
|
| lang_Type.prototype.get$isTested = function() { return this.isTested; };
|
| lang_Type.prototype.set$isTested = function(value) { return this.isTested = value; };
|
| lang_Type.prototype.get$typeCheckCode = function() { return this.typeCheckCode; };
|
| @@ -21180,9 +21592,9 @@ lang_Type.prototype.markUsed = function() {
|
| lang_Type.prototype.get$typeMember = function() {
|
| var $0;
|
| if (this._typeMember == null) {
|
| - this._typeMember = new TypeMember((this && this.is$DefinedType()));
|
| + this._typeMember = new TypeMember((this == null ? null : this.assert$DefinedType()));
|
| }
|
| - return (($0 = this._typeMember) && $0.is$TypeMember());
|
| + return (($0 = this._typeMember) == null ? null : $0.assert$TypeMember());
|
| }
|
| lang_Type.prototype.getMember = function(name) {
|
| return null;
|
| @@ -21260,7 +21672,7 @@ lang_Type.prototype.get$typeArgsInOrder = function() {
|
| return null;
|
| }
|
| lang_Type.prototype.get$genericType = function() {
|
| - return (this && this.is$DefinedType());
|
| + return (this == null ? null : this.assert$DefinedType());
|
| }
|
| lang_Type.prototype.get$interfaces = function() {
|
| return null;
|
| @@ -21284,13 +21696,13 @@ lang_Type.prototype._checkOverride = function(member) {
|
| var parentMember = this._getMemberInParents(member.name);
|
| if ($notnull_bool($ne(parentMember, null))) {
|
| if (!$notnull_bool(member.get$isPrivate()) || $eq(member.get$library(), parentMember.get$library())) {
|
| - member.override((parentMember && parentMember.is$Member()));
|
| + member.override((parentMember == null ? null : parentMember.assert$Member()));
|
| }
|
| }
|
| }
|
| lang_Type.prototype._createNotEqualMember = function() {
|
| var $0;
|
| - var eq = (($0 = this.get$members().$index('\$eq')) && $0.is$MethodMember());
|
| + var eq = (($0 = this.get$members().$index('\$eq')) == null ? null : $0.assert$MethodMember());
|
| if (eq == null) {
|
| $globals.world.internalError('INTERNAL: object does not define ==', this.get$definition().span);
|
| }
|
| @@ -21311,7 +21723,7 @@ lang_Type.prototype._getMemberInParents = function(memberName) {
|
| if (memberName == '\$ne') {
|
| var ret = this._createNotEqualMember();
|
| this.get$members().$setindex(memberName, ret);
|
| - return (ret && ret.is$Member());
|
| + return (ret == null ? null : ret.assert$Member());
|
| }
|
| return null;
|
| }
|
| @@ -21323,7 +21735,7 @@ lang_Type.prototype._getMemberInParents = function(memberName) {
|
| var i = $list.$index($i);
|
| var ret = i.getMember$1(memberName);
|
| if ($notnull_bool($ne(ret, null))) {
|
| - return (ret && ret.is$Member());
|
| + return (ret == null ? null : ret.assert$Member());
|
| }
|
| }
|
| return null;
|
| @@ -21335,7 +21747,7 @@ lang_Type.prototype._getMemberInParents = function(memberName) {
|
| }
|
| lang_Type.prototype.resolveMember = function(memberName) {
|
| var $0;
|
| - var ret = (($0 = this._resolvedMembers.$index(memberName)) && $0.is$MemberSet());
|
| + var ret = (($0 = this._resolvedMembers.$index(memberName)) == null ? null : $0.assert$MemberSet());
|
| if (ret != null) return ret;
|
| var member = this.getMember(memberName);
|
| if (member == null) {
|
| @@ -21353,12 +21765,12 @@ lang_Type.prototype.resolveMember = function(memberName) {
|
| if (!$notnull_bool(this.get$isClass()) && $notnull_bool(t.get$isClass())) {
|
| var m = t.getMember$1(memberName);
|
| if ($notnull_bool($ne(m, null)) && ret.members.indexOf(m) == -1) {
|
| - ret.add((m && m.is$Member()));
|
| + ret.add((m == null ? null : m.assert$Member()));
|
| }
|
| }
|
| else {
|
| 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 == null ? null : m.assert$Member()));
|
| }
|
| }
|
| return ret;
|
| @@ -21424,7 +21836,7 @@ lang_Type.prototype.isSubtypeOf = function(other) {
|
| var call = this.getCallMethod();
|
| var otherCall = other.getCallMethod();
|
| if ($notnull_bool($ne(call, null)) && $notnull_bool($ne(otherCall, null))) {
|
| - return lang_Type._isFunctionSubtypeOf((call && call.is$MethodMember()), (otherCall && otherCall.is$MethodMember()));
|
| + return lang_Type._isFunctionSubtypeOf((call == null ? null : call.assert$MethodMember()), (otherCall == null ? null : otherCall.assert$MethodMember()));
|
| }
|
| if ($eq(this.get$genericType(), other.get$genericType()) && $notnull_bool($ne(this.get$typeArgsInOrder(), null)) && $notnull_bool($ne(other.get$typeArgsInOrder(), null)) && $notnull_bool($eq(this.get$typeArgsInOrder().length, other.get$typeArgsInOrder().length))) {
|
| var t = this.get$typeArgsInOrder().iterator$0();
|
| @@ -21462,38 +21874,38 @@ lang_Type._isFunctionSubtypeOf = function(t, s) {
|
| return true;
|
| }
|
| lang_Type.prototype.addDirectSubtype$1 = function($0) {
|
| - return this.addDirectSubtype(($0 && $0.is$lang_Type()));
|
| + return this.addDirectSubtype(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| lang_Type.prototype.ensureSubtypeOf$3 = function($0, $1, $2) {
|
| - return this.ensureSubtypeOf(($0 && $0.is$lang_Type()), ($1 && $1.is$SourceSpan()), $assert_bool($2));
|
| + return this.ensureSubtypeOf(($0 == null ? null : $0.assert$lang_Type()), ($1 == null ? null : $1.assert$SourceSpan()), $assert_bool($2));
|
| };
|
| lang_Type.prototype.getConstructor$1 = function($0) {
|
| return this.getConstructor($assert_String($0));
|
| };
|
| lang_Type.prototype.getFactory$2 = function($0, $1) {
|
| - return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1));
|
| + return this.getFactory(($0 == null ? null : $0.assert$lang_Type()), $assert_String($1));
|
| };
|
| lang_Type.prototype.getMember$1 = function($0) {
|
| return this.getMember($assert_String($0));
|
| };
|
| lang_Type.prototype.getOrMakeConcreteType$1 = function($0) {
|
| - return this.getOrMakeConcreteType(($0 && $0.is$List_Type()));
|
| + return this.getOrMakeConcreteType(($0 == null ? null : $0.assert$List_Type()));
|
| };
|
| lang_Type.prototype.isAssignable$1 = function($0) {
|
| - return this.isAssignable(($0 && $0.is$lang_Type()));
|
| + return this.isAssignable(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| lang_Type.prototype.isString$0 = function() {
|
| return this.get$isString()();
|
| };
|
| lang_Type.prototype.isSubtypeOf$1 = function($0) {
|
| - return this.isSubtypeOf(($0 && $0.is$lang_Type()));
|
| + return this.isSubtypeOf(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| lang_Type.prototype.markUsed$0 = lang_Type.prototype.markUsed;
|
| lang_Type.prototype.resolveMember$1 = function($0) {
|
| return this.resolveMember($assert_String($0));
|
| };
|
| lang_Type.prototype.resolveTypeParams$1 = function($0) {
|
| - return this.resolveTypeParams(($0 && $0.is$ConcreteType()));
|
| + return this.resolveTypeParams(($0 == null ? null : $0.assert$ConcreteType()));
|
| };
|
| // ********** Code for ParameterType **************
|
| function ParameterType(name, typeParameter) {
|
| @@ -21502,7 +21914,7 @@ function ParameterType(name, typeParameter) {
|
| lang_Type.call(this, name);
|
| }
|
| $inherits(ParameterType, lang_Type);
|
| -ParameterType.prototype.is$ParameterType = function(){return this;};
|
| +ParameterType.prototype.assert$ParameterType = function(){return this};
|
| ParameterType.prototype.get$typeParameter = function() { return this.typeParameter; };
|
| ParameterType.prototype.set$typeParameter = function(value) { return this.typeParameter = value; };
|
| ParameterType.prototype.get$extendsType = function() { return this.extendsType; };
|
| @@ -21539,7 +21951,7 @@ ParameterType.prototype.getOrMakeConcreteType = function(typeArgs) {
|
| }
|
| ParameterType.prototype.resolveTypeParams = function(inType) {
|
| var $0;
|
| - return (($0 = inType.typeArguments.$index(this.name)) && $0.is$lang_Type());
|
| + return (($0 = inType.typeArguments.$index(this.name)) == null ? null : $0.assert$lang_Type());
|
| }
|
| ParameterType.prototype.addDirectSubtype = function(type) {
|
| $globals.world.internalError('no subtypes of type parameters yet', this.get$span());
|
| @@ -21553,23 +21965,23 @@ ParameterType.prototype.resolve = function() {
|
| }
|
| }
|
| ParameterType.prototype.addDirectSubtype$1 = function($0) {
|
| - return this.addDirectSubtype(($0 && $0.is$lang_Type()));
|
| + return this.addDirectSubtype(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| ParameterType.prototype.getConstructor$1 = function($0) {
|
| return this.getConstructor($assert_String($0));
|
| };
|
| ParameterType.prototype.getOrMakeConcreteType$1 = function($0) {
|
| - return this.getOrMakeConcreteType(($0 && $0.is$List_Type()));
|
| + return this.getOrMakeConcreteType(($0 == null ? null : $0.assert$List_Type()));
|
| };
|
| ParameterType.prototype.isSubtypeOf$1 = function($0) {
|
| - return this.isSubtypeOf(($0 && $0.is$lang_Type()));
|
| + return this.isSubtypeOf(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| ParameterType.prototype.resolve$0 = ParameterType.prototype.resolve;
|
| ParameterType.prototype.resolveMember$1 = function($0) {
|
| return this.resolveMember($assert_String($0));
|
| };
|
| ParameterType.prototype.resolveTypeParams$1 = function($0) {
|
| - return this.resolveTypeParams(($0 && $0.is$ConcreteType()));
|
| + return this.resolveTypeParams(($0 == null ? null : $0.assert$ConcreteType()));
|
| };
|
| // ********** Code for NonNullableType **************
|
| function NonNullableType(type) {
|
| @@ -21617,11 +22029,11 @@ NonNullableType.prototype.getMember = function(name) {
|
| }
|
| NonNullableType.prototype.getConstructor = function(name) {
|
| var $0;
|
| - return (($0 = this.type.getConstructor(name)) && $0.is$MethodMember());
|
| + return (($0 = this.type.getConstructor(name)) == null ? null : $0.assert$MethodMember());
|
| }
|
| NonNullableType.prototype.getFactory = function(t, name) {
|
| var $0;
|
| - return (($0 = this.type.getFactory(t, name)) && $0.is$MethodMember());
|
| + return (($0 = this.type.getFactory(t, name)) == null ? null : $0.assert$MethodMember());
|
| }
|
| NonNullableType.prototype.getOrMakeConcreteType = function(typeArgs) {
|
| return this.type.getOrMakeConcreteType(typeArgs);
|
| @@ -21661,7 +22073,7 @@ NonNullableType.prototype.get$factories = function() {
|
| }
|
| NonNullableType.prototype.get$typeArgsInOrder = function() {
|
| var $0;
|
| - return (($0 = this.type.get$typeArgsInOrder()) && $0.is$Collection_Type());
|
| + return (($0 = this.type.get$typeArgsInOrder()) == null ? null : $0.assert$Collection_Type());
|
| }
|
| NonNullableType.prototype.get$genericType = function() {
|
| return this.type.get$genericType();
|
| @@ -21679,29 +22091,29 @@ NonNullableType.prototype.get$isNative = function() {
|
| return this.type.get$isNative();
|
| }
|
| NonNullableType.prototype.addDirectSubtype$1 = function($0) {
|
| - return this.addDirectSubtype(($0 && $0.is$lang_Type()));
|
| + return this.addDirectSubtype(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| NonNullableType.prototype.getConstructor$1 = function($0) {
|
| return this.getConstructor($assert_String($0));
|
| };
|
| NonNullableType.prototype.getFactory$2 = function($0, $1) {
|
| - return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1));
|
| + return this.getFactory(($0 == null ? null : $0.assert$lang_Type()), $assert_String($1));
|
| };
|
| NonNullableType.prototype.getMember$1 = function($0) {
|
| return this.getMember($assert_String($0));
|
| };
|
| NonNullableType.prototype.getOrMakeConcreteType$1 = function($0) {
|
| - return this.getOrMakeConcreteType(($0 && $0.is$List_Type()));
|
| + return this.getOrMakeConcreteType(($0 == null ? null : $0.assert$List_Type()));
|
| };
|
| NonNullableType.prototype.isSubtypeOf$1 = function($0) {
|
| - return this.isSubtypeOf(($0 && $0.is$lang_Type()));
|
| + return this.isSubtypeOf(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| NonNullableType.prototype.markUsed$0 = NonNullableType.prototype.markUsed;
|
| NonNullableType.prototype.resolveMember$1 = function($0) {
|
| return this.resolveMember($assert_String($0));
|
| };
|
| NonNullableType.prototype.resolveTypeParams$1 = function($0) {
|
| - return this.resolveTypeParams(($0 && $0.is$ConcreteType()));
|
| + return this.resolveTypeParams(($0 == null ? null : $0.assert$ConcreteType()));
|
| };
|
| // ********** Code for ConcreteType **************
|
| function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) {
|
| @@ -21715,7 +22127,7 @@ function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) {
|
| lang_Type.call(this, name);
|
| }
|
| $inherits(ConcreteType, lang_Type);
|
| -ConcreteType.prototype.is$ConcreteType = function(){return this;};
|
| +ConcreteType.prototype.assert$ConcreteType = function(){return this};
|
| ConcreteType.prototype.get$genericType = function() { return this.genericType; };
|
| ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsInOrder; };
|
| ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeArgsInOrder = value; };
|
| @@ -21754,7 +22166,7 @@ ConcreteType.prototype.resolveTypeParams = function(inType) {
|
| newTypeArgs.add$1(newType);
|
| }
|
| if (!$notnull_bool(needsNewType)) return this;
|
| - return this.genericType.getOrMakeConcreteType((newTypeArgs && newTypeArgs.is$List_Type()));
|
| + return this.genericType.getOrMakeConcreteType((newTypeArgs == null ? null : newTypeArgs.assert$List_Type()));
|
| }
|
| ConcreteType.prototype.getOrMakeConcreteType = function(typeArgs) {
|
| return this.genericType.getOrMakeConcreteType(typeArgs);
|
| @@ -21800,7 +22212,7 @@ ConcreteType.prototype.getAllMembers = function() {
|
| result.$setindex(memberName, myMember);
|
| }
|
| }
|
| - return (result && result.is$Map_String$Member());
|
| + return (result == null ? null : result.assert$Map_String$Member());
|
| }
|
| ConcreteType.prototype.markUsed = function() {
|
| this.genericType.markUsed();
|
| @@ -21827,7 +22239,7 @@ ConcreteType.prototype.getConstructor = function(constructorName) {
|
| }
|
| if ($notnull_bool(genericMember.get$isFactory())) {
|
| ret = new ConcreteMember($assert_String(genericMember.get$name()), this, genericMember);
|
| - this.factories.addFactory(this.name, constructorName, (ret && ret.is$Member()));
|
| + this.factories.addFactory(this.name, constructorName, (ret == null ? null : ret.assert$Member()));
|
| }
|
| else {
|
| ret = new ConcreteMember(this.name, this, genericMember);
|
| @@ -21837,7 +22249,7 @@ ConcreteType.prototype.getConstructor = function(constructorName) {
|
| }
|
| ConcreteType.prototype.getMember = function(memberName) {
|
| var $0;
|
| - var member = (($0 = this.members.$index(memberName)) && $0.is$Member());
|
| + var member = (($0 = this.members.$index(memberName)) == null ? null : $0.assert$Member());
|
| if (member != null) {
|
| this._checkOverride(member);
|
| return member;
|
| @@ -21852,29 +22264,29 @@ ConcreteType.prototype.getMember = function(memberName) {
|
| }
|
| ConcreteType.prototype.resolveType = function(node, isRequired) {
|
| var ret = this.genericType.resolveType(node, isRequired);
|
| - return (ret && ret.is$lang_Type());
|
| + return (ret == null ? null : ret.assert$lang_Type());
|
| }
|
| ConcreteType.prototype.addDirectSubtype = function(type) {
|
| this.genericType.addDirectSubtype(type);
|
| }
|
| ConcreteType.prototype.addDirectSubtype$1 = function($0) {
|
| - return this.addDirectSubtype(($0 && $0.is$lang_Type()));
|
| + return this.addDirectSubtype(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| ConcreteType.prototype.getConstructor$1 = function($0) {
|
| return this.getConstructor($assert_String($0));
|
| };
|
| ConcreteType.prototype.getFactory$2 = function($0, $1) {
|
| - return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1));
|
| + return this.getFactory(($0 == null ? null : $0.assert$lang_Type()), $assert_String($1));
|
| };
|
| ConcreteType.prototype.getMember$1 = function($0) {
|
| return this.getMember($assert_String($0));
|
| };
|
| ConcreteType.prototype.getOrMakeConcreteType$1 = function($0) {
|
| - return this.getOrMakeConcreteType(($0 && $0.is$List_Type()));
|
| + return this.getOrMakeConcreteType(($0 == null ? null : $0.assert$List_Type()));
|
| };
|
| ConcreteType.prototype.markUsed$0 = ConcreteType.prototype.markUsed;
|
| ConcreteType.prototype.resolveTypeParams$1 = function($0) {
|
| - return this.resolveTypeParams(($0 && $0.is$ConcreteType()));
|
| + return this.resolveTypeParams(($0 == null ? null : $0.assert$ConcreteType()));
|
| };
|
| // ********** Code for DefinedType **************
|
| function DefinedType(name, library, definition, isClass) {
|
| @@ -21891,7 +22303,7 @@ function DefinedType(name, library, definition, isClass) {
|
| this.setDefinition(definition);
|
| }
|
| $inherits(DefinedType, lang_Type);
|
| -DefinedType.prototype.is$DefinedType = function(){return this;};
|
| +DefinedType.prototype.assert$DefinedType = function(){return this};
|
| DefinedType.prototype.get$definition = function() { return this.definition; };
|
| DefinedType.prototype.set$definition = function(value) { return this.definition = value; };
|
| DefinedType.prototype.get$library = function() { return this.library; };
|
| @@ -21918,18 +22330,18 @@ DefinedType.prototype.get$isNative = function() { return this.isNative; };
|
| DefinedType.prototype.set$isNative = function(value) { return this.isNative = value; };
|
| DefinedType.prototype.setDefinition = function(def) {
|
| var $0;
|
| - $assert(this.definition == null, "definition == null", "type.dart", 725, 12);
|
| + $assert(this.definition == null, "definition == null", "type.dart", 726, 12);
|
| this.definition = def;
|
| if ((this.definition instanceof TypeDefinition) && $notnull_bool($ne(this.definition.get$nativeType(), null))) {
|
| this.isNative = true;
|
| }
|
| if (this.definition != null && $notnull_bool($ne(this.definition.get$typeParameters(), null))) {
|
| this._concreteTypes = $map([]);
|
| - this.typeParameters = (($0 = this.definition.get$typeParameters()) && $0.is$List_ParameterType());
|
| + this.typeParameters = (($0 = this.definition.get$typeParameters()) == null ? null : $0.assert$List_ParameterType());
|
| }
|
| }
|
| DefinedType.prototype.get$isHiddenNativeType = function() {
|
| - return $eq(this.library, $globals.world.get$dom()) || ($notnull_bool($ne(this.definition.get$nativeType(), null)) && $notnull_bool(this.definition.get$nativeType().get$isConstructorHidden()));
|
| + return (this.definition != null && $notnull_bool($ne(this.definition.get$nativeType(), null)) && $notnull_bool(this.definition.get$nativeType().get$isConstructorHidden()));
|
| }
|
| DefinedType.prototype.get$typeArgsInOrder = function() {
|
| if (this.typeParameters == null) return null;
|
| @@ -21967,7 +22379,7 @@ DefinedType.prototype.get$isGeneric = function() {
|
| }
|
| DefinedType.prototype.get$span = function() {
|
| var $0;
|
| - return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan());
|
| + return (($0 = this.definition == null ? null : this.definition.span) == null ? null : $0.assert$SourceSpan());
|
| }
|
| DefinedType.prototype.get$typeofName = function() {
|
| if (!$notnull_bool(this.library.get$isCore())) return null;
|
| @@ -21982,7 +22394,7 @@ DefinedType.prototype.get$isNum = function() {
|
| }
|
| DefinedType.prototype.getCallMethod = function() {
|
| var $0;
|
| - return (($0 = this.members.$index('\$call')) && $0.is$MethodMember());
|
| + return (($0 = this.members.$index('\$call')) == null ? null : $0.assert$MethodMember());
|
| }
|
| DefinedType.prototype.getAllMembers = function() {
|
| return HashMapImplementation.HashMapImplementation$from$factory(this.members);
|
| @@ -21994,7 +22406,7 @@ DefinedType.prototype.markUsed = function() {
|
| var $list = orderValuesByKeys(this._lazyGenMethods);
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var method = $list.$index($i);
|
| - $globals.world.gen.genMethod((method && method.is$Member()));
|
| + $globals.world.gen.genMethod((method == null ? null : method.assert$Member()));
|
| }
|
| this._lazyGenMethods = null;
|
| }
|
| @@ -22015,14 +22427,14 @@ DefinedType.prototype._resolveInterfaces = function(types) {
|
| var interfaces = [];
|
| for (var $i = 0;$i < types.length; $i++) {
|
| var type = types.$index($i);
|
| - var resolvedInterface = this.resolveType((type && type.is$TypeReference()), true);
|
| + var resolvedInterface = this.resolveType((type == null ? null : type.assert$TypeReference()), true);
|
| if ($notnull_bool(resolvedInterface.get$isClosed()) && !($notnull_bool(this.library.get$isCore()) || $notnull_bool(this.library.get$isCoreImpl()))) {
|
| - $globals.world.error(('can not implement "' + resolvedInterface.get$name() + '": ') + 'only native implementation allowed', (($0 = type.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('can not implement "' + resolvedInterface.get$name() + '": ') + 'only native implementation allowed', (($0 = type.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| resolvedInterface.addDirectSubtype$1(this);
|
| interfaces.add$1(resolvedInterface);
|
| }
|
| - return (interfaces && interfaces.is$List_Type());
|
| + return (interfaces == null ? null : interfaces.assert$List_Type());
|
| }
|
| DefinedType.prototype.addDirectSubtype = function(type) {
|
| $assert(this._subtypes == null, "_subtypes == null", "type.dart", 841, 12);
|
| @@ -22036,7 +22448,7 @@ DefinedType.prototype.get$subtypes = function() {
|
| for (var $i = this.directSubtypes.iterator(); $i.hasNext$0(); ) {
|
| var st = $i.next$0();
|
| this._subtypes.add(st);
|
| - this._subtypes.addAll((($0 = st.get$subtypes()) && $0.is$Collection_E()));
|
| + this._subtypes.addAll((($0 = st.get$subtypes()) == null ? null : $0.assert$Collection_E()));
|
| }
|
| }
|
| return this._subtypes;
|
| @@ -22086,24 +22498,24 @@ DefinedType.prototype._cycleInInterfaceExtends = function() {
|
| DefinedType.prototype.resolve = function() {
|
| var $0;
|
| if ((this.definition instanceof TypeDefinition)) {
|
| - var typeDef = (($0 = this.definition) && $0.is$TypeDefinition());
|
| + var typeDef = (($0 = this.definition) == null ? null : $0.assert$TypeDefinition());
|
| if ($notnull_bool(this.isClass)) {
|
| if (typeDef.extendsTypes != null && typeDef.extendsTypes.length > 0) {
|
| if (typeDef.extendsTypes.length > 1) {
|
| - $globals.world.error('more than one base class', (($0 = typeDef.extendsTypes.$index(1).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('more than one base class', (($0 = typeDef.extendsTypes.$index(1).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| var extendsTypeRef = typeDef.extendsTypes.$index(0);
|
| if ((extendsTypeRef instanceof GenericTypeReference)) {
|
| - var g = (extendsTypeRef && extendsTypeRef.is$GenericTypeReference());
|
| + var g = (extendsTypeRef == null ? null : extendsTypeRef.assert$GenericTypeReference());
|
| this.set$parent(this.resolveType(g.baseType, true));
|
| }
|
| - this.set$parent(this.resolveType((extendsTypeRef && extendsTypeRef.is$TypeReference()), true));
|
| + this.set$parent(this.resolveType((extendsTypeRef == null ? null : extendsTypeRef.assert$TypeReference()), true));
|
| if (!$notnull_bool(this.get$parent().get$isClass())) {
|
| - $globals.world.error('class may not extend an interface - use implements', (($0 = typeDef.extendsTypes.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('class may not extend an interface - use implements', (($0 = typeDef.extendsTypes.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.get$parent().addDirectSubtype(this);
|
| if ($notnull_bool(this._cycleInClassExtends())) {
|
| - $globals.world.error(('class "' + this.name + '" has a cycle in its inheritance chain'), (($0 = extendsTypeRef.get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('class "' + this.name + '" has a cycle in its inheritance chain'), (($0 = extendsTypeRef.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| else {
|
| @@ -22119,12 +22531,12 @@ DefinedType.prototype.resolve = function() {
|
| }
|
| else {
|
| if (typeDef.implementsTypes != null && typeDef.implementsTypes.length > 0) {
|
| - $globals.world.error('implements not allowed on interfaces (use extends)', (($0 = typeDef.implementsTypes.$index(0).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error('implements not allowed on interfaces (use extends)', (($0 = typeDef.implementsTypes.$index(0).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| this.interfaces = this._resolveInterfaces(typeDef.extendsTypes);
|
| var res = this._cycleInInterfaceExtends();
|
| if (res >= 0) {
|
| - $globals.world.error(('interface "' + this.name + '" has a cycle in its inheritance chain'), (($0 = typeDef.extendsTypes.$index(res).get$span()) && $0.is$SourceSpan()));
|
| + $globals.world.error(('interface "' + this.name + '" has a cycle in its inheritance chain'), (($0 = typeDef.extendsTypes.$index(res).get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| if (typeDef.factoryType != null) {
|
| this.factory_ = this.resolveType(typeDef.factoryType, true);
|
| @@ -22177,7 +22589,7 @@ DefinedType.prototype.addMethod = function(methodName, definition) {
|
| $globals.world.error(('duplicate factory definition of "' + method.get$name() + '"'), definition.span);
|
| return;
|
| }
|
| - this.factories.addFactory($assert_String(method.get$constructorName()), $assert_String(method.get$name()), (method && method.is$Member()));
|
| + this.factories.addFactory($assert_String(method.get$constructorName()), $assert_String(method.get$name()), (method == null ? null : method.assert$Member()));
|
| return;
|
| }
|
| if (methodName.startsWith('get\$') || methodName.startsWith('set\$')) {
|
| @@ -22262,11 +22674,11 @@ DefinedType.prototype._tryCreateDefaultConstructor = function(name) {
|
| }
|
| else {
|
| body = null;
|
| - inits = [new CallExpression(new SuperExpression((span && span.is$SourceSpan())), [], (span && span.is$SourceSpan()))];
|
| + inits = [new CallExpression(new SuperExpression((span == null ? null : span.assert$SourceSpan())), [], (span == null ? null : span.assert$SourceSpan()))];
|
| }
|
| - var typeDef = (($0 = this.definition) && $0.is$TypeDefinition());
|
| - var c = new FunctionDefinition(null, null, typeDef.name, [], null, inits, native_, body, (span && span.is$SourceSpan()));
|
| - this.addMethod(null, (c && c.is$FunctionDefinition()));
|
| + var typeDef = (($0 = this.definition) == null ? null : $0.assert$TypeDefinition());
|
| + var c = new FunctionDefinition(null, null, typeDef.name, [], null, inits, native_, body, (span == null ? null : span.assert$SourceSpan()));
|
| + this.addMethod(null, (c == null ? null : c.assert$FunctionDefinition()));
|
| this.constructors.$index('').resolve$0();
|
| return this.constructors.$index('');
|
| }
|
| @@ -22274,7 +22686,7 @@ DefinedType.prototype._tryCreateDefaultConstructor = function(name) {
|
| }
|
| DefinedType.prototype.getMember = function(memberName) {
|
| var $0;
|
| - var member = (($0 = this.members.$index(memberName)) && $0.is$Member());
|
| + var member = (($0 = this.members.$index(memberName)) == null ? null : $0.assert$Member());
|
| if (member != null) {
|
| this._checkOverride(member);
|
| return member;
|
| @@ -22282,7 +22694,7 @@ DefinedType.prototype.getMember = function(memberName) {
|
| if ($notnull_bool(this.get$isTop())) {
|
| var libType = this.library.findTypeByName(memberName);
|
| if ($notnull_bool($ne(libType, null))) {
|
| - return (($0 = libType.get$typeMember()) && $0.is$Member());
|
| + return (($0 = libType.get$typeMember()) == null ? null : $0.assert$Member());
|
| }
|
| }
|
| return this._getMemberInParents(memberName);
|
| @@ -22302,45 +22714,44 @@ DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) {
|
| names.add$1(typeArgs.$index(i).get$name());
|
| jsnames.add$1(typeArgs.$index(i).get$jsname());
|
| }
|
| - var jsname = ('' + this.get$jsname() + '_' + Strings.join((jsnames && jsnames.is$List_String()), '\$'));
|
| - var simpleName = ('' + this.name + '<' + Strings.join((names && names.is$List_String()), ', ') + '>');
|
| - var key = Strings.join((names && names.is$List_String()), '\$');
|
| + var jsname = ('' + this.get$jsname() + '_' + Strings.join((jsnames == null ? null : jsnames.assert$List_String()), '\$'));
|
| + var simpleName = ('' + this.name + '<' + Strings.join((names == null ? null : names.assert$List_String()), ', ') + '>');
|
| + var key = Strings.join((names == null ? null : names.assert$List_String()), '\$');
|
| var ret = this._concreteTypes.$index(key);
|
| if ($notnull_bool(ret == null)) {
|
| ret = new ConcreteType($assert_String(simpleName), this, typeMap, typeArgs);
|
| ret._jsname = $assert_String(jsname);
|
| this._concreteTypes.$setindex(key, ret);
|
| }
|
| - return (ret && ret.is$lang_Type());
|
| + return (ret == null ? null : ret.assert$lang_Type());
|
| }
|
| DefinedType.prototype.getCallStub = function(args) {
|
| $assert(this.get$isFunction(), "isFunction", "type.dart", 1184, 12);
|
| var name = _getCallStubName('call', args);
|
| - if (this.varStubs == null) this.varStubs = $map([]);
|
| var stub = this.varStubs.$index(name);
|
| if ($notnull_bool(stub == null)) {
|
| stub = new VarFunctionStub($assert_String(name), args);
|
| this.varStubs.$setindex(name, stub);
|
| }
|
| - return (stub && stub.is$VarFunctionStub());
|
| + return (stub == null ? null : stub.assert$VarFunctionStub());
|
| }
|
| DefinedType.prototype.addDirectSubtype$1 = function($0) {
|
| - return this.addDirectSubtype(($0 && $0.is$lang_Type()));
|
| + return this.addDirectSubtype(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| DefinedType.prototype.addMethod$2 = function($0, $1) {
|
| - return this.addMethod($assert_String($0), ($1 && $1.is$FunctionDefinition()));
|
| + return this.addMethod($assert_String($0), ($1 == null ? null : $1.assert$FunctionDefinition()));
|
| };
|
| DefinedType.prototype.getConstructor$1 = function($0) {
|
| return this.getConstructor($assert_String($0));
|
| };
|
| DefinedType.prototype.getFactory$2 = function($0, $1) {
|
| - return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1));
|
| + return this.getFactory(($0 == null ? null : $0.assert$lang_Type()), $assert_String($1));
|
| };
|
| DefinedType.prototype.getMember$1 = function($0) {
|
| return this.getMember($assert_String($0));
|
| };
|
| DefinedType.prototype.getOrMakeConcreteType$1 = function($0) {
|
| - return this.getOrMakeConcreteType(($0 && $0.is$List_Type()));
|
| + return this.getOrMakeConcreteType(($0 == null ? null : $0.assert$List_Type()));
|
| };
|
| DefinedType.prototype.isString$0 = function() {
|
| return this.get$isString()();
|
| @@ -22348,10 +22759,10 @@ DefinedType.prototype.isString$0 = function() {
|
| DefinedType.prototype.markUsed$0 = DefinedType.prototype.markUsed;
|
| DefinedType.prototype.resolve$0 = DefinedType.prototype.resolve;
|
| DefinedType.prototype.resolveTypeParams$1 = function($0) {
|
| - return this.resolveTypeParams(($0 && $0.is$ConcreteType()));
|
| + return this.resolveTypeParams(($0 == null ? null : $0.assert$ConcreteType()));
|
| };
|
| DefinedType.prototype.setDefinition$1 = function($0) {
|
| - return this.setDefinition(($0 && $0.is$Definition()));
|
| + return this.setDefinition(($0 == null ? null : $0.assert$Definition()));
|
| };
|
| // ********** Code for NativeType **************
|
| function NativeType(spec) {
|
| @@ -22375,10 +22786,10 @@ function FixedCollection(value, length) {
|
| this.length = length;
|
| // Initializers done
|
| }
|
| -FixedCollection.prototype.is$Collection_E = function(){return this;};
|
| -FixedCollection.prototype.is$Collection_Object = function(){return this;};
|
| -FixedCollection.prototype.is$Collection_Type = function(){return this;};
|
| -FixedCollection.prototype.is$Iterable = function(){return this;};
|
| +FixedCollection.prototype.assert$Collection_E = function(){return this};
|
| +FixedCollection.prototype.assert$Collection_Object = function(){return this};
|
| +FixedCollection.prototype.assert$Collection_Type = function(){return this};
|
| +FixedCollection.prototype.assert$Iterable = function(){return this};
|
| FixedCollection.prototype.get$value = function() { return this.value; };
|
| FixedCollection.prototype.iterator = function() {
|
| return new FixedIterator_E(this.value, this.length);
|
| @@ -22419,10 +22830,10 @@ function FixedCollection_lang_Type(value, length) {
|
| // Initializers done
|
| }
|
| $inherits(FixedCollection_lang_Type, FixedCollection);
|
| -FixedCollection_lang_Type.prototype.is$Collection_E = function(){return this;};
|
| -FixedCollection_lang_Type.prototype.is$Collection_Object = function(){return this;};
|
| -FixedCollection_lang_Type.prototype.is$Collection_Type = function(){return this;};
|
| -FixedCollection_lang_Type.prototype.is$Iterable = function(){return this;};
|
| +FixedCollection_lang_Type.prototype.assert$Collection_E = function(){return this};
|
| +FixedCollection_lang_Type.prototype.assert$Collection_Object = function(){return this};
|
| +FixedCollection_lang_Type.prototype.assert$Collection_Type = function(){return this};
|
| +FixedCollection_lang_Type.prototype.assert$Iterable = function(){return this};
|
| // ********** Code for FixedIterator **************
|
| function FixedIterator(value, length) {
|
| this._index = 0
|
| @@ -22430,7 +22841,7 @@ function FixedIterator(value, length) {
|
| this.length = length;
|
| // Initializers done
|
| }
|
| -FixedIterator.prototype.is$Iterator_T = function(){return this;};
|
| +FixedIterator.prototype.assert$Iterator_T = function(){return this};
|
| FixedIterator.prototype.get$value = function() { return this.value; };
|
| FixedIterator.prototype.hasNext = function() {
|
| return this._index < this.length;
|
| @@ -22449,7 +22860,7 @@ function FixedIterator_E(value, length) {
|
| // Initializers done
|
| }
|
| $inherits(FixedIterator_E, FixedIterator);
|
| -FixedIterator_E.prototype.is$Iterator_T = function(){return this;};
|
| +FixedIterator_E.prototype.assert$Iterator_T = function(){return this};
|
| // ********** Code for Value **************
|
| function Value(type, code, span, needsTemp) {
|
| this.isSuper = false
|
| @@ -22475,7 +22886,7 @@ Value.type$ctor = function(type, span) {
|
| if (this.type == null) $globals.world.internalError('type passed as null', this.span);
|
| }
|
| Value.type$ctor.prototype = Value.prototype;
|
| -Value.prototype.is$Value = function(){return this;};
|
| +Value.prototype.assert$Value = function(){return this};
|
| Value.prototype.get$type = function() { return this.type; };
|
| Value.prototype.set$type = function(value) { return this.type = value; };
|
| Value.prototype.get$code = function() { return this.code; };
|
| @@ -22503,7 +22914,7 @@ Value.prototype.get_ = function(context, name, node) {
|
| var $0;
|
| var member = this._resolveMember(context, name, node, false);
|
| if ($notnull_bool($ne(member, null))) {
|
| - return (($0 = member._get$3(context, node, this)) && $0.is$Value());
|
| + return (($0 = member._get$3(context, node, this)) == null ? null : $0.assert$Value());
|
| }
|
| else {
|
| return this.invokeNoSuchMethod(context, ('get:' + name), node);
|
| @@ -22541,7 +22952,7 @@ Value.prototype.invoke = function(context, name, node, args, isDynamic) {
|
| return this.invokeNoSuchMethod(context, name, node, args);
|
| }
|
| else {
|
| - return (($0 = member.invoke$5(context, node, this, args, isDynamic)) && $0.is$Value());
|
| + return (($0 = member.invoke$5(context, node, this, args, isDynamic)) == null ? null : $0.assert$Value());
|
| }
|
| }
|
| Value.prototype.canInvoke = function(context, name, args) {
|
| @@ -22646,7 +23057,7 @@ Value.prototype.convertTo = function(context, toType, node, isDynamic) {
|
| if ($notnull_bool(myCall == null) || $notnull_bool($ne(myCall.get$parameters().length, arity))) {
|
| var stub = $globals.world.functionType.getCallStub(Arguments.Arguments$bare$factory(arity));
|
| var val = new Value(toType, ('to\$' + stub.name + '(' + this.code + ')'), node.span, true);
|
| - return (($0 = $notnull_bool(this._isDomCallback(toType)) && !$notnull_bool(this._isDomCallback(this.type)) ? val._wrapDomCallback(toType, arity) : val) && $0.is$Value());
|
| + return (($0 = $notnull_bool(this._isDomCallback(toType)) && !$notnull_bool(this._isDomCallback(this.type)) ? val._wrapDomCallback(toType, arity) : val) == null ? null : $0.assert$Value());
|
| }
|
| else if ($notnull_bool(this._isDomCallback(toType)) && !$notnull_bool(this._isDomCallback(this.type))) {
|
| return this._wrapDomCallback(toType, arity);
|
| @@ -22664,7 +23075,7 @@ Value.prototype.convertTo = function(context, toType, node, isDynamic) {
|
| this.convertWarning(toType, node);
|
| }
|
| if ($notnull_bool($globals.options.enableTypeChecks)) {
|
| - return this._typeAssert(context, toType, node);
|
| + return this._typeAssert(context, toType, node, isDynamic);
|
| }
|
| else {
|
| return this;
|
| @@ -22682,23 +23093,26 @@ Value.prototype._wrapDomCallback = function(toType, arity) {
|
| }
|
| return new Value(toType, ('\$wrap_call\$' + arity + '(' + this.code + ')'), this.span, true);
|
| }
|
| -Value.prototype._typeAssert = function(context, toType, node) {
|
| +Value.prototype._typeAssert = function(context, toType, node, isDynamic) {
|
| if ((toType instanceof ParameterType)) {
|
| - var p = (toType && toType.is$ParameterType());
|
| + var p = (toType == null ? null : toType.assert$ParameterType());
|
| toType = p.extendsType;
|
| }
|
| - if (toType.getCallMethod() != null || $eq(toType.get$library(), $globals.world.get$dom())) {
|
| - return this;
|
| - }
|
| if ($notnull_bool(toType.get$isObject()) || $notnull_bool(toType.get$isVar())) {
|
| $globals.world.internalError(('We thought ' + this.type.name + ' is not a subtype of ' + toType.name + '?'));
|
| }
|
| + var typeError = $globals.world.corelib.types.$index('TypeError');
|
| + var typeErrorCtor = typeError.getConstructor$1('_internal');
|
| + $globals.world.gen.corejs.ensureTypeNameOf();
|
| + var result = typeErrorCtor.invoke$5(context, node, new Value.type$ctor(typeError, null), new Arguments(null, [new Value($globals.world.objectType, 'this', null, true), new Value($globals.world.stringType, ('"' + toType.name + '"'), null, true)]), isDynamic);
|
| + $globals.world.gen.corejs.useThrow = true;
|
| + var throwTypeError = ('\$throw(' + result.get$code() + ')');
|
| if ($notnull_bool(toType.get$isNum())) toType = $globals.world.numType;
|
| var check;
|
| if ($notnull_bool(toType.get$isVoid())) {
|
| check = ('\$assert_void(' + this.code + ')');
|
| if (toType.typeCheckCode == null) {
|
| - toType.typeCheckCode = "function $assert_void(x) {\n return x == null ? x : x.is$void(); // throws TypeError\n}";
|
| + toType.typeCheckCode = ("function $assert_void(x) {\n if (x == null) return null;\n " + throwTypeError + "\n}");
|
| }
|
| }
|
| else if ($eq(toType, $globals.world.nonNullBool)) {
|
| @@ -22708,15 +23122,19 @@ Value.prototype._typeAssert = function(context, toType, node) {
|
| else if ($notnull_bool(toType.get$library().get$isCore()) && toType.get$typeofName() != null) {
|
| check = ('\$assert_' + toType.name + '(' + this.code + ')');
|
| if (toType.typeCheckCode == null) {
|
| - toType.typeCheckCode = ("function $assert_" + toType.name + "(x) {\n if (x == null || typeof(x) == \"" + toType.get$typeofName() + "\") return x;\n throw new TypeError(\"'\" + x + \"' is not a " + toType.name + ".\");\n}");
|
| + toType.typeCheckCode = ("function $assert_" + toType.name + "(x) {\n if (x == null || typeof(x) == \"" + toType.get$typeofName() + "\") return x;\n " + throwTypeError + "\n}");
|
| }
|
| }
|
| else {
|
| - toType.isTested = true;
|
| + toType.isChecked = true;
|
| + var checkName = 'assert\$' + toType.get$jsname();
|
| var temp = context.getTemp(this);
|
| - check = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&');
|
| - check = check + (' ' + temp.get$code() + '.is\$' + toType.get$jsname() + '())');
|
| - if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value()));
|
| + check = ('(' + context.assignTemp((temp == null ? null : temp.assert$Value()), this).code + ' == null ? null :');
|
| + check = check + (' ' + temp.get$code() + '.' + checkName + '())');
|
| + if ($ne(this, temp)) context.freeTemp((temp == null ? null : temp.assert$Value()));
|
| + if (!$globals.world.objectType.varStubs.containsKey(checkName)) {
|
| + $globals.world.objectType.varStubs.$setindex(checkName, new VarMethodStub(checkName, null, Arguments.get$EMPTY(), throwTypeError));
|
| + }
|
| }
|
| return new Value(toType, check, this.span, true);
|
| }
|
| @@ -22739,7 +23157,7 @@ Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck)
|
| testCode = ("(typeof(" + this.code + ") " + ($notnull_bool(isTrue) ? '==' : '!=') + " '" + typeofName + "')");
|
| }
|
| }
|
| - if ($notnull_bool(toType.get$isClass()) && !(toType instanceof ConcreteType)) {
|
| + if ($notnull_bool(toType.get$isClass()) && !(toType instanceof ConcreteType) && !$notnull_bool(toType.get$isHiddenNativeType())) {
|
| toType.markUsed();
|
| testCode = ('(' + this.code + ' instanceof ' + toType.get$jsname() + ')');
|
| if (!$notnull_bool(isTrue)) {
|
| @@ -22749,15 +23167,19 @@ Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck)
|
| if (testCode == null) {
|
| toType.isTested = true;
|
| var temp = context.getTemp(this);
|
| - testCode = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&');
|
| - testCode = testCode + (' ' + temp.get$code() + '.is\$' + toType.get$jsname() + ')');
|
| + var checkName = ('is\$' + toType.get$jsname());
|
| + testCode = ('(' + context.assignTemp((temp == null ? null : temp.assert$Value()), this).code + ' &&');
|
| + testCode = testCode + (' ' + temp.get$code() + '.' + checkName + '())');
|
| if ($notnull_bool(isTrue)) {
|
| testCode = '!!' + testCode;
|
| }
|
| else {
|
| testCode = '!' + testCode;
|
| }
|
| - if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value()));
|
| + if ($ne(this, temp)) context.freeTemp((temp == null ? null : temp.assert$Value()));
|
| + if (!$globals.world.objectType.varStubs.containsKey(checkName)) {
|
| + $globals.world.objectType.varStubs.$setindex(checkName, new VarMethodStub(checkName, null, Arguments.get$EMPTY(), 'return false'));
|
| + }
|
| }
|
| return new Value($globals.world.nonNullBool, testCode, span, true);
|
| }
|
| @@ -22773,14 +23195,14 @@ Value.prototype.invokeNoSuchMethod = function(context, name, node, args) {
|
| i < args.get$length(); i++) {
|
| argsCode.add$1(args.values.$index(i).get$code());
|
| }
|
| - pos = Strings.join((argsCode && argsCode.is$List_String()), ", ");
|
| + pos = Strings.join((argsCode == null ? null : argsCode.assert$List_String()), ", ");
|
| }
|
| var noSuchArgs = [new Value($globals.world.stringType, ('"' + name + '"'), node.span, true), new Value($globals.world.listType, ('[' + pos + ']'), node.span, true)];
|
| - return (($0 = this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(context, node, this, new Arguments(null, noSuchArgs))) && $0.is$Value());
|
| + return (($0 = this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(context, node, this, new Arguments(null, noSuchArgs))) == null ? null : $0.assert$Value());
|
| }
|
| Value.prototype.invokeSpecial = function(name, args, returnType) {
|
| - $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 496, 12);
|
| - $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 497, 12);
|
| + $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 519, 12);
|
| + $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 520, 12);
|
| var argsString = args.getCode();
|
| if (name == '\$index' || name == '\$setindex') {
|
| return new Value(returnType, ('' + this.code + '.' + name + '(' + argsString + ')'), this.span, true);
|
| @@ -22792,37 +23214,37 @@ Value.prototype.invokeSpecial = function(name, args, returnType) {
|
| }
|
| }
|
| Value.prototype.checkFirstClass$1 = function($0) {
|
| - return this.checkFirstClass(($0 && $0.is$SourceSpan()));
|
| + return this.checkFirstClass(($0 == null ? null : $0.assert$SourceSpan()));
|
| };
|
| Value.prototype.convertTo$3 = function($0, $1, $2) {
|
| - return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$lang_Node()), false);
|
| + return this.convertTo(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Type()), ($2 == null ? null : $2.assert$lang_Node()), false);
|
| };
|
| Value.prototype.convertTo$4 = function($0, $1, $2, $3) {
|
| - return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$lang_Node()), $assert_bool($3));
|
| + return this.convertTo(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Type()), ($2 == null ? null : $2.assert$lang_Node()), $assert_bool($3));
|
| };
|
| Value.prototype.get_$3 = function($0, $1, $2) {
|
| - return this.get_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()));
|
| + return this.get_(($0 == null ? null : $0.assert$MethodGenerator()), $assert_String($1), ($2 == null ? null : $2.assert$lang_Node()));
|
| };
|
| Value.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, forceCheck) {
|
| - return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$SourceSpan()), $assert_bool(isTrue), $assert_bool(forceCheck));
|
| + return this.instanceOf(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Type()), ($2 == null ? null : $2.assert$SourceSpan()), $assert_bool(isTrue), $assert_bool(forceCheck));
|
| };
|
| Value.prototype.instanceOf$4 = function($0, $1, $2, $3) {
|
| - return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$SourceSpan()), $assert_bool($3), false);
|
| + return this.instanceOf(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Type()), ($2 == null ? null : $2.assert$SourceSpan()), $assert_bool($3), false);
|
| };
|
| Value.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), false);
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), $assert_String($1), ($2 == null ? null : $2.assert$lang_Node()), ($3 == null ? null : $3.assert$Arguments()), false);
|
| };
|
| Value.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), $assert_String($1), ($2 == null ? null : $2.assert$lang_Node()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool(isDynamic));
|
| };
|
| Value.prototype.invoke$5 = function($0, $1, $2, $3, $4) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool($4));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), $assert_String($1), ($2 == null ? null : $2.assert$lang_Node()), ($3 == null ? null : $3.assert$Arguments()), $assert_bool($4));
|
| };
|
| Value.prototype.needsConversion$1 = function($0) {
|
| - return this.needsConversion(($0 && $0.is$lang_Type()));
|
| + return this.needsConversion(($0 == null ? null : $0.assert$lang_Type()));
|
| };
|
| Value.prototype.set_$4 = function($0, $1, $2, $3) {
|
| - return this.set_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Value()), false);
|
| + return this.set_(($0 == null ? null : $0.assert$MethodGenerator()), $assert_String($1), ($2 == null ? null : $2.assert$lang_Node()), ($3 == null ? null : $3.assert$Value()), false);
|
| };
|
| // ********** Code for EvaluatedValue **************
|
| function EvaluatedValue() {}
|
| @@ -22852,7 +23274,7 @@ function ConstListValue() {}
|
| ConstListValue._internal$ctor = function(type, values, actualValue, canonicalCode, span, code) {
|
| this.values = values;
|
| // Initializers done
|
| - EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code));
|
| + EvaluatedValue._internal$ctor.call(this, (type == null ? null : type.assert$lang_Type()), actualValue, canonicalCode, (span == null ? null : span.assert$SourceSpan()), $assert_String(code));
|
| }
|
| ConstListValue._internal$ctor.prototype = ConstListValue.prototype;
|
| $inherits(ConstListValue, EvaluatedValue);
|
| @@ -22866,7 +23288,7 @@ function ConstMapValue() {}
|
| ConstMapValue._internal$ctor = function(type, values, actualValue, canonicalCode, span, code) {
|
| this.values = values;
|
| // Initializers done
|
| - EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code));
|
| + EvaluatedValue._internal$ctor.call(this, (type == null ? null : type.assert$lang_Type()), actualValue, canonicalCode, (span == null ? null : span.assert$SourceSpan()), $assert_String(code));
|
| }
|
| ConstMapValue._internal$ctor.prototype = ConstMapValue.prototype;
|
| $inherits(ConstMapValue, EvaluatedValue);
|
| @@ -22885,7 +23307,7 @@ function ConstObjectValue() {}
|
| ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalCode, span, code) {
|
| this.fields = fields;
|
| // Initializers done
|
| - EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code));
|
| + EvaluatedValue._internal$ctor.call(this, (type == null ? null : type.assert$lang_Type()), actualValue, canonicalCode, (span == null ? null : span.assert$SourceSpan()), $assert_String(code));
|
| }
|
| ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype;
|
| $inherits(ConstObjectValue, EvaluatedValue);
|
| @@ -22918,12 +23340,12 @@ function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span,
|
| for (var $i = 0;$i < _dependencies.length; $i++) {
|
| var dep = _dependencies.$index($i);
|
| this.dependencies.add(dep);
|
| - this.dependencies.addAll((($0 = dep.get$dependencies()) && $0.is$Collection_E()));
|
| + this.dependencies.addAll((($0 = dep.get$dependencies()) == null ? null : $0.assert$Collection_E()));
|
| }
|
| }
|
| $inherits(GlobalValue, Value);
|
| -GlobalValue.prototype.is$GlobalValue = function(){return this;};
|
| -GlobalValue.prototype.is$Comparable = function(){return this;};
|
| +GlobalValue.prototype.assert$GlobalValue = function(){return this};
|
| +GlobalValue.prototype.assert$Comparable = function(){return this};
|
| GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies) {
|
| var $0;
|
| var code = ($notnull_bool(exp.get$isConst()) ? exp.get$canonicalCode() : exp.code);
|
| @@ -22931,7 +23353,7 @@ GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies)
|
| return new GlobalValue(exp.type, $assert_String(codeWithComment), $assert_bool(field.get$isFinal()), field, null, exp, code, exp.span, (($0 = dependencies.filter$1((function (d) {
|
| return (d instanceof GlobalValue);
|
| })
|
| - )) && $0.is$List_GlobalValue()));
|
| + )) == null ? null : $0.assert$List_GlobalValue()));
|
| }
|
| GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies) {
|
| var $0;
|
| @@ -22940,7 +23362,7 @@ GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies
|
| return new GlobalValue(exp.type, $assert_String(codeWithComment), true, null, name, exp, name, exp.span, (($0 = dependencies.filter$1((function (d) {
|
| return (d instanceof GlobalValue);
|
| })
|
| - )) && $0.is$List_GlobalValue()));
|
| + )) == null ? null : $0.assert$List_GlobalValue()));
|
| }
|
| GlobalValue.prototype.get$field = function() { return this.field; };
|
| GlobalValue.prototype.set$field = function(value) { return this.field = value; };
|
| @@ -22988,7 +23410,7 @@ GlobalValue.prototype.compareTo = function(other) {
|
| }
|
| }
|
| GlobalValue.prototype.compareTo$1 = function($0) {
|
| - return this.compareTo(($0 && $0.is$GlobalValue()));
|
| + return this.compareTo(($0 == null ? null : $0.assert$GlobalValue()));
|
| };
|
| // ********** Code for BareValue **************
|
| function BareValue(home, outermost, span) {
|
| @@ -23008,7 +23430,7 @@ BareValue.prototype._ensureCode = function() {
|
| }
|
| }
|
| BareValue.prototype._tryResolveMember = function(context, name) {
|
| - $assert($eq(context, this.home), "context == home", "value.dart", 717, 12);
|
| + $assert($eq(context, this.home), "context == home", "value.dart", 740, 12);
|
| var member = this.type.resolveMember(name);
|
| if ($notnull_bool($ne(member, null))) {
|
| this._ensureCode();
|
| @@ -23053,11 +23475,11 @@ function World(files) {
|
| }
|
| World.prototype.get$coreimpl = function() {
|
| var $0;
|
| - return (($0 = this.libraries.$index('dart:coreimpl')) && $0.is$Library());
|
| + return (($0 = this.libraries.$index('dart:coreimpl')) == null ? null : $0.assert$Library());
|
| }
|
| World.prototype.get$dom = function() {
|
| var $0;
|
| - return (($0 = this.libraries.$index('dart:dom')) && $0.is$Library());
|
| + return (($0 = this.libraries.$index('dart:dom')) == null ? null : $0.assert$Library());
|
| }
|
| World.prototype.get$dynamicType = function() { return this.dynamicType; };
|
| World.prototype.set$dynamicType = function(value) { return this.dynamicType = value; };
|
| @@ -23068,18 +23490,18 @@ World.prototype.init = function() {
|
| this.corelib = new Library(this.readFile('dart:core'));
|
| this.libraries.$setindex('dart:core', this.corelib);
|
| this._todo.add(this.corelib);
|
| - this.voidType = (($0 = this._addToCoreLib('void', false)) && $0.is$DefinedType());
|
| - this.dynamicType = (($0 = this._addToCoreLib('Dynamic', false)) && $0.is$DefinedType());
|
| + this.voidType = (($0 = this._addToCoreLib('void', false)) == null ? null : $0.assert$DefinedType());
|
| + this.dynamicType = (($0 = this._addToCoreLib('Dynamic', false)) == null ? null : $0.assert$DefinedType());
|
| this.varType = this.dynamicType;
|
| - this.objectType = (($0 = this._addToCoreLib('Object', true)) && $0.is$DefinedType());
|
| - this.numType = (($0 = this._addToCoreLib('num', false)) && $0.is$DefinedType());
|
| - this.intType = (($0 = this._addToCoreLib('int', false)) && $0.is$DefinedType());
|
| - this.doubleType = (($0 = this._addToCoreLib('double', false)) && $0.is$DefinedType());
|
| - this.boolType = (($0 = this._addToCoreLib('bool', false)) && $0.is$DefinedType());
|
| - this.stringType = (($0 = this._addToCoreLib('String', false)) && $0.is$DefinedType());
|
| - this.listType = (($0 = this._addToCoreLib('List', false)) && $0.is$DefinedType());
|
| - this.mapType = (($0 = this._addToCoreLib('Map', false)) && $0.is$DefinedType());
|
| - this.functionType = (($0 = this._addToCoreLib('Function', false)) && $0.is$DefinedType());
|
| + this.objectType = (($0 = this._addToCoreLib('Object', true)) == null ? null : $0.assert$DefinedType());
|
| + this.numType = (($0 = this._addToCoreLib('num', false)) == null ? null : $0.assert$DefinedType());
|
| + this.intType = (($0 = this._addToCoreLib('int', false)) == null ? null : $0.assert$DefinedType());
|
| + this.doubleType = (($0 = this._addToCoreLib('double', false)) == null ? null : $0.assert$DefinedType());
|
| + this.boolType = (($0 = this._addToCoreLib('bool', false)) == null ? null : $0.assert$DefinedType());
|
| + this.stringType = (($0 = this._addToCoreLib('String', false)) == null ? null : $0.assert$DefinedType());
|
| + this.listType = (($0 = this._addToCoreLib('List', false)) == null ? null : $0.assert$DefinedType());
|
| + this.mapType = (($0 = this._addToCoreLib('Map', false)) == null ? null : $0.assert$DefinedType());
|
| + this.functionType = (($0 = this._addToCoreLib('Function', false)) == null ? null : $0.assert$DefinedType());
|
| this.nonNullBool = new NonNullableType(this.boolType);
|
| }
|
| World.prototype._addMember = function(member) {
|
| @@ -23109,7 +23531,7 @@ World.prototype._addTopName = function(named) {
|
| }
|
| else {
|
| this._topNames.$setindex(named.get$jsname(), named);
|
| - this._addJavascriptTopName((existing && existing.is$lang_Element()));
|
| + this._addJavascriptTopName((existing == null ? null : existing.assert$lang_Element()));
|
| }
|
| }
|
| else if ($notnull_bool(named.get$library().get$isCore())) {
|
| @@ -23118,7 +23540,7 @@ World.prototype._addTopName = function(named) {
|
| }
|
| else {
|
| this._topNames.$setindex(named.get$jsname(), named);
|
| - this._addJavascriptTopName((existing && existing.is$lang_Element()));
|
| + this._addJavascriptTopName((existing == null ? null : existing.assert$lang_Element()));
|
| }
|
| }
|
| else {
|
| @@ -23210,7 +23632,7 @@ World.prototype.runCompilationPhases = function() {
|
| for (var $i = mainMembers.get$members().iterator$0(); $i.hasNext$0(); ) {
|
| var m = $i.next$0();
|
| main = m;
|
| - $this.error('more than one main member (using last?)', (($0 = main.get$span()) && $0.is$SourceSpan()));
|
| + $this.error('more than one main member (using last?)', (($0 = main.get$span()) == null ? null : $0.assert$SourceSpan()));
|
| }
|
| }
|
| else {
|
| @@ -23245,7 +23667,7 @@ World.prototype.readFile = function(filename) {
|
| }
|
| World.prototype.getOrAddLibrary = function(filename) {
|
| var $0;
|
| - var library = (($0 = this.libraries.$index(filename)) && $0.is$Library());
|
| + var library = (($0 = this.libraries.$index(filename)) == null ? null : $0.assert$Library());
|
| if (library == null) {
|
| library = new Library(this.readFile(filename));
|
| this.info(('read library ' + filename));
|
| @@ -23453,7 +23875,7 @@ function FrogOptions(homedir, args, files) {
|
|
|
| if ($notnull_bool(arg.endsWith$1('.dart'))) {
|
| this.dartScript = $assert_String(arg);
|
| - this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) && $0.is$List_String());
|
| + this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) == null ? null : $0.assert$List_String());
|
| break loop;
|
| }
|
| else if ($notnull_bool(arg.startsWith$1('--out='))) {
|
| @@ -23504,7 +23926,7 @@ function VarMember(name) {
|
| this.name = name;
|
| // Initializers done
|
| }
|
| -VarMember.prototype.is$VarMember = function(){return this;};
|
| +VarMember.prototype.assert$VarMember = function(){return this};
|
| VarMember.prototype.get$name = function() { return this.name; };
|
| VarMember.prototype.get$returnType = function() {
|
| return $globals.world.varType;
|
| @@ -23513,10 +23935,10 @@ VarMember.prototype.invoke = function(context, node, target, args) {
|
| return new Value(this.get$returnType(), ('' + target.code + '.' + this.name + '(' + args.getCode() + ')'), node.span, true);
|
| }
|
| VarMember.prototype.generate$1 = function($0) {
|
| - return this.generate(($0 && $0.is$CodeWriter()));
|
| + return this.generate(($0 == null ? null : $0.assert$CodeWriter()));
|
| };
|
| VarMember.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()));
|
| };
|
| // ********** Code for VarFunctionStub **************
|
| function VarFunctionStub(name, callArgs) {
|
| @@ -23526,7 +23948,7 @@ function VarFunctionStub(name, callArgs) {
|
| $globals.world.gen.corejs.useGenStub = true;
|
| }
|
| $inherits(VarFunctionStub, VarMember);
|
| -VarFunctionStub.prototype.is$VarFunctionStub = function(){return this;};
|
| +VarFunctionStub.prototype.assert$VarFunctionStub = function(){return this};
|
| VarFunctionStub.prototype.generate = function(code) {
|
| if ($notnull_bool(this.args.get$hasNames())) {
|
| this.generateNamed(code);
|
| @@ -23557,7 +23979,7 @@ VarFunctionStub.prototype.generateNamed = function(w) {
|
| w.exitBlock('}');
|
| }
|
| VarFunctionStub.prototype.generate$1 = function($0) {
|
| - return this.generate(($0 && $0.is$CodeWriter()));
|
| + return this.generate(($0 == null ? null : $0.assert$CodeWriter()));
|
| };
|
| // ********** Code for VarMethodStub **************
|
| function VarMethodStub(name, member, args, body) {
|
| @@ -23569,30 +23991,51 @@ function VarMethodStub(name, member, args, body) {
|
| }
|
| $inherits(VarMethodStub, VarMember);
|
| VarMethodStub.prototype.get$body = function() { return this.body; };
|
| +VarMethodStub.prototype.get$isHidden = function() {
|
| + return $assert_bool(this.member != null ? this.member.declaringType.get$isHiddenNativeType() : false);
|
| +}
|
| VarMethodStub.prototype.get$returnType = function() {
|
| var $0;
|
| - return (($0 = this.member != null ? this.member.get$returnType() : $globals.world.varType) && $0.is$lang_Type());
|
| + return (($0 = this.member != null ? this.member.get$returnType() : $globals.world.varType) == null ? null : $0.assert$lang_Type());
|
| }
|
| -VarMethodStub.prototype.get$typeName = function() {
|
| - return this.member != null ? this.member.declaringType.get$jsname() : 'Object';
|
| +VarMethodStub.prototype.get$declaringType = function() {
|
| + var $0;
|
| + return (($0 = this.member != null ? this.member.declaringType : $globals.world.objectType) == null ? null : $0.assert$lang_Type());
|
| }
|
| VarMethodStub.prototype.generate = function(code) {
|
| - code.write(('' + this.get$typeName() + '.prototype.' + this.name + ' = '));
|
| - this.generateBody(code, ';');
|
| -}
|
| -VarMethodStub.prototype.generateBody = function(code, end) {
|
| - if ($notnull_bool(this._useDirectCall(this.member, this.args))) {
|
| - code.writeln(('' + this.get$typeName() + '.prototype.' + this.member.get$jsname() + end));
|
| + code.write($globals.world.gen._prototypeOf(this.get$declaringType(), this.name) + ' = ');
|
| + if (!$notnull_bool(this.get$isHidden()) && $notnull_bool(this._useDirectCall(this.args))) {
|
| + code.writeln(('' + this.get$declaringType().get$jsname() + '.prototype.' + this.member.get$jsname() + ';'));
|
| + }
|
| + else if ($notnull_bool(this._needsExactTypeCheck())) {
|
| + code.enterBlock(('function(' + this.args.getCode() + ') {'));
|
| + code.enterBlock(('if (Object.getPrototypeOf(this).hasOwnProperty("' + this.name + '")) {'));
|
| + code.writeln(('' + this.body + ';'));
|
| + code.exitBlock('}');
|
| + var argsCode = this.args.getCode();
|
| + if (argsCode != '') argsCode = ', ' + argsCode;
|
| + code.writeln(('return Object.prototype.' + this.name + '.call(this' + argsCode + ');'));
|
| + code.exitBlock('};');
|
| }
|
| else {
|
| code.enterBlock(('function(' + this.args.getCode() + ') {'));
|
| - code.writeln(('return ' + this.body.code + ';'));
|
| - code.exitBlock(('}' + end));
|
| + code.writeln(('' + this.body + ';'));
|
| + code.exitBlock('};');
|
| }
|
| }
|
| -VarMethodStub.prototype._useDirectCall = function(member, args) {
|
| - if ((member instanceof MethodMember) && !$notnull_bool(member.declaringType.get$isHiddenNativeType()) && !$notnull_bool(member.declaringType.get$hasNativeSubtypes())) {
|
| - var method = (member && member.is$MethodMember());
|
| +VarMethodStub.prototype._needsExactTypeCheck = function() {
|
| + var $this = this; // closure support
|
| + if (this.member == null || $notnull_bool(this.member.declaringType.get$isObject())) return false;
|
| + var members = this.member.declaringType.resolveMember(this.member.name).members;
|
| + return members.filter$1((function (m) {
|
| + return $notnull_bool($ne(m, $this.member)) && $notnull_bool(m.get$declaringType().get$isHiddenNativeType());
|
| + })
|
| + ).length >= 1;
|
| +}
|
| +VarMethodStub.prototype._useDirectCall = function(args) {
|
| + var $0;
|
| + if ((this.member instanceof MethodMember) && !$notnull_bool(this.member.declaringType.get$hasNativeSubtypes())) {
|
| + var method = (($0 = this.member) == null ? null : $0.assert$MethodMember());
|
| if ($notnull_bool(method.needsArgumentConversion(args))) {
|
| return false;
|
| }
|
| @@ -23609,13 +24052,11 @@ VarMethodStub.prototype._useDirectCall = function(member, args) {
|
| }
|
| }
|
| VarMethodStub.prototype.generate$1 = function($0) {
|
| - return this.generate(($0 && $0.is$CodeWriter()));
|
| -};
|
| -VarMethodStub.prototype.generateBody$2 = function($0, $1) {
|
| - return this.generateBody(($0 && $0.is$CodeWriter()), $assert_String($1));
|
| + return this.generate(($0 == null ? null : $0.assert$CodeWriter()));
|
| };
|
| // ********** Code for VarMethodSet **************
|
| function VarMethodSet(name, members, callArgs, returnType) {
|
| + this.invoked = false
|
| this.members = members;
|
| this.returnType = returnType;
|
| this.args = callArgs.toCallStubArgs();
|
| @@ -23633,66 +24074,40 @@ VarMethodSet.prototype.invoke = function(context, node, target, args) {
|
| return VarMember.prototype.invoke.call(this, context, node, target, args);
|
| }
|
| VarMethodSet.prototype._invokeMembers = function(context, node) {
|
| - if (this._fallbackStubs != null) return;
|
| - var objectStub = null;
|
| - this._fallbackStubs = [];
|
| + if ($notnull_bool(this.invoked)) return;
|
| + this.invoked = true;
|
| + var hasObjectType = false;
|
| var $list = this.members;
|
| for (var $i = 0;$i < $list.length; $i++) {
|
| var member = $list.$index($i);
|
| - var target = new Value(member.get$declaringType(), 'this', node.span, true);
|
| - var result = member.invoke$4$isDynamic(context, node, target, this.args, true);
|
| - var stub = new VarMethodStub(this.name, member, this.args, result);
|
| var type = member.get$declaringType();
|
| - if ($notnull_bool(type.get$isObject())) {
|
| - objectStub = stub;
|
| - }
|
| - else if (!$notnull_bool(type.get$isHiddenNativeType())) {
|
| - VarMethodSet._addVarStub((type && type.is$lang_Type()), (stub && stub.is$VarMember()));
|
| - }
|
| - else {
|
| - this._fallbackStubs.add(stub);
|
| - }
|
| + var target = new Value(type, 'this', node.span, true);
|
| + var result = member.invoke$4$isDynamic(context, node, target, this.args, true);
|
| + var stub = new VarMethodStub(this.name, member, this.args, 'return ' + result.get$code());
|
| + type.get$varStubs().$setindex(stub.get$name(), stub);
|
| + if ($notnull_bool(type.get$isObject())) hasObjectType = true;
|
| }
|
| - if ($notnull_bool(objectStub == null)) {
|
| + if (!$notnull_bool(hasObjectType)) {
|
| var target = new Value($globals.world.objectType, 'this', node.span, true);
|
| var result = target.invokeNoSuchMethod(context, this.get$baseName(), node, this.args);
|
| - objectStub = new VarMethodStub(this.name, null, this.args, result);
|
| - }
|
| - if (this._fallbackStubs.length == 0) {
|
| - VarMethodSet._addVarStub($globals.world.objectType, (objectStub && objectStub.is$VarMember()));
|
| - }
|
| - else {
|
| - this._fallbackStubs.add(objectStub);
|
| - $globals.world.gen.corejs.useVarMethod = true;
|
| + var stub = new VarMethodStub(this.name, null, this.args, 'return ' + result.get$code());
|
| + $globals.world.objectType.varStubs.$setindex(stub.get$name(), stub);
|
| }
|
| }
|
| -VarMethodSet._addVarStub = function(type, stub) {
|
| - if (type.varStubs == null) type.varStubs = $map([]);
|
| - type.varStubs.$setindex(stub.name, stub);
|
| -}
|
| VarMethodSet.prototype.generate = function(code) {
|
| - if (this._fallbackStubs.length == 0) return;
|
| - code.enterBlock(('\$varMethod("' + this.name + '", {'));
|
| - var lastOne = this._fallbackStubs.last();
|
| - var $list = this._fallbackStubs;
|
| - for (var $i = 0;$i < $list.length; $i++) {
|
| - var stub = $list.$index($i);
|
| - code.write(('"' + stub.get$typeName() + '": '));
|
| - stub.generateBody$2(code, $notnull_bool($eq(stub, lastOne)) ? '' : ',');
|
| - }
|
| - code.exitBlock('});');
|
| +
|
| }
|
| VarMethodSet.prototype.generate$1 = function($0) {
|
| - return this.generate(($0 && $0.is$CodeWriter()));
|
| + return this.generate(($0 == null ? null : $0.assert$CodeWriter()));
|
| };
|
| VarMethodSet.prototype.invoke$4 = function($0, $1, $2, $3) {
|
| - return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()));
|
| + return this.invoke(($0 == null ? null : $0.assert$MethodGenerator()), ($1 == null ? null : $1.assert$lang_Node()), ($2 == null ? null : $2.assert$Value()), ($3 == null ? null : $3.assert$Arguments()));
|
| };
|
| // ********** Code for top level **************
|
| function map(source, mapper) {
|
| var result = new ListFactory();
|
| - if (!!(source && source.is$List)) {
|
| - var list = (source && source.is$List());
|
| + if (!!(source && source.is$List())) {
|
| + var list = (source == null ? null : source.assert$List());
|
| result.length = list.length;
|
| for (var i = 0;
|
| i < list.length; i++) {
|
| @@ -23720,7 +24135,7 @@ function reduce(source, callback, initialValue) {
|
| }
|
| function orderValuesByKeys(map) {
|
| var $0;
|
| - var keys = (($0 = map.getKeys()) && $0.is$List());
|
| + var keys = (($0 = map.getKeys()) == null ? null : $0.assert$List());
|
| keys.sort((function (x, y) {
|
| return x.compareTo$1(y);
|
| })
|
| @@ -23816,7 +24231,7 @@ function _getCallStubName(name, args) {
|
| function main() {
|
| var homedir = path.dirname(fs.realpathSync($assert_String(process.argv.$index(1))));
|
| var argv = ListFactory.ListFactory$from$factory(process.argv);
|
| - if ($notnull_bool(lang_compile($assert_String(homedir), (argv && argv.is$List_String()), new NodeFileSystem()))) {
|
| + if ($notnull_bool(lang_compile($assert_String(homedir), (argv == null ? null : argv.assert$List_String()), new NodeFileSystem()))) {
|
| var code = $globals.world.getGeneratedCode();
|
| if (!$notnull_bool($globals.options.compileOnly)) {
|
| process.argv = [argv.$index(0), argv.$index(1)];
|
|
|