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

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

Issue 1200243002: fixes #232, handling of arguments (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 dart_library.library('dart/js', null, /* Imports */[ 1 dart_library.library('dart/js', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/_foreign_helper', 3 'dart/_foreign_helper',
4 'dart/core', 4 'dart/core',
5 'dart/collection', 5 'dart/collection',
6 'dart/typed_data', 6 'dart/typed_data',
7 'dart/_js_helper' 7 'dart/_js_helper'
8 ], /* Lazy imports */[ 8 ], /* Lazy imports */[
9 ], function(exports, dart, _foreign_helper, core, collection, typed_data, _js_he lper) { 9 ], function(exports, dart, _foreign_helper, core, collection, typed_data, _js_he lper) {
10 'use strict'; 10 'use strict';
11 let dartx = dart.dartx; 11 let dartx = dart.dartx;
12 dart.defineLazyProperties(exports, { 12 dart.defineLazyProperties(exports, {
13 get context() { 13 get context() {
14 return _wrapToDart(self); 14 return _wrapToDart(self);
15 } 15 }
16 }); 16 });
17 function _convertDartFunction(f, opts) { 17 function _convertDartFunction(f, opts) {
18 let captureThis = opts && 'captureThis' in opts ? opts.captureThis : false; 18 let captureThis = opts && 'captureThis' in opts ? opts.captureThis : false;
19 return function(_call, f, captureThis) { 19 return function(_call, f, captureThis) {
20 return function() { 20 return function() {
21 return _call(f, captureThis, this, Array.prototype.slice.apply(arguments $)); 21 return _call(f, captureThis, this, Array.prototype.slice.apply(arguments ));
22 }; 22 };
23 }(_foreign_helper.DART_CLOSURE_TO_JS(_callDartFunction), f, captureThis); 23 }(_foreign_helper.DART_CLOSURE_TO_JS(_callDartFunction), f, captureThis);
24 } 24 }
25 dart.fn(_convertDartFunction, dart.dynamic, [core.Function], {captureThis: cor e.bool}); 25 dart.fn(_convertDartFunction, dart.dynamic, [core.Function], {captureThis: cor e.bool});
26 function _callDartFunction(callback, captureThis, self, arguments$) { 26 function _callDartFunction(callback, captureThis, self, arguments$) {
27 if (dart.notNull(captureThis)) { 27 if (dart.notNull(captureThis)) {
28 let _ = [self]; 28 let _ = [self];
29 _[dartx.addAll](arguments$); 29 _[dartx.addAll](arguments$);
30 arguments$ = _; 30 arguments$ = _;
31 } 31 }
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.d ynamic, [E])); 443 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.d ynamic, [E]));
444 return __CastType0; 444 return __CastType0;
445 }); 445 });
446 let __CastType0 = __CastType0$(); 446 let __CastType0 = __CastType0$();
447 // Exports: 447 // Exports:
448 exports.JsObject = JsObject; 448 exports.JsObject = JsObject;
449 exports.JsFunction = JsFunction; 449 exports.JsFunction = JsFunction;
450 exports.JsArray$ = JsArray$; 450 exports.JsArray$ = JsArray$;
451 exports.JsArray = JsArray; 451 exports.JsArray = JsArray;
452 }); 452 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698