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

Side by Side Diff: test/codegen_expected/varargs.js

Issue 2255993002: Support call methods on functions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Add fix for dynamic Created 4 years, 4 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 | « test/codegen/language/call_function_test.dart ('k') | no next file » | 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('varargs', null, /* Imports */[ 1 dart_library.library('varargs', null, /* Imports */[
2 'dart_sdk' 2 'dart_sdk'
3 ], function load__varargs(exports, dart_sdk) { 3 ], function load__varargs(exports, dart_sdk) {
4 'use strict'; 4 'use strict';
5 const core = dart_sdk.core; 5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart; 6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx; 7 const dartx = dart_sdk.dartx;
8 const varargs = Object.create(null); 8 const varargs = Object.create(null);
9 const src__varargs = Object.create(null); 9 const src__varargs = Object.create(null);
10 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); 10 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))();
11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))(); 11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))();
12 varargs.varargsTest = function(x, ...others) { 12 varargs.varargsTest = function(x, ...others) {
13 let args = [1, others]; 13 let args = [1, others];
14 dart.dsend(x, 'call', ...args); 14 dart.dcall(x, ...args);
15 }; 15 };
16 dart.fn(varargs.varargsTest, dynamicAnddynamicTodynamic()); 16 dart.fn(varargs.varargsTest, dynamicAnddynamicTodynamic());
17 varargs.varargsTest2 = function(x, ...others) { 17 varargs.varargsTest2 = function(x, ...others) {
18 let args = [1, others]; 18 let args = [1, others];
19 dart.dsend(x, 'call', ...args); 19 dart.dcall(x, ...args);
20 }; 20 };
21 dart.fn(varargs.varargsTest2, dynamicAnddynamicTodynamic()); 21 dart.fn(varargs.varargsTest2, dynamicAnddynamicTodynamic());
22 src__varargs._Rest = class _Rest extends core.Object { 22 src__varargs._Rest = class _Rest extends core.Object {
23 new() { 23 new() {
24 } 24 }
25 }; 25 };
26 dart.setSignature(src__varargs._Rest, { 26 dart.setSignature(src__varargs._Rest, {
27 constructors: () => ({new: dart.definiteFunctionType(src__varargs._Rest, []) }) 27 constructors: () => ({new: dart.definiteFunctionType(src__varargs._Rest, []) })
28 }); 28 });
29 src__varargs.rest = dart.const(new src__varargs._Rest()); 29 src__varargs.rest = dart.const(new src__varargs._Rest());
30 src__varargs.spread = function(args) { 30 src__varargs.spread = function(args) {
31 dart.throw(new core.StateError('The spread function cannot be called, ' + 'i t should be compiled away.')); 31 dart.throw(new core.StateError('The spread function cannot be called, ' + 'i t should be compiled away.'));
32 }; 32 };
33 dart.fn(src__varargs.spread, dynamicTodynamic()); 33 dart.fn(src__varargs.spread, dynamicTodynamic());
34 // Exports: 34 // Exports:
35 exports.varargs = varargs; 35 exports.varargs = varargs;
36 exports.src__varargs = src__varargs; 36 exports.src__varargs = src__varargs;
37 }); 37 });
OLDNEW
« no previous file with comments | « test/codegen/language/call_function_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698