Untitled diff

Created Diff never expires
28 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
623 lines
40 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
615 lines
// Generated by dart2js (full emitter, strong, trust primitives, omit checks), the Dart to JavaScript compiler version: 2.0.0-dev.60.0.
// Generated by dart2js (full emitter, strong, trust primitives, omit checks, lax runtime type), the Dart to JavaScript compiler version: 2.0.0-dev.68.0.
// The code supports the following hooks:
// The code supports the following hooks:
// dartPrint(message):
// dartPrint(message):
// if this function is defined it is called instead of the Dart [print]
// if this function is defined it is called instead of the Dart [print]
// method.
// method.
//
//
// dartMainRunner(main, args):
// dartMainRunner(main, args):
// if this function is defined, the Dart [main] method will not be invoked
// if this function is defined, the Dart [main] method will not be invoked
// directly. Instead, a closure that will invoke [main], and its arguments
// directly. Instead, a closure that will invoke [main], and its arguments
// [args] is passed to [dartMainRunner].
// [args] is passed to [dartMainRunner].
//
//
// dartDeferredLibraryLoader(uri, successCallback, errorCallback):
// dartDeferredLibraryLoader(uri, successCallback, errorCallback):
// if this function is defined, it will be called when a deferred library
// if this function is defined, it will be called when a deferred library
// is loaded. It should load and eval the javascript of `uri`, and call
// is loaded. It should load and eval the javascript of `uri`, and call
// successCallback. If it fails to do so, it should call errorCallback with
// successCallback. If it fails to do so, it should call errorCallback with
// an error.
// an error.
//
//
// defaultPackagesBase:
// defaultPackagesBase:
// Override the location where `package:` uris are resolved from. By default
// Override the location where `package:` uris are resolved from. By default
// they are resolved under "packages/" from the current window location.
// they are resolved under "packages/" from the current window location.
self.$dart_deferred_initializers$ = self.$dart_deferred_initializers$ || Object.create(null);
self.$dart_deferred_initializers$ = self.$dart_deferred_initializers$ || Object.create(null);
(function() {
(function() {
// /* ::norenaming:: */
// /* ::norenaming:: */
var supportsDirectProtoAccess = function() {
var supportsDirectProtoAccess = function() {
var cls = function() {
var cls = function() {
};
};
cls.prototype = {p: {}};
cls.prototype = {p: {}};
var object = new cls();
var object = new cls();
if (!(object.__proto__ && object.__proto__.p === cls.prototype.p))
if (!(object.__proto__ && object.__proto__.p === cls.prototype.p))
return false;
return false;
try {
try {
if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0)
if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0)
return true;
return true;
if (typeof version == "function" && version.length == 0) {
if (typeof version == "function" && version.length == 0) {
var v = version();
var v = version();
if (/^\d+\.\d+\.\d+\.\d+$/.test(v))
if (/^\d+\.\d+\.\d+\.\d+$/.test(v))
return true;
return true;
}
}
} catch (_) {
} catch (_) {
}
}
return false;
return false;
}();
}();
var $globals$ = Object.create(null);
var $globals$ = Object.create(null);
function map(x) {
function map(x) {
x = Object.create(null);
x = Object.create(null);
x.x = 0;
x.x = 0;
delete x.x;
delete x.x;
return x;
return x;
}
}
// The global objects start as so-called "slow objects". For V8, this
// The global objects start as so-called "slow objects". For V8, this
// means that it won't try to make map transitions as we add properties
// means that it won't try to make map transitions as we add properties
// to these objects. Later on, we attempt to turn these objects into
// to these objects. Later on, we attempt to turn these objects into
// fast objects by calling "convertToFastObject" (see
// fast objects by calling "convertToFastObject" (see
// [emitConvertToFastObjectFunction]).
// [emitConvertToFastObjectFunction]).
var A = $globals$.A = map();
var A = $globals$.A = map();
var B = $globals$.B = map();
var B = $globals$.B = map();
var C = $globals$.C = map();
var C = $globals$.C = map();
var D = $globals$.D = map();
var D = $globals$.D = map();
var E = $globals$.E = map();
var E = $globals$.E = map();
var F = $globals$.F = map();
var F = $globals$.F = map();
var G = $globals$.G = map();
var G = $globals$.G = map();
var H = $globals$.H = map();
var H = $globals$.H = map();
var J = $globals$.J = map();
var J = $globals$.J = map();
var K = $globals$.K = map();
var K = $globals$.K = map();
var L = $globals$.L = map();
var L = $globals$.L = map();
var M = $globals$.M = map();
var M = $globals$.M = map();
var N = $globals$.N = map();
var N = $globals$.N = map();
var O = $globals$.O = map();
var O = $globals$.O = map();
var P = $globals$.P = map();
var P = $globals$.P = map();
var Q = $globals$.Q = map();
var Q = $globals$.Q = map();
var R = $globals$.R = map();
var R = $globals$.R = map();
var S = $globals$.S = map();
var S = $globals$.S = map();
var T = $globals$.T = map();
var T = $globals$.T = map();
var U = $globals$.U = map();
var U = $globals$.U = map();
var V = $globals$.V = map();
var V = $globals$.V = map();
var W = $globals$.W = map();
var W = $globals$.W = map();
var X = $globals$.X = map();
var X = $globals$.X = map();
var Y = $globals$.Y = map();
var Y = $globals$.Y = map();
var Z = $globals$.Z = map();
var Z = $globals$.Z = map();
function Isolate() {
function Isolate() {
}
}
$globals$.Isolate = Isolate;
$globals$.Isolate = Isolate;
$globals$.init = init;
$globals$.init = init;
$globals$.setupProgram = setupProgram;
$globals$.setupProgram = setupProgram;
init();
init();
// Constructors are generated at runtime.
// Constructors are generated at runtime.
function setupProgram(programData, metadataOffset, typesOffset) {
function setupProgram(programData, metadataOffset, typesOffset) {
"use strict";
"use strict";
function generateAccessor(fieldDescriptor, accessors, cls) {
function generateAccessor(fieldDescriptor, accessors, cls) {
var fieldInformation = fieldDescriptor.split("-");
var fieldInformation = fieldDescriptor.split("-");
var field = fieldInformation[0];
var field = fieldInformation[0];
var len = field.length;
var len = field.length;
var code = field.charCodeAt(len - 1);
var code = field.charCodeAt(len - 1);
var reflectable;
var reflectable;
if (fieldInformation.length > 1)
if (fieldInformation.length > 1)
reflectable = true;
reflectable = true;
else
else
reflectable = false;
reflectable = false;
code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? code - 117 : code >= 37 && code <= 43 ? code - 27 : 0;
code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? code - 117 : code >= 37 && code <= 43 ? code - 27 : 0;
if (code) {
if (code) {
var getterCode = code & 3;
var getterCode = code & 3;
var setterCode = code >> 2;
var setterCode = code >> 2;
var accessorName = field = field.substring(0, len - 1);
var accessorName = field = field.substring(0, len - 1);
var divider = field.indexOf(":");
var divider = field.indexOf(":");
if (divider > 0) {
if (divider > 0) {
accessorName = field.substring(0, divider);
accessorName = field.substring(0, divider);
field = field.substring(divider + 1);
field = field.substring(divider + 1);
}
}
if (getterCode) {
if (getterCode) {
var args = getterCode & 2 ? "receiver" : "";
var args = getterCode & 2 ? "receiver" : "";
var receiver = getterCode & 1 ? "this" : "receiver";
var receiver = getterCode & 1 ? "this" : "receiver";
var body = "return " + receiver + "." + field;
var body = "return " + receiver + "." + field;
var property = cls + ".prototype.get$" + accessorName + "=";
var property = cls + ".prototype.get$" + accessorName + "=";
var fn = "function(" + args + "){" + body + "}";
var fn = "function(" + args + "){" + body + "}";
if (reflectable)
if (reflectable)
accessors.push(property + "$reflectable(" + fn + ");\n");
accessors.push(property + "$reflectable(" + fn + ");\n");
else
else
accessors.push(property + fn + ";\n");
accessors.push(property + fn + ";\n");
}
}
if (setterCode) {
if (setterCode) {
var args = setterCode & 2 ? "receiver, value" : "value";
var args = setterCode & 2 ? "receiver, value" : "value";
var receiver = setterCode & 1 ? "this" : "receiver";
var receiver = setterCode & 1 ? "this" : "receiver";
var body = receiver + "." + field + " = value";
var body = receiver + "." + field + " = value";
var property = cls + ".prototype.set$" + accessorName + "=";
var property = cls + ".prototype.set$" + accessorName + "=";
var fn = "function(" + args + "){" + body + "}";
var fn = "function(" + args + "){" + body + "}";
if (reflectable)
if (reflectable)
accessors.push(property + "$reflectable(" + fn + ");\n");
accessors.push(property + "$reflectable(" + fn + ");\n");
else
else
accessors.push(property + fn + ";\n");
accessors.push(property + fn + ";\n");
}
}
}
}
return field;
return field;
}
}
function defineClass(name, fields) {
function defineClass(name, fields) {
var accessors = [];
var accessors = [];
var str = "function " + name + "(";
var str = "function " + name + "(";
var body = "";
var comma = "", body = "";
for (var i = 0; i < fields.length; i++) {
for (var i = 0; i < fields.length; i++) {
if (i != 0)
var fieldDescriptor = fields[i];
str += ", ";
if (fieldDescriptor.charCodeAt(0) == 48) {
var field = generateAccessor(fields[i], accessors, name);
fieldDescriptor = fieldDescriptor.substring(1);
var parameter = "p_" + field;
var field = generateAccessor(fieldDescriptor, accessors, name);
str += parameter;
body += "this." + field + " = null;\n";
body += "this." + field + " = " + parameter + ";\n";
} else {
var field = generateAccessor(fieldDescriptor, accessors, name);
var parameter = "p_" + field;
str += comma;
comma = ", ";
str += parameter;
body += "this." + field + " = " + parameter + ";\n";
}
}
}
if (supportsDirectProtoAccess)
if (supportsDirectProtoAccess)
body += "this." + "$deferredAction" + "();";
body += "this." + "$deferredAction" + "();";
str += ") {\n" + body + "}\n";
str += ") {\n" + body + "}\n";
str += name + ".builtin$cls=\"" + name + "\";\n";
str += name + ".builtin$cls=\"" + name + "\";\n";
str += "$desc=$collectedClasses." + name + "[1];\n";
str += "$desc=$collectedClasses." + name + "[1];\n";
str += name + ".prototype = $desc;\n";
str += name + ".prototype = $desc;\n";
if (typeof defineClass.name != "string")
if (typeof defineClass.name != "string")
str += name + ".name=\"" + name + "\";\n";
str += name + ".name=\"" + name + "\";\n";
str += accessors.join("");
str += accessors.join("");
return str;
return str;
}
}
var inheritFrom = supportsDirectProtoAccess ? function(constructor, superConstructor) {
var inheritFrom = supportsDirectProtoAccess ? function(constructor, superConstructor) {
var prototype = constructor.prototype;
var prototype = constructor.prototype;
prototype.__proto__ = superConstructor.prototype;
prototype.__proto__ = superConstructor.prototype;
prototype.constructor = constructor;
prototype.constructor = constructor;
prototype["$is" + constructor.name] = constructor;
prototype["$is" + constructor.name] = constructor;
return convertToFastObject(prototype);
return convertToFastObject(prototype);
} : function() {
} : function() {
function tmp() {
function tmp() {
}
}
return function(constructor, superConstructor) {
return function(constructor, superConstructor) {
tmp.prototype = superConstructor.prototype;
tmp.prototype = superConstructor.prototype;
var object = new tmp();
var object = new tmp();
convertToSlowObject(object);
convertToSlowObject(object);
var properties = constructor.prototype;
var properties = constructor.prototype;
var members = Object.keys(properties);
var members = Object.keys(properties);
for (var i = 0; i < members.length; i++) {
for (var i = 0; i < members.length; i++) {
var member = members[i];
var member = members[i];
object[member] = properties[member];
object[member] = properties[member];
}
}
object["$is" + constructor.name] = constructor;
object["$is" + constructor.name] = constructor;
object.constructor = constructor;
object.constructor = constructor;
constructor.prototype = object;
constructor.prototype = object;
return object;
return object;
};
};
}();
}();
function finishClasses(processedClasses) {
function finishClasses(processedClasses) {
var allClasses = init.allClasses;
var allClasses = init.allClasses;
processedClasses.combinedConstructorFunction += "return [\n" + processedClasses.constructorsList.join(",\n ") + "\n]";
processedClasses.combinedConstructorFunction += "return [\n" + processedClasses.constructorsList.join(",\n ") + "\n]";
var constructors = new Function("$collectedClasses", processedClasses.combinedConstructorFunction)(processedClasses.collected);
var constructors = new Function("$collectedClasses", processedClasses.combinedConstructorFunction)(processedClasses.collected);
processedClasses.combinedConstructorFunction = null;
processedClasses.combinedConstructorFunction = null;
for (var i = 0; i < constructors.length; i++) {
for (var i = 0; i < constructors.length; i++) {
var constructor = constructors[i];
var constructor = constructors[i];
var cls = constructor.name;
var cls = constructor.name;
var desc = processedClasses.collected[cls];
var desc = processedClasses.collected[cls];
var globalObject = desc[0];
var globalObject = desc[0];
desc = desc[1];
desc = desc[1];
allClasses[cls] = constructor;
allClasses[cls] = constructor;
globalObject[cls] = constructor;
globalObject[cls] = constructor;
}
}
constructors = null;
constructors = null;
var finishedClasses = init.finishedClasses;
var finishedClasses = init.finishedClasses;
function finishClass(cls) {
function finishClass(cls) {
if (finishedClasses[cls])
if (finishedClasses[cls])
return;
return;
finishedClasses[cls] = true;
finishedClasses[cls] = true;
var superclass = processedClasses.pending[cls];
var superclass = processedClasses.pending[cls];
if (superclass && superclass.indexOf("+") > 0) {
if (superclass && superclass.indexOf("+") > 0) {
var s = superclass.split("+");
var s = superclass.split("+");
superclass = s[0];
superclass = s[0];
var mixinClass = s[1];
var mixinClass = s[1];
finishClass(mixinClass);
finishClass(mixinClass);
var mixin = allClasses[mixinClass];
var mixin = allClasses[mixinClass];
var mixinPrototype = mixin.prototype;
var mixinPrototype = mixin.prototype;
var clsPrototype = allClasses[cls].prototype;
var clsPrototype = allClasses[cls].prototype;
var properties = Object.keys(mixinPrototype);
var properties = Object.keys(mixinPrototype);
for (var i = 0; i < properties.length; i++) {
for (var i = 0; i < properties.length; i++) {
var d = properties[i];
var d = properties[i];
if (!hasOwnProperty.call(clsPrototype, d))
if (!hasOwnProperty.call(clsPrototype, d))
clsPrototype[d] = mixinPrototype[d];
clsPrototype[d] = mixinPrototype[d];
}
}
}
}
if (!superclass || typeof superclass != "string") {
if (!superclass || typeof superclass != "string") {
var constructor = allClasses[cls];
var constructor = allClasses[cls];
var prototype = constructor.prototype;
var prototype = constructor.prototype;
prototype.constructor = constructor;
prototype.constructor = constructor;
prototype.$isObject = constructor;
prototype.$isObject = constructor;
prototype.$deferredAction = function() {
prototype.$deferredAction = function() {
};
};
return;
return;
}
}
finishClass(superclass);
finishClass(superclass);
var superConstructor = allClasses[superclass];
var superConstructor = allClasses[superclass];
if (!superConstructor)
if (!superConstructor)
superConstructor = existingIsolateProperties[superclass];
superConstructor = existingIsolateProperties[superclass];
var constructor = allClasses[cls];
var constructor = allClasses[cls];
var prototype = inheritFrom(constructor, superConstructor);
var prototype = inheritFrom(constructor, superConstructor);
if (mixinPrototype)
if (mixinPrototype)
prototype.$deferredAction = mixinDeferredActionHelper(mixinPrototype, prototype);
prototype.$deferredAction = mixinDeferredActionHelper(mixinPrototype, prototype);
if (Object.prototype.hasOwnProperty.call(prototype, "%")) {
if (Object.prototype.hasOwnProperty.call(prototype, "%")) {
var nativeSpec = prototype["%"].split(";");
var nativeSpec = prototype["%"].split(";");
if (nativeSpec[0]) {
if (nativeSpec[0]) {
var tags = nativeSpec[0].split("|");
var tags = nativeSpec[0].split("|");
for (var i = 0; i < tags.length; i++) {
for (var i = 0; i < tags.length; i++) {
init.interceptorsByTag[tags[i]] = constructor;
init.interceptorsByTag[tags[i]] = constructor;
init.leafTags[tags[i]] = true;
init.leafTags[tags[i]] = true;
}
}
}
}
if (nativeSpec[1]) {
if (nativeSpec[1]) {
tags = nativeSpec[1].split("|");
tags = nativeSpec[1].split("|");
if (nativeSpec[2]) {
if (nativeSpec[2]) {
var subclasses = nativeSpec[2].split("|");
var subclasses = nativeSpec[2].split("|");
for (var i = 0; i < subclasses.length; i++) {
for (var i = 0; i < subclasses.length; i++) {
var subclass = allClasses[subclasses[i]];
var subclass = allClasses[subclasses[i]];
subclass.$nativeSuperclassTag = tags[0];
subclass.$nativeSuperclassTag = tags[0];
}
}
}
}
for (i = 0; i < tags.length; i++) {
for (i = 0; i < tags.length; i++) {
init.interceptorsByTag[tags[i]] = constructor;
init.interceptorsByTag[tags[i]] = constructor;
init.leafTags[tags[i]] = false;
init.leafTags[tags[i]] = false;
}
}
}
}
prototype.$deferredAction();
prototype.$deferredAction();
}
}
if (prototype.$isInterceptor)
if (prototype.$isInterceptor)
prototype.$deferredAction();
prototype.$deferredAction();
}
}
var properties = Object.keys(processedClasses.pending);
var properties = Object.keys(processedClasses.pending);
for (var i = 0; i < properties.length; i++)
for (var i = 0; i < properties.length; i++)
finishClass(properties[i]);
finishClass(properties[i]);
}
}
function finishAddStubsHelper() {
function finishAddStubsHelper() {
var prototype = this;
var prototype = this;
while (!prototype.hasOwnProperty("$deferredAction"))
while (!prototype.hasOwnProperty("$deferredAction"))
prototype = prototype.__proto__;
prototype = prototype.__proto__;
delete prototype.$deferredAction;
delete prototype.$deferredAction;
var properties = Object.keys(prototype);
var properties = Object.keys(prototype);
for (var index = 0; index < properties.length; index++) {
for (var index = 0; index < properties.length; index++) {
var property = properties[index];
var property = properties[index];
var firstChar = property.charCodeAt(0);
var firstChar = property.charCodeAt(0);
var elem;
var elem;
if (property !== "^" && property !== "$reflectable" && firstChar !== 43 && firstChar !== 42 && (elem = prototype[property]) != null && elem.constructor === Array && property !== "<>")
if (property !== "^" && property !== "$reflectable" && firstChar !== 43 && firstChar !== 42 && (elem = prototype[property]) != null && elem.constructor === Array && property !== "<>")
addStubs(prototype, elem, property, false, []);
addStubs(prototype, elem, property, false, []);
}
}
convertToFastObject(prototype);
convertToFastObject(prototype);
prototype = prototype.__proto__;
prototype = prototype.__proto__;
prototype.$deferredAction();
prototype.$deferredAction();
}
}
function mixinDeferredActionHelper(mixinPrototype, targetPrototype) {
function mixinDeferredActionHelper(mixinPrototype, targetPrototype) {
var chain;
var chain;
if (targetPrototype.hasOwnProperty("$deferredAction"))
if (targetPrototype.hasOwnProperty("$deferredAction"))
chain = targetPrototype.$deferredAction;
chain = targetPrototype.$deferredAction;
return function foo() {
return function foo() {
if (!supportsDirectProtoAccess)
if (!supportsDirectProtoAccess)
return;
return;
var prototype = this;
var prototype = this;
while (!prototype.hasOwnProperty("$deferredAction"))
while (!prototype.hasOwnProperty("$deferredAction"))
prototype = prototype.__proto__;
prototype = prototype.__proto__;
if (chain)
if (chain)
prototype.$deferredAction = chain;
prototype.$deferredAction = chain;
else {
else {
delete prototype.$deferredAction;
delete prototype.$deferredAction;
convertToFastObject(prototype);
convertToFastObject(prototype);
}
}
mixinPrototype.$deferredAction();
mixinPrototype.$deferredAction();
prototype.$deferredAction();
prototype.$deferredAction();
};
};
}
}
function processClassData(cls, descriptor, processedClasses) {
function processClassData(cls, descriptor, processedClasses) {
descriptor = convertToSlowObject(descriptor);
descriptor = convertToSlowObject(descriptor);
var previousProperty;
var previousProperty;
var properties = Object.keys(descriptor);
var properties = Object.keys(descriptor);
var hasDeferredWork = false;
var hasDeferredWork = false;
var shouldDeferWork = supportsDirectProtoAccess && cls != "Object";
var shouldDeferWork = supportsDirectProtoAccess && cls != "Object";
for (var i = 0; i < properties.length; i++) {
for (var i = 0; i < properties.length; i++) {
var property = properties[i];
var property = properties[i];
var firstChar = property.charCodeAt(0);
var firstChar = property.charCodeAt(0);
if (property === "static") {
if (property === "static") {
processStatics(init.statics[cls] = descriptor.static, processedClasses);
processStatics(init.statics[cls] = descriptor.static, processedClasses);
delete descriptor.static;
delete descriptor.static;
} else if (firstChar === 43) {
} else if (firstChar === 43) {
mangledNames[previousProperty] = property.substring(1);
mangledNames[previousProperty] = property.substring(1);
var flag = descriptor[property];
var flag = descriptor[property];
if (flag > 0)
if (flag > 0)
descriptor[previousProperty].$reflectable = flag;
descriptor[previousProperty].$reflectable = flag;
} else if (firstChar === 42) {
} else if (firstChar === 42) {
descriptor[previousProperty].$defaultValues = descriptor[property];
descriptor[previousProperty].$defaultValues = descriptor[property];
var optionalMethods = descriptor.$methodsWithOptionalArguments;
var optionalMethods = descriptor.$methodsWithOptionalArguments;
if (!optionalMethods)
if (!optionalMethods)
descriptor.$methodsWithOptionalArguments = optionalMethods = {};
descriptor.$methodsWithOptionalArguments = optionalMethods = {};
optionalMethods[property] = previousProperty;
optionalMethods[property] = previousProperty;
} else {
} else {
var elem = descriptor[property];
var elem = descriptor[property];
if (property !== "^" && elem != null && elem.constructor === Array && property !== "<>")
if (property !== "^" && elem != null && elem.constructor === Array && property !== "<>")
if (shouldDeferWork)
if (shouldDeferWork)
hasDeferredWork = true;
hasDeferredWork = true;
else
else
addStubs(descriptor, elem, property, false, []);
addStubs(descriptor, elem, property, false, []);
else
else
previousProperty = property;
previousProperty = property;
}
}
}
}
if (hasDeferredWork)
if (hasDeferredWork)
descriptor.$deferredAction = finishAddStubsHelper;
descriptor.$deferredAction = finishAddStubsHelper;
var classData = descriptor["^"], split, supr, fields = classData;
var classData = descriptor["^"], split, supr, fields = classData;
var s = fields.split(";");
var s = fields.split(";");
fields = s[1] ? s[1].split(",") : [];
fields = s[1] ? s[1].split(",") : [];
supr = s[0];
supr = s[0];
split = supr.split(":");
split = supr.split(":");
if (split.length == 2) {
if (split.length == 2) {
supr = split[0];
supr = split[0];
var functionSignature = split[1];
var functionSignature = split[1];
if (functionSignature)
if (functionSignature)
descriptor.$signature = function(s) {
descriptor.$signature = function(s) {
return function() {
return function() {
return init.types[s];
return init.types[s];
};
};
}(functionSignature);
}(functionSignature);
}
}
if (supr)
if (supr)
processedClasses.pending[cls] = supr;
processedClasses.pending[cls] = supr;
processedClasses.combinedConstructorFunction += defineClass(cls, fields);
processedClasses.combinedConstructorFunction += defineClass(cls, fields);
processedClasses.constructorsList.push(cls);
processedClasses.constructorsList.push(cls);
processedClasses.collected[cls] = [globalObject, descriptor];
processedClasses.collected[cls] = [globalObject, descriptor];
classes.push(cls);
classes.push(cls);
}
}
function processStatics(descriptor, processedClasses) {
function processStatics(descriptor, processedClasses) {
var properties = Object.keys(descriptor);
var properties = Object.keys(descriptor);
for (var i = 0; i < properties.length; i++) {
for (var i = 0; i < properties.length; i++) {
var property = properties[i];
var property = properties[i];
if (property === "^")
if (property === "^")
continue;
continue;
var element = descriptor[property];
var element = descriptor[property];
var firstChar = property.charCodeAt(0);
var firstChar = property.charCodeAt(0);
var previousProperty;
var previousProperty;
if (firstChar === 43) {
if (firstChar === 43) {
mangledGlobalNames[previousProperty] = property.substring(1);
mangledGlobalNames[previousProperty] = property.substring(1);
var flag = descriptor[property];
var flag = descriptor[property];
if (flag > 0)
if (flag > 0)
descriptor[previousProperty].$reflectable = flag;
descriptor[previousProperty].$reflectable = flag;
if (element && element.length)
if (element && element.length)
init.typeInformation[previousProperty] = element;
init.typeInformation[previousProperty] = element;
} else if (firstChar === 42) {
} else if (firstChar === 42) {
globalObject[previousProperty].$defaultValues = element;
globalObject[previousProperty].$defaultValues = element;
var optionalMethods = descriptor.$methodsWithOptionalArguments;
var optionalMethods = descriptor.$methodsWithOptionalArguments;
if (!optionalMethods)
if (!optionalMethods)
descriptor.$methodsWithOptionalArguments = optionalMethods = {};
descriptor.$methodsWithOptionalArguments = optionalMethods = {};
optionalMethods[property] = previousProperty;
optionalMethods[property] = previousProperty;
} else if (typeof element === "function") {
} else if (typeof element === "function") {
globalObject[previousProperty = property] = element;
globalObject[previousProperty = property] = element;
functions.push(property);
functions.push(property);
} else if (element.constructor === Array)
} else if (element.constructor === Array)
addStubs(globalObject, element, property, true, functions);
addStubs(globalObject, element, property, true, functions);
else {
else {
previousProperty = property;
previousProperty = property;
processClassData(property, element, processedClasses);
processClassData(property, element, processedClasses);
}
}
}
}
}
}
function addStubs(prototype, array, name, isStatic, functions) {
function addStubs(prototype, array, name, isStatic, functions) {
var index = 0, alias = array[index], f;
var index = 0, applyTrampolineIndex = index, alias = array[index], f;
if (typeof alias == "string")
if (typeof alias == "string")
f = array[++index];
f = array[++index];
else {
else {
f = alias;
f = alias;
alias = name;
alias = name;
}
}
var funcs = [prototype[name] = prototype[alias] = f];
if (typeof f == "number") {
applyTrampolineIndex = f;
f = array[++index];
}
prototype[name] = prototype[alias] = f;
var funcs = [f];
f.$stubName = name;
f.$stubName = name;
functions.push(name);
functions.push(name);
for (index++; index < array.length; index++) {
for (index++; index < array.length; index++) {
f = array[index];
f = array[index];
if (typeof f != "function")
if (typeof f != "function")
break;
break;
if (!isStatic)
if (!isStatic)
f.$stubName = array[++index];
f.$stubName = array[++index];
funcs.push(f);
funcs.push(f);
if (f.$stubName) {
if (f.$stubName) {
prototype[f.$stubName] = f;
prototype[f.$stubName] = f;
functions.push(f.$stubName);
functions.push(f.$stubName);
}
}
}
}
for (var i = 0; i < funcs.length; index++, i++)
for (var i = 0; i < funcs.length; index++, i++)
funcs[i].$callName = array[index];
funcs[i].$callName = array[index];
var getterStubName = array[index];
var getterStubName = array[index];
array = array.slice(++index);
array = array.slice(++index);
var requiredParameterInfo = array[0];
var requiredParameterInfo = array[0];
var isIntercepted = (requiredParameterInfo & 1) === 1;
var isIntercepted = (requiredParameterInfo & 1) === 1;
requiredParameterInfo = requiredParameterInfo >> 1;
requiredParameterInfo = requiredParameterInfo >> 1;
var requiredParameterCount = requiredParameterInfo >> 1;
var requiredParameterCount = requiredParameterInfo >> 1;
var isAccessor = (requiredParameterInfo & 1) === 1;
var isAccessor = (requiredParameterInfo & 1) === 1;
var isSetter = requiredParameterInfo === 3;
var isSetter = requiredParameterInfo === 3;
var isGetter = requiredParameterInfo === 1;
var isGetter = requiredParameterInfo === 1;
var optionalParameterInfo = array[1];
var optionalParameterInfo = array[1];
var optionalParameterCount = optionalParameterInfo >> 1;
var optionalParameterCount = optionalParameterInfo >> 1;
var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1;
var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1;
var totalParameterCount = requiredParameterCount + optionalParameterCount;
var totalParameterCount = requiredParameterCount + optionalParameterCount;
var functionTypeIndex = array[2];
var functionTypeIndex = array[2];
if (typeof functionTypeIndex == "number")
if (typeof functionTypeIndex == "number")
array[2] = functionTypeIndex + typesOffset;
array[2] = functionTypeIndex + typesOffset;
if (metadataOffset > 0) {
if (metadataOffset > 0) {
var position = 3;
var position = 3;
for (var i = 0; i < optionalParameterCount; i++) {
for (var i = 0; i < optionalParameterCount; i++) {
if (typeof array[position] == "number")
if (typeof array[position] == "number")
array[position] = array[position] + metadataOffset;
array[position] = array[position] + metadataOffset;
position++;
position++;
}
}
for (var i = 0; i < totalParameterCount; i++) {
for (var i = 0; i < totalParameterCount; i++) {
array[position] = array[position] + metadataOffset;
array[position] = array[position] + metadataOffset;
position++;
position++;
}
}
}
}
var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount + 3;
var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount + 3;
if (getterStubName) {
if (getterStubName) {
f = tearOff(funcs, array, isStatic, name, isIntercepted);
f = tearOff(funcs, applyTrampolineIndex, array, isStatic, name, isIntercepted);
prototype[name].$getter = f;
prototype[name].$getter = f;
f.$getterStub = true;
f.$getterStub = true;
if (isStatic)
if (isStatic)
functions.push(getterStubName);
functions.push(getterStubName);
prototype[getterStubName] = f;
prototype[getterStubName] = f;
funcs.push(f);
funcs.push(f);
f.$stubName = getterStubName;
f.$stubName = getterStubName;
f.$callName = null;
f.$callName = null;
}
}
var isReflectable = array.length > unmangledNameIndex;
var isReflectable = array.length > unmangledNameIndex;
if (isReflectable) {
if (isReflectable) {
funcs[0].$reflectable = 1;
funcs[0].$reflectable = 1;
funcs[0].$reflectionInfo = array;
funcs[0].$reflectionInfo = array;
for (var i = 1; i < funcs.length; i++) {
for (var i = 1; i < funcs.length; i++) {
funcs[i].$reflectable = 2;
funcs[i].$reflectable = 2;
funcs[i].$reflectionInfo = array;
funcs[i].$reflectionInfo = array;
}
}
var mangledNames = isStatic ? init.mangledGlobalNames : init.mangledNames;
var mangledNames = isStatic ? init.mangledGlobalNames : init.mangledNames;
var unmangledName = array[unmangledNameIndex];
var unmangledName = array[unmangledNameIndex];
var reflectionName = unmangledName;
var reflectionName = unmangledName;
if (getterStubName)
if (getterStubName)
mangledNames[getterStubName] = reflectionName;
mangledNames[getterStubName] = reflectionName;
if (isSetter)
if (isSetter)
reflectionName += "=";
reflectionName += "=";
else if (!isGetter)
else if (!isGetter)
reflectionName += ":" + (requiredParameterCount + optionalParameterCount);
reflectionName += ":" + (requiredParameterCount + optionalParameterCount);
mangledNames[name] = reflectionName;
mangledNames[name] = reflectionName;
funcs[0].$reflectionName = reflectionName;
funcs[0].$reflectionName = reflectionName;
for (var i = unmangledNameIndex + 1; i < array.length; i++)
for (var i = unmangledNameIndex + 1; i < array.length; i++)
array[i] = array[i] + metadataOffset;
array[i] = array[i] + metadataOffset;
funcs[0].$metadataIndex = unmangledNameIndex + 1;
funcs[0].$metadataIndex = unmangledNameIndex + 1;
if (optionalParameterCount)
if (optionalParameterCount)
prototype[unmangledName + "*"] = funcs[0];
prototype[unmangledName + "*"] = funcs[applyTrampolineIndex];
}
}
}
}
Function.prototype.call$1 = function(a) {
Function.prototype.call$1 = function(a) {
return this(a);
return this(a);
};
};
Function.prototype.call$1$1 = function(a) {
Function.prototype.call$1$1 = function(a) {
return this(a);
return this(a);
};
};
Function.prototype.call$2 = function(a, b) {
Function.prototype.call$2 = function(a, b) {
return this(a, b);
return this(a, b);
};
};
Function.prototype.call$0 = function() {
Function.prototype.call$0 = function() {
return this();
return this();
};
};
Function.prototype.call$3 = function(a, b, c) {
Function.prototype.call$3 = function(a, b, c) {
return this(a, b, c);
return this(a, b, c);
};
};
Function.prototype.call$2$1 = function(a) {
Function.prototype.call$2$1 = function(a) {
return this(a);
return this(a);
};
};
Function.prototype.call$3$3 = function(a, b, c) {
Function.prototype.call$3$3 = function(a, b, c) {
return this(a, b, c);
return this(a, b, c);
};
};
Function.prototype.call$2$2 = function(a, b) {
Function.prototype.call$2$2 = function(a, b) {
return this(a, b);
return this(a, b);
};
};
Function.prototype.call$4 = function(a, b, c, d) {
Function.prototype.call$4 = function(a, b, c, d) {
return this(a, b, c, d);
return this(a, b, c, d);
};
};
Function.prototype.call$3$1 = function(a) {
Function.prototype.call$3$1 = function(a) {
return this(a);
return this(a);
};
};
Function.prototype.call$1$2 = function(a, b) {
Function.prototype.call$1$2 = function(a, b) {
return this(a, b);
return this(a, b);
};
};
Function.prototype.call$5 = function(a, b, c, d, e) {
Function.prototype.call$5 = function(a, b, c, d, e) {
return this(a, b, c, d, e);
return this(a, b, c, d, e);
};
};
Function.prototype.call$3$4 = function(a, b, c, d) {
Function.prototype.call$3$4 = function(a, b, c, d) {
return this(a, b, c, d);
return this(a, b, c, d);
};
};
Function.prototype.call$2$4 = function(a, b, c, d) {
Function.prototype.call$2$4 = function(a, b, c, d) {
return this(a, b, c, d);
return this(a, b, c, d);
};
};
Function.prototype.call$1$4 = function(a, b, c, d) {
Function.prototype.call$1$4 = function(a, b, c, d) {
return this(a, b, c, d);
return this(a, b, c, d);
};
};
Function.prototype.call$3$6 = function(a, b, c, d, e, f) {
Function.prototype.call$3$6 = function(a, b, c, d, e, f) {
return this(a, b, c, d, e, f);
return this(a, b, c, d, e, f);
};
};
Function.prototype.call$2$5 = function(a, b, c, d, e) {
Function.prototype.call$2$5 = function(a, b, c, d, e) {
return this(a, b, c, d, e);
return this(a, b, c, d, e);
};
};
function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) {
function tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted) {
return isIntercepted ? new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [x], name);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, reflectionInfo, name, H, null) : new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [], name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, reflectionInfo, name, H, null);
return isIntercepted ? new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, [x], name);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null) : new Function("funcs", "applyTrampolineIndex", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, applyTrampolineIndex, reflectionInfo, false, [], name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, applyTrampolineIndex, reflectionInfo, name, H, null);
}
}
function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) {
function tearOff(funcs, applyTrampolineIndex, reflectionInfo, isStatic, name, isIntercepted) {
var cache;
var cache;
return isStatic ? function() {
return isStatic ? function() {
if (cache === void 0)
if (cache === void 0)
cache = H.closureFromTearOff(this, funcs, reflectionInfo, true, [], name).prototype;
cache = H.closureFromTearOff(this, funcs, applyTrampolineIndex, reflectionInfo, true, [], name).prototype;
return cache;
return cache;
} : tearOffGetter(funcs, reflectionInfo, name, isIntercepted);
} : tearOffGetter(funcs, applyTrampolineIndex, reflectionInfo, name, isIntercepted);
}
}
var functionCounter = 0;
var functionCounter = 0;
if (!init.libraries)
if (!init.libraries)
init.libraries = [];
init.libraries = [];
if (!init.mangledNames)
if (!init.mangledNames)
init.mangledNames = map();
init.mangledNames = map();
if (!init.mangledGlobalNames)
if (!init.mangledGlobalNames)
init.mangledGlobalNames = map();
init.mangledGlobalNames = map();
if (!init.statics)
if (!init.statics)
init.statics = map();
init.statics = map();
if (!init.typeInformation)
if (!init.typeInformation)
init.typeInformation = map();
init.typeInformation = map();
var libraries = init.libraries;
var libraries = init.libraries;
var mangledNames = init.mangledNames;
var mangledNames = init.mangledNames;
var mangledGlobalNames = init.mangledGlobalNames;
var mangledGlobalNames = init.mangledGlobalNames;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var length = programData.length;
var length = programData.length;
var processedClasses = map();
var processedClasses = map();
processedClasses.collected = map();
processedClasses.collected = map();
processedClasses.pending = map();
processedClasses.pending = map();
processedClasses.constructorsList = [];
processedClasses.constructorsList = [];
processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$reflectable=1;return fn};\n" + "var $desc;\n";
processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$reflectable=1;return fn};\n" + "var $desc;\n";
for (var i = 0; i < length; i++) {
for (var i = 0; i < length; i++) {
var data = programData[i];
var data = programData[i];
var name = data[0];
var name = data[0];
var uri = data[1];
var uri = data[1];
var metadata = data[2];
var metadata = data[2];
var globalObject = data[3];
var globalObject = data[3];
var descriptor = data[4];
var descriptor = data[4];
var isRoot = !!data[5];
var isRoot = !!data[5];
var fields = descriptor && descriptor["^"];
var fields = descriptor && descriptor["^"];
if (fields instanceof Array)
if (fields instanceof Array)
fields = fields[0];
fields = fields[0];
var classes = [];
var classes = [];
var functions = [];
var functions = [];
processStatics(descriptor, processedClasses);
processStatics(descriptor, processedClasses);
libraries.push([name, uri, classes, functions, metadata, fields, isRoot, globalObject]);
libraries.push([name, uri, classes, functions, metadata, fields, isRoot, globalObject]);
}
}
finishClasses(processedClasses);
finishClasses(processedClasses);
}
}
Isolate.functionThatReturnsNull = function() {
Isolate.functionThatReturnsNull = function() {
};
};
var dart = [["_foreign_helper", "dart:_foreign_helper",, H, {
var dart = [["_foreign_helper", "dart:_foreign_helper",, H, {
"^": "",
"^": "",
JS_CONST: {
JS_CONST: {
"^": "Object;code"
"^": "Object;code"
}
}
}], ["_interceptors", "dart:_interceptors",, J, {
}], ["_interceptors", "dart:_interceptors",, J, {
"^": "",
"^": "",
getInterceptor: function(object) {
getInterceptor: function(object) {
return void 0;
return void 0;
},
},
makeDispatchRecord: function(interceptor, proto, extension, indexability) {
makeDispatchRecord: function(interceptor, proto, extension, indexability) {
return {i: interceptor, p: proto, e: extension, x: indexability};
return {i: interceptor, p: proto, e: extension, x: indexability};
},
},
getNativeInterceptor: function(object) {
getNativeInterceptor: function(object) {
var record, proto, objectProto, $constructor, interceptor;
var record, proto, objectProto, $constructor, interc
record = object[init.dispatchPropertyName];
if (record == null)
if ($.initNativeDispatchFlag == null) {
H.initNativeDispatch();
record = object[init.dispatchPropertyName];
}
if (record != null) {
proto = record.p;
if (false === proto)
return record.i;
if (true === proto)
return object;
objectProto = Object.getPrototypeOf(object);
if (proto === objectProto)
return record.i;
if (record.e === objectProto)
throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record))));
}
$constructor = object.constructor;
interceptor = $constructor == null ? null : $c