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

Side by Side Diff: test/codegen/expect/misc.js

Issue 1944483002: Redo how Type objects are exposed from DDC. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: More tweaks. Created 4 years, 7 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/browser/runtime_tests.js ('k') | test/codegen/language/type_literal_test.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('misc', null, /* Imports */[ 1 dart_library.library('misc', null, /* Imports */[
2 'dart_sdk' 2 'dart_sdk'
3 ], function(exports, dart_sdk) { 3 ], function(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 misc = Object.create(null); 8 const misc = Object.create(null);
9 misc._Uninitialized = class _Uninitialized extends core.Object { 9 misc._Uninitialized = class _Uninitialized extends core.Object {
10 _Uninitialized() { 10 _Uninitialized() {
11 } 11 }
12 }; 12 };
13 dart.setSignature(misc._Uninitialized, { 13 dart.setSignature(misc._Uninitialized, {
14 constructors: () => ({_Uninitialized: [misc._Uninitialized, []]}) 14 constructors: () => ({_Uninitialized: [misc._Uninitialized, []]})
15 }); 15 });
16 misc.UNINITIALIZED = dart.const(new misc._Uninitialized()); 16 misc.UNINITIALIZED = dart.const(new misc._Uninitialized());
17 misc.Generic$ = dart.generic(T => { 17 misc.Generic$ = dart.generic(T => {
18 class Generic extends core.Object { 18 class Generic extends core.Object {
19 get type() { 19 get type() {
20 return misc.Generic; 20 return dart.wrapType(misc.Generic);
21 } 21 }
22 m() { 22 m() {
23 return core.print(T); 23 return core.print(dart.wrapType(T));
24 } 24 }
25 } 25 }
26 dart.setSignature(Generic, { 26 dart.setSignature(Generic, {
27 methods: () => ({m: [dart.dynamic, []]}) 27 methods: () => ({m: [dart.dynamic, []]})
28 }); 28 });
29 return Generic; 29 return Generic;
30 }); 30 });
31 misc.Generic = misc.Generic$(); 31 misc.Generic = misc.Generic$();
32 misc.Base = class Base extends core.Object { 32 misc.Base = class Base extends core.Object {
33 Base() { 33 Base() {
(...skipping 16 matching lines...) Expand all
50 return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'; 50 return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
51 }; 51 };
52 dart.fn(misc._isWhitespace, core.bool, [core.String]); 52 dart.fn(misc._isWhitespace, core.bool, [core.String]);
53 misc.expr = 'foo'; 53 misc.expr = 'foo';
54 misc._escapeMap = dart.const(dart.map({'\n': '\\n', '\r': '\\r', '\f': '\\f', '\b': '\\b', '\t': '\\t', '\v': '\\v', '': '\\x7F', [`\${${misc.expr}}`]: ''})) ; 54 misc._escapeMap = dart.const(dart.map({'\n': '\\n', '\r': '\\r', '\f': '\\f', '\b': '\\b', '\t': '\\t', '\v': '\\v', '': '\\x7F', [`\${${misc.expr}}`]: ''})) ;
55 misc.main = function() { 55 misc.main = function() {
56 core.print(dart.toString(1)); 56 core.print(dart.toString(1));
57 core.print(dart.toString(1.0)); 57 core.print(dart.toString(1.0));
58 core.print(dart.toString(1.1)); 58 core.print(dart.toString(1.1));
59 let x = 42; 59 let x = 42;
60 core.print(dart.equals(x, dart.dynamic)); 60 core.print(dart.equals(x, dart.wrapType(dart.dynamic)));
61 core.print(dart.equals(x, misc.Generic)); 61 core.print(dart.equals(x, dart.wrapType(misc.Generic)));
62 core.print(new (misc.Generic$(core.int))().type); 62 core.print(new (misc.Generic$(core.int))().type);
63 core.print(dart.equals(new misc.Derived(), new misc.Derived())); 63 core.print(dart.equals(new misc.Derived(), new misc.Derived()));
64 new (misc.Generic$(core.int))().m(); 64 new (misc.Generic$(core.int))().m();
65 }; 65 };
66 dart.fn(misc.main); 66 dart.fn(misc.main);
67 // Exports: 67 // Exports:
68 exports.misc = misc; 68 exports.misc = misc;
69 }); 69 });
OLDNEW
« no previous file with comments | « test/browser/runtime_tests.js ('k') | test/codegen/language/type_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698