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

Side by Side Diff: test/codegen/expect/language/issue10204_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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
(Empty)
1 dart_library.library('language/issue10204_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__issue10204_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect;
11 const issue10204_test = Object.create(null);
12 let JSArrayOfA = () => (JSArrayOfA = dart.constFn(_interceptors.JSArray$(issue 10204_test.A)))();
13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
14 issue10204_test.a = 2;
15 issue10204_test.Tupe = class Tupe extends core.Object {
16 new() {
17 }
18 get instructionType() {
19 return issue10204_test.a == 2 ? this : new issue10204_test.A();
20 }
21 refine(a, b) {
22 return dart.str`${a}${b}`;
23 }
24 };
25 dart.setSignature(issue10204_test.Tupe, {
26 constructors: () => ({new: dart.definiteFunctionType(issue10204_test.Tupe, [ ])}),
27 methods: () => ({refine: dart.definiteFunctionType(dart.dynamic, [dart.dynam ic, dart.dynamic])})
28 });
29 issue10204_test.Node = class Node extends core.Object {
30 new() {
31 this.inputs = dart.map({a: dart.const(new issue10204_test.Tupe()), b: dart .const(new issue10204_test.Tupe())});
32 this.selector = null;
33 this.isCallOnInterceptor = false;
34 }
35 getDartReceiver() {
36 return dart.test(this.isCallOnInterceptor) ? this.inputs[dartx.get]("a") : this.inputs[dartx.get]("b");
37 }
38 };
39 dart.setSignature(issue10204_test.Node, {
40 methods: () => ({getDartReceiver: dart.definiteFunctionType(dart.dynamic, [] )})
41 });
42 issue10204_test.A = class A extends core.Object {
43 visitInvokeDynamicMethod(node) {
44 let receiverType = dart.dload(dart.dsend(node, 'getDartReceiver'), 'instru ctionType');
45 return dart.dsend(receiverType, 'refine', dart.dload(node, 'selector'), da rt.dload(node, 'selector'));
46 }
47 };
48 dart.setSignature(issue10204_test.A, {
49 methods: () => ({visitInvokeDynamicMethod: dart.definiteFunctionType(dart.dy namic, [dart.dynamic])})
50 });
51 issue10204_test.main = function() {
52 expect$.Expect.equals('nullnull', JSArrayOfA().of([new issue10204_test.A()]) [dartx.last].visitInvokeDynamicMethod(new issue10204_test.Node()));
53 };
54 dart.fn(issue10204_test.main, VoidTodynamic());
55 // Exports:
56 exports.issue10204_test = issue10204_test;
57 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/isnot_malformed_type_test.js ('k') | test/codegen/expect/language/issue10321_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698