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

Side by Side Diff: lib/runtime/dart/_js_helper.js

Issue 1099333002: canonicalize const (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _js_helper; 1 var _js_helper;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class NoSideEffects extends core.Object { 4 class NoSideEffects extends core.Object {
5 NoSideEffects() { 5 NoSideEffects() {
6 } 6 }
7 } 7 }
8 class NoThrows extends core.Object { 8 class NoThrows extends core.Object {
9 NoThrows() { 9 NoThrows() {
10 } 10 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 let prototypeForTag = hooks.prototypeForTag; 432 let prototypeForTag = hooks.prototypeForTag;
433 exports.getTagFunction = o => getTag(o); 433 exports.getTagFunction = o => getTag(o);
434 exports.alternateTagFunction = (o, tag) => getUnknownTag(o, tag); 434 exports.alternateTagFunction = (o, tag) => getUnknownTag(o, tag);
435 exports.prototypeForTagFunction = tag => prototypeForTag(tag); 435 exports.prototypeForTagFunction = tag => prototypeForTag(tag);
436 } 436 }
437 // Function applyHooksTransformer: (dynamic, dynamic) → dynamic 437 // Function applyHooksTransformer: (dynamic, dynamic) → dynamic
438 function applyHooksTransformer(transformer, hooks) { 438 function applyHooksTransformer(transformer, hooks) {
439 let newHooks = transformer(hooks); 439 let newHooks = transformer(hooks);
440 return newHooks || hooks; 440 return newHooks || hooks;
441 } 441 }
442 let _baseHooks = new _foreign_helper.JS_CONST('function() {\n function typeNa meInChrome(o) {\n var constructor = o.constructor;\n if (constructor) {\n var name = constructor.name;\n if (name) return name;\n }\n var s = Object.prototype.toString.call(o);\n return s.substring(8, s.length - 1); \n }\n function getUnknownTag(object, tag) {\n // This code really belongs in [getUnknownTagGenericBrowser] but having it\n // here allows [getUnknownTa g] to be tested on d8.\n if (/^HTML[A-Z].*Element$/.test(tag)) {\n // Ch eck that it is not a simple JavaScript object.\n var name = Object.prototyp e.toString.call(object);\n if (name == "[object Object]") return null;\n return "HTMLElement";\n }\n }\n function getUnknownTagGenericBrowser(obj ect, tag) {\n if (self.HTMLElement && object instanceof HTMLElement) return " HTMLElement";\n return getUnknownTag(object, tag);\n }\n function prototype ForTag(tag) {\n if (typeof window == "undefined") return null;\n if (typeo f window[tag] == "undefined") return null;\n var constructor = window[tag];\n if (typeof constructor != "function") return null;\n return constructor.p rototype;\n }\n function discriminator(tag) { return null; }\n\n var isBrowse r = typeof navigator == "object";\n\n return {\n getTag: typeNameInChrome,\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,\n prototypeForTag: prototypeForTag,\n discriminator: discriminator };\n}'); 442 let _baseHooks = dart.const(new _foreign_helper.JS_CONST('function() {\n func tion typeNameInChrome(o) {\n var constructor = o.constructor;\n if (constr uctor) {\n var name = constructor.name;\n if (name) return name;\n }\n var s = Object.prototype.toString.call(o);\n return s.substring(8, s.l ength - 1);\n }\n function getUnknownTag(object, tag) {\n // This code real ly belongs in [getUnknownTagGenericBrowser] but having it\n // here allows [g etUnknownTag] to be tested on d8.\n if (/^HTML[A-Z].*Element$/.test(tag)) {\n // Check that it is not a simple JavaScript object.\n var name = Obje ct.prototype.toString.call(object);\n if (name == "[object Object]") return null;\n return "HTMLElement";\n }\n }\n function getUnknownTagGeneric Browser(object, tag) {\n if (self.HTMLElement && object instanceof HTMLElemen t) return "HTMLElement";\n return getUnknownTag(object, tag);\n }\n functio n prototypeForTag(tag) {\n if (typeof window == "undefined") return null;\n if (typeof window[tag] == "undefined") return null;\n var constructor = win dow[tag];\n if (typeof constructor != "function") return null;\n return co nstructor.prototype;\n }\n function discriminator(tag) { return null; }\n\n v ar isBrowser = typeof navigator == "object";\n\n return {\n getTag: typeName InChrome,\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnkno wnTag,\n prototypeForTag: prototypeForTag,\n discriminator: discriminator };\n}'));
443 let _constructorNameFallback = new _foreign_helper.JS_CONST('function getTagFa llback(o) {\n var constructor = o.constructor;\n if (typeof constructor == "fu nction") {\n var name = constructor.name;\n // If the name is a non-empty string, we use that as the type name of this\n // object. There are various cases where that does not work, so we have to\n // detect them and fall throu gh to the toString() based implementation.\n\n if (typeof name == "string" && \n\n // Sometimes the string is empty. This test also catches minified\n // shadow dom polyfil wrapper for Window on Firefox where the faked\n // constructor name does not \'stick\'. The shortest real DOM object\n // names have three characters (e.g. URL, CSS).\n name.length > 2 &&\ n\n // On Firefox we often get "Object" as the constructor name, even for \n // more specialized DOM objects.\n name !== "Object" &&\n\n // This can happen in Opera.\n name !== "Function.prototype") {\n return name;\n }\n }\n var s = Object.prototype.toString.call(o);\n retu rn s.substring(8, s.length - 1);\n}'); 443 let _constructorNameFallback = dart.const(new _foreign_helper.JS_CONST('functi on getTagFallback(o) {\n var constructor = o.constructor;\n if (typeof constru ctor == "function") {\n var name = constructor.name;\n // If the name is a non-empty string, we use that as the type name of this\n // object. There a re various cases where that does not work, so we have to\n // detect them and fall through to the toString() based implementation.\n\n if (typeof name == "string" &&\n\n // Sometimes the string is empty. This test also catches minified\n // shadow dom polyfil wrapper for Window on Firefox where the faked\n // constructor name does not \'stick\'. The shortest real DOM o bject\n // names have three characters (e.g. URL, CSS).\n name.len gth > 2 &&\n\n // On Firefox we often get "Object" as the constructor nam e, even for\n // more specialized DOM objects.\n name !== "Object" &&\n\n // This can happen in Opera.\n name !== "Function.prototyp e") {\n return name;\n }\n }\n var s = Object.prototype.toString.call( o);\n return s.substring(8, s.length - 1);\n}'));
444 let _fallbackConstructorHooksTransformerGenerator = new _foreign_helper.JS_CON ST('function(getTagFallback) {\n return function(hooks) {\n // If we are not in a browser, assume we are in d8.\n // TODO(sra): Recognize jsshell.\n i f (typeof navigator != "object") return hooks;\n\n var ua = navigator.userAge nt;\n // TODO(antonm): remove a reference to DumpRenderTree.\n if (ua.inde xOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome") >= 0) {\ n // Confirm constructor name is usable for dispatch.\n function confi rm(p) {\n return typeof window == "object" && window[p] && window[p].name == p;\n }\n if (confirm("Window") && confirm("HTMLElement")) return h ooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}'); 444 let _fallbackConstructorHooksTransformerGenerator = dart.const(new _foreign_he lper.JS_CONST('function(getTagFallback) {\n return function(hooks) {\n // If we are not in a browser, assume we are in d8.\n // TODO(sra): Recognize jssh ell.\n if (typeof navigator != "object") return hooks;\n\n var ua = naviga tor.userAgent;\n // TODO(antonm): remove a reference to DumpRenderTree.\n if (ua.indexOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome ") >= 0) {\n // Confirm constructor name is usable for dispatch.\n fun ction confirm(p) {\n return typeof window == "object" && window[p] && win dow[p].name == p;\n }\n if (confirm("Window") && confirm("HTMLElement" )) return hooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}'));
445 let _ieHooksTransformer = new _foreign_helper.JS_CONST('function(hooks) {\n v ar userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n if (u serAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = hooks.getTag ;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTransfer": "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement": "HTMLEle ment",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geoposition"\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var newTag = qui ckMap[tag];\n if (newTag) return newTag;\n // Patches for types which repo rt themselves as Objects.\n if (tag == "Object") {\n if (window.DataView && (o instanceof window.DataView)) return "DataView";\n }\n return tag;\n }\n\n function prototypeForTagIE(tag) {\n var constructor = window[tag];\n if (constructor == null) return null;\n return constructor.prototype;\n }\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeForTagIE;\n} '); 445 let _ieHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function(ho oks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgent : " ";\n if (userAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = h ooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "Data Transfer": "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement ": "HTMLElement",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geo position"\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var n ewTag = quickMap[tag];\n if (newTag) return newTag;\n // Patches for types which report themselves as Objects.\n if (tag == "Object") {\n if (wind ow.DataView && (o instanceof window.DataView)) return "DataView";\n }\n re turn tag;\n }\n\n function prototypeForTagIE(tag) {\n var constructor = win dow[tag];\n if (constructor == null) return null;\n return constructor.pro totype;\n }\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeF orTagIE;\n}'));
446 let _fixDocumentHooksTransformer = new _foreign_helper.JS_CONST('function(hook s) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.prototypeForTa g;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (tag == "Docum ent") {\n // Some browsers and the polymer polyfill call both HTML and XML documents\n // "Document", so we check for the xmlVersion property, which i s the empty\n // string on HTML documents. Since both dart:html classes Doc ument and\n // HtmlDocument share the same type, we must patch the instance s and not\n // the prototype.\n if (!!o.xmlVersion) return "!Document" ;\n return "!HTMLDocument";\n }\n return tag;\n }\n\n function prot otypeForTagFixed(tag) {\n if (tag == "Document") return null; // Do not pre- patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.getTag = getTa gFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}'); 446 let _fixDocumentHooksTransformer = dart.const(new _foreign_helper.JS_CONST('fu nction(hooks) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.pro totypeForTag;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (ta g == "Document") {\n // Some browsers and the polymer polyfill call both HT ML and XML documents\n // "Document", so we check for the xmlVersion proper ty, which is the empty\n // string on HTML documents. Since both dart:html classes Document and\n // HtmlDocument share the same type, we must patch t he instances and not\n // the prototype.\n if (!!o.xmlVersion) return "!Document";\n return "!HTMLDocument";\n }\n return tag;\n }\n\n fu nction prototypeForTagFixed(tag) {\n if (tag == "Document") return null; // Do not pre-patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.get Tag = getTagFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}'));
447 let _firefoxHooksTransformer = new _foreign_helper.JS_CONST('function(hooks) { \n var userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag = hooks.ge tTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTransfe r": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location": "!Locati on", // Fixes issue 18151\n "WorkerMessageEvent": "MessageEvent ",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) {\n var t ag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.getTag = getTa gFirefox;\n}'); 447 let _firefoxHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functi on(hooks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgen t : "";\n if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag = hooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n " DataTransfer": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location ": "!Location", // Fixes issue 18151\n "WorkerMessageEvent": "M essageEvent",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) { \n var tag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.get Tag = getTagFirefox;\n}'));
448 let _operaHooksTransformer = new _foreign_helper.JS_CONST('function(hooks) { r eturn hooks; }\n'); 448 let _operaHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function (hooks) { return hooks; }\n'));
449 let _safariHooksTransformer = new _foreign_helper.JS_CONST('function(hooks) { return hooks; }\n'); 449 let _safariHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functio n(hooks) { return hooks; }\n'));
450 let _dartExperimentalFixupGetTagHooksTransformer = new _foreign_helper.JS_CONS T('function(hooks) {\n if (typeof dartExperimentalFixupGetTag != "function") re turn hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);\n}'); 450 let _dartExperimentalFixupGetTagHooksTransformer = dart.const(new _foreign_hel per.JS_CONST('function(hooks) {\n if (typeof dartExperimentalFixupGetTag != "fu nction") return hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTa g);\n}'));
451 let _nativeRegExp = Symbol('_nativeRegExp'); 451 let _nativeRegExp = Symbol('_nativeRegExp');
452 // Function regExpGetNative: (JSSyntaxRegExp) → dynamic 452 // Function regExpGetNative: (JSSyntaxRegExp) → dynamic
453 function regExpGetNative(regexp) { 453 function regExpGetNative(regexp) {
454 return regexp[_nativeRegExp]; 454 return regexp[_nativeRegExp];
455 } 455 }
456 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); 456 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion');
457 // Function regExpGetGlobalNative: (JSSyntaxRegExp) → dynamic 457 // Function regExpGetGlobalNative: (JSSyntaxRegExp) → dynamic
458 function regExpGetGlobalNative(regexp) { 458 function regExpGetGlobalNative(regexp) {
459 let nativeRegexp = regexp[_nativeGlobalVersion]; 459 let nativeRegexp = regexp[_nativeGlobalVersion];
460 nativeRegexp.lastIndex = 0; 460 nativeRegexp.lastIndex = 0;
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 return str; 1339 return str;
1340 } 1340 }
1341 // Function unmangleAllIdentifiersIfPreservedAnyways: (String) → String 1341 // Function unmangleAllIdentifiersIfPreservedAnyways: (String) → String
1342 function unmangleAllIdentifiersIfPreservedAnyways(str) { 1342 function unmangleAllIdentifiersIfPreservedAnyways(str) {
1343 return str; 1343 return str;
1344 } 1344 }
1345 class _Patch extends core.Object { 1345 class _Patch extends core.Object {
1346 _Patch() { 1346 _Patch() {
1347 } 1347 }
1348 } 1348 }
1349 let patch = new _Patch(); 1349 let patch = dart.const(new _Patch());
1350 class InternalMap extends core.Object {} 1350 class InternalMap extends core.Object {}
1351 // Function requiresPreamble: () → dynamic 1351 // Function requiresPreamble: () → dynamic
1352 function requiresPreamble() { 1352 function requiresPreamble() {
1353 } 1353 }
1354 // Function isJsIndexable: (dynamic, dynamic) → bool 1354 // Function isJsIndexable: (dynamic, dynamic) → bool
1355 function isJsIndexable(object, record) { 1355 function isJsIndexable(object, record) {
1356 if (record != null) { 1356 if (record != null) {
1357 let result = _interceptors.dispatchRecordIndexability(record); 1357 let result = _interceptors.dispatchRecordIndexability(record);
1358 if (result != null) 1358 if (result != null)
1359 return dart.as(result, core.bool); 1359 return dart.as(result, core.bool);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 return this[_kind] == JSInvocationMirror.GETTER; 1440 return this[_kind] == JSInvocationMirror.GETTER;
1441 } 1441 }
1442 get isSetter() { 1442 get isSetter() {
1443 return this[_kind] == JSInvocationMirror.SETTER; 1443 return this[_kind] == JSInvocationMirror.SETTER;
1444 } 1444 }
1445 get isAccessor() { 1445 get isAccessor() {
1446 return this[_kind] != JSInvocationMirror.METHOD; 1446 return this[_kind] != JSInvocationMirror.METHOD;
1447 } 1447 }
1448 get positionalArguments() { 1448 get positionalArguments() {
1449 if (this.isGetter) 1449 if (this.isGetter)
1450 return /* Unimplemented const */[]; 1450 return dart.const([]);
1451 let argumentCount = dart.notNull(this[_arguments][core.$length]) - dart.no tNull(this[_namedArgumentNames][core.$length]); 1451 let argumentCount = dart.notNull(this[_arguments][core.$length]) - dart.no tNull(this[_namedArgumentNames][core.$length]);
1452 if (argumentCount == 0) 1452 if (argumentCount == 0)
1453 return /* Unimplemented const */[]; 1453 return dart.const([]);
1454 let list = []; 1454 let list = [];
1455 for (let index = 0; dart.notNull(index) < dart.notNull(argumentCount); ind ex = dart.notNull(index) + 1) { 1455 for (let index = 0; dart.notNull(index) < dart.notNull(argumentCount); ind ex = dart.notNull(index) + 1) {
1456 list[core.$add](this[_arguments][core.$get](index)); 1456 list[core.$add](this[_arguments][core.$get](index));
1457 } 1457 }
1458 return dart.as(makeLiteralListConst(list), core.List); 1458 return dart.as(makeLiteralListConst(list), core.List);
1459 } 1459 }
1460 get namedArguments() { 1460 get namedArguments() {
1461 if (this.isAccessor) 1461 if (this.isAccessor)
1462 return dart.map(); 1462 return dart.map();
1463 let namedArgumentCount = this[_namedArgumentNames][core.$length]; 1463 let namedArgumentCount = this[_namedArgumentNames][core.$length];
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 let names = ''; 2038 let names = '';
2039 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i sEmpty)) { 2039 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i sEmpty)) {
2040 namedArguments.forEach((name, argument) => { 2040 namedArguments.forEach((name, argument) => {
2041 names = `${names}$${name}`; 2041 names = `${names}$${name}`;
2042 namedArgumentList[core.$add](name); 2042 namedArgumentList[core.$add](name);
2043 arguments$[core.$add](argument); 2043 arguments$[core.$add](argument);
2044 argumentCount = dart.notNull(argumentCount) + 1; 2044 argumentCount = dart.notNull(argumentCount) + 1;
2045 }); 2045 });
2046 } 2046 }
2047 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume ntCount}${names}`; 2047 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume ntCount}${names}`;
2048 return dart.dsend(func, 'noSuchMethod', createUnmangledInvocationMirror(/* Unimplemented const */new _internal.Symbol("call"), selectorName, JSInvocationM irror.METHOD, arguments$, namedArgumentList)); 2048 return dart.dsend(func, 'noSuchMethod', createUnmangledInvocationMirror(da rt.const(new core.Symbol('call')), selectorName, JSInvocationMirror.METHOD, argu ments$, namedArgumentList));
2049 } 2049 }
2050 static applyFunction(func, positionalArguments, namedArguments) { 2050 static applyFunction(func, positionalArguments, namedArguments) {
2051 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu nc, positionalArguments, namedArguments); 2051 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu nc, positionalArguments, namedArguments);
2052 } 2052 }
2053 static applyFunctionWithPositionalArguments(func, positionalArguments) { 2053 static applyFunctionWithPositionalArguments(func, positionalArguments) {
2054 let argumentCount = 0; 2054 let argumentCount = 0;
2055 let arguments$ = null; 2055 let arguments$ = null;
2056 if (positionalArguments != null) { 2056 if (positionalArguments != null) {
2057 if (positionalArguments instanceof Array) { 2057 if (positionalArguments instanceof Array) {
2058 arguments$ = positionalArguments; 2058 arguments$ = positionalArguments;
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 } 3480 }
3481 toString() { 3481 toString() {
3482 return 'dynamic'; 3482 return 'dynamic';
3483 } 3483 }
3484 toRti() { 3484 toRti() {
3485 return null; 3485 return null;
3486 } 3486 }
3487 } 3487 }
3488 // Function getDynamicRuntimeType: () → RuntimeType 3488 // Function getDynamicRuntimeType: () → RuntimeType
3489 function getDynamicRuntimeType() { 3489 function getDynamicRuntimeType() {
3490 return new DynamicRuntimeType(); 3490 return dart.const(new DynamicRuntimeType());
3491 } 3491 }
3492 class VoidRuntimeType extends RuntimeType { 3492 class VoidRuntimeType extends RuntimeType {
3493 VoidRuntimeType() { 3493 VoidRuntimeType() {
3494 super.RuntimeType(); 3494 super.RuntimeType();
3495 } 3495 }
3496 toString() { 3496 toString() {
3497 return 'void'; 3497 return 'void';
3498 } 3498 }
3499 toRti() { 3499 toRti() {
3500 return dart.throw_('internal error'); 3500 return dart.throw_('internal error');
3501 } 3501 }
3502 } 3502 }
3503 // Function getVoidRuntimeType: () → RuntimeType 3503 // Function getVoidRuntimeType: () → RuntimeType
3504 function getVoidRuntimeType() { 3504 function getVoidRuntimeType() {
3505 return new VoidRuntimeType(); 3505 return dart.const(new VoidRuntimeType());
3506 } 3506 }
3507 // Function functionTypeTestMetaHelper: () → dynamic 3507 // Function functionTypeTestMetaHelper: () → dynamic
3508 function functionTypeTestMetaHelper() { 3508 function functionTypeTestMetaHelper() {
3509 let dyn = x; 3509 let dyn = x;
3510 let dyn2 = x; 3510 let dyn2 = x;
3511 let fixedListOrNull = dart.as(x, core.List); 3511 let fixedListOrNull = dart.as(x, core.List);
3512 let fixedListOrNull2 = dart.as(x, core.List); 3512 let fixedListOrNull2 = dart.as(x, core.List);
3513 let fixedList = dart.as(x, core.List); 3513 let fixedList = dart.as(x, core.List);
3514 let jsObject = x; 3514 let jsObject = x;
3515 buildFunctionType(dyn, fixedListOrNull, fixedListOrNull2); 3515 buildFunctionType(dyn, fixedListOrNull, fixedListOrNull2);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3619 get [_optionalArguments]() { 3619 get [_optionalArguments]() {
3620 return dart.as(this[_typeData].opt, core.List); 3620 return dart.as(this[_typeData].opt, core.List);
3621 } 3621 }
3622 get [_hasNamedArguments]() { 3622 get [_hasNamedArguments]() {
3623 return "named" in this[_typeData]; 3623 return "named" in this[_typeData];
3624 } 3624 }
3625 get [_namedArguments]() { 3625 get [_namedArguments]() {
3626 return this[_typeData].named; 3626 return this[_typeData].named;
3627 } 3627 }
3628 toRuntimeType() { 3628 toRuntimeType() {
3629 return new DynamicRuntimeType(); 3629 return dart.const(new DynamicRuntimeType());
3630 } 3630 }
3631 [_convert](type) { 3631 [_convert](type) {
3632 let result = runtimeTypeToString(type); 3632 let result = runtimeTypeToString(type);
3633 if (result != null) 3633 if (result != null)
3634 return result; 3634 return result;
3635 if ("func" in type) { 3635 if ("func" in type) {
3636 return new FunctionTypeInfoDecoderRing(type).toString(); 3636 return new FunctionTypeInfoDecoderRing(type).toString();
3637 } else { 3637 } else {
3638 throw 'bad type'; 3638 throw 'bad type';
3639 } 3639 }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
4067 exports.jsonEncodeNative = jsonEncodeNative; 4067 exports.jsonEncodeNative = jsonEncodeNative;
4068 exports.getIsolateAffinityTag = getIsolateAffinityTag; 4068 exports.getIsolateAffinityTag = getIsolateAffinityTag;
4069 exports.LoadLibraryFunctionType = LoadLibraryFunctionType; 4069 exports.LoadLibraryFunctionType = LoadLibraryFunctionType;
4070 exports.DeferredLoadCallback = DeferredLoadCallback; 4070 exports.DeferredLoadCallback = DeferredLoadCallback;
4071 exports.loadDeferredLibrary = loadDeferredLibrary; 4071 exports.loadDeferredLibrary = loadDeferredLibrary;
4072 exports.MainError = MainError; 4072 exports.MainError = MainError;
4073 exports.missingMain = missingMain; 4073 exports.missingMain = missingMain;
4074 exports.badMain = badMain; 4074 exports.badMain = badMain;
4075 exports.mainHasTooManyParameters = mainHasTooManyParameters; 4075 exports.mainHasTooManyParameters = mainHasTooManyParameters;
4076 })(_js_helper || (_js_helper = {})); 4076 })(_js_helper || (_js_helper = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698