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

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

Issue 1448993002: Switch ddc to use @JS instead of @JSName (Closed) Base URL: git://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dart/js', null, /* Imports */[ 1 dart_library.library('dart/js', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/core', 3 'dart/core',
4 'dart/collection', 4 'dart/collection',
5 'dart/_js_helper' 5 'dart/_js_helper'
6 ], /* Lazy imports */[ 6 ], /* Lazy imports */[
7 ], function(exports, dart, core, collection, _js_helper) { 7 ], function(exports, dart, core, collection, _js_helper) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 dart.defineLazyProperties(exports, { 10 dart.defineLazyProperties(exports, {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 }); 383 });
384 function _putIfAbsent(weakMap, o, getValue) { 384 function _putIfAbsent(weakMap, o, getValue) {
385 let value = weakMap.get(o); 385 let value = weakMap.get(o);
386 if (value == null) { 386 if (value == null) {
387 value = dart.dcall(getValue, o); 387 value = dart.dcall(getValue, o);
388 weakMap.set(o, value); 388 weakMap.set(o, value);
389 } 389 }
390 return value; 390 return value;
391 } 391 }
392 dart.fn(_putIfAbsent, core.Object, [dart.dynamic, dart.dynamic, dart.functionT ype(dart.dynamic, [dart.dynamic])]); 392 dart.fn(_putIfAbsent, core.Object, [dart.dynamic, dart.dynamic, dart.functionT ype(dart.dynamic, [dart.dynamic])]);
393 function allowInterop(f) {
394 return f;
395 }
396 dart.fn(allowInterop, core.Function, [core.Function]);
397 dart.defineLazyProperties(exports, {
398 get _interopCaptureThisExpando() {
399 return new (core.Expando$(core.Function))();
400 },
401 set _interopCaptureThisExpando(_) {}
402 });
403 function allowInteropCaptureThis(f) {
404 let ret = exports._interopCaptureThisExpando.get(f);
405 if (ret == null) {
406 ret = dart.as(function() {
407 let args = [this];
408 for (let arg of arguments) {
409 args.push(arg);
410 }
411 return f(...args);
412 }, core.Function);
413 exports._interopCaptureThisExpando.set(f, ret);
414 }
415 return ret;
416 }
417 dart.fn(allowInteropCaptureThis, core.Function, [core.Function]);
393 let __CastType0$ = dart.generic(function(E) { 418 let __CastType0$ = dart.generic(function(E) {
394 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.d ynamic, [E])); 419 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.d ynamic, [E]));
395 return __CastType0; 420 return __CastType0;
396 }); 421 });
397 let __CastType0 = __CastType0$(); 422 let __CastType0 = __CastType0$();
398 // Exports: 423 // Exports:
399 exports.JsObject = JsObject; 424 exports.JsObject = JsObject;
400 exports.JsFunction = JsFunction; 425 exports.JsFunction = JsFunction;
401 exports.JsArray$ = JsArray$; 426 exports.JsArray$ = JsArray$;
402 exports.JsArray = JsArray; 427 exports.JsArray = JsArray;
428 exports.allowInterop = allowInterop;
429 exports.allowInteropCaptureThis = allowInteropCaptureThis;
403 }); 430 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698