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

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

Issue 1183453005: fixes #226 super == and fixes #227 escape \r \f (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
« no previous file with comments | « lib/src/js/builder.dart ('k') | test/codegen/expect/misc.txt » ('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_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 ], function(exports, dart, core) { 5 ], function(exports, dart, core) {
6 'use strict'; 6 'use strict';
7 let dartx = dart.dartx; 7 let dartx = dart.dartx;
8 class _Uninitialized extends core.Object { 8 class _Uninitialized extends core.Object {
9 _Uninitialized() { 9 _Uninitialized() {
10 } 10 }
11 } 11 }
12 dart.setSignature(_Uninitialized, { 12 dart.setSignature(_Uninitialized, {
13 constructors: () => ({_Uninitialized: [_Uninitialized, []]}) 13 constructors: () => ({_Uninitialized: [_Uninitialized, []]})
14 }); 14 });
15 let UNINITIALIZED = dart.const(new _Uninitialized()); 15 let UNINITIALIZED = dart.const(new _Uninitialized());
16 let Generic$ = dart.generic(function(T) { 16 let Generic$ = dart.generic(function(T) {
17 class Generic extends core.Object { 17 class Generic extends core.Object {
18 get type() { 18 get type() {
19 return Generic$(); 19 return Generic$();
20 } 20 }
21 } 21 }
22 return Generic; 22 return Generic;
23 }); 23 });
24 let Generic = Generic$(); 24 let Generic = Generic$();
25 class Base extends core.Object {
26 Base() {
27 this.x = 1;
28 this.y = 2;
29 }
30 ['=='](obj) {
31 return dart.is(obj, Base) && dart.equals(dart.dload(obj, 'x'), this.x) && dart.equals(dart.dload(obj, 'y'), this.y);
32 }
33 }
34 class Derived extends core.Object {
35 Derived() {
36 this.z = 3;
37 }
38 ['=='](obj) {
39 return dart.is(obj, Derived) && dart.equals(dart.dload(obj, 'z'), this.z) && super['=='](obj);
40 }
41 }
42 function _isWhitespace(ch) {
43 return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
44 }
45 dart.fn(_isWhitespace, core.bool, [core.String]);
46 let _escapeMap = dart.const(dart.map({'\n': '\\n', '\r': '\\r', '\f': '\\f', ' \b': '\\b', '\t': '\\t', '\v': '\\v', '': '\\x7F'}));
25 function main() { 47 function main() {
26 core.print(dart.toString(1)); 48 core.print(dart.toString(1));
27 core.print(dart.toString(1.0)); 49 core.print(dart.toString(1.0));
28 core.print(dart.toString(1.1)); 50 core.print(dart.toString(1.1));
29 let x = 42; 51 let x = 42;
30 core.print(dart.equals(x, core.Object)); 52 core.print(dart.equals(x, core.Object));
31 core.print(dart.equals(x, Generic)); 53 core.print(dart.equals(x, Generic));
32 core.print(new (Generic$(core.int))().type); 54 core.print(new (Generic$(core.int))().type);
55 core.print(dart.equals(new Derived(), new Derived()));
33 } 56 }
34 dart.fn(main); 57 dart.fn(main);
35 // Exports: 58 // Exports:
36 exports.UNINITIALIZED = UNINITIALIZED; 59 exports.UNINITIALIZED = UNINITIALIZED;
37 exports.Generic$ = Generic$; 60 exports.Generic$ = Generic$;
38 exports.Generic = Generic; 61 exports.Generic = Generic;
62 exports.Base = Base;
63 exports.Derived = Derived;
39 exports.main = main; 64 exports.main = main;
40 }); 65 });
OLDNEW
« no previous file with comments | « lib/src/js/builder.dart ('k') | test/codegen/expect/misc.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698