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

Side by Side Diff: test/codegen/expect/dart/isolate.js

Issue 1011153002: js: fix core.Object, output order, static const fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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/expect/dart/core.js ('k') | test/codegen/expect/dart/math.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var isolate; 1 var isolate;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class IsolateSpawnException extends dart.Object { 4 class Capability extends core.Object {
5 Capability() {
6 return new _isolate_helper.CapabilityImpl();
7 }
8 }
9 class IsolateSpawnException extends core.Object {
5 IsolateSpawnException(message) { 10 IsolateSpawnException(message) {
6 this.message = message; 11 this.message = message;
7 } 12 }
8 toString() { 13 toString() {
9 return `IsolateSpawnException: ${this.message}`; 14 return `IsolateSpawnException: ${this.message}`;
10 } 15 }
11 } 16 }
12 let _pause = Symbol('_pause'); 17 let _pause = Symbol('_pause');
13 class Isolate extends dart.Object { 18 class Isolate extends core.Object {
14 Isolate(controlPort, opt$) { 19 Isolate(controlPort, opt$) {
15 let pauseCapability = opt$.pauseCapability === void 0 ? null : opt$.pauseC apability; 20 let pauseCapability = opt$.pauseCapability === void 0 ? null : opt$.pauseC apability;
16 let terminateCapability = opt$.terminateCapability === void 0 ? null : opt $.terminateCapability; 21 let terminateCapability = opt$.terminateCapability === void 0 ? null : opt $.terminateCapability;
17 this.controlPort = controlPort; 22 this.controlPort = controlPort;
18 this.pauseCapability = pauseCapability; 23 this.pauseCapability = pauseCapability;
19 this.terminateCapability = terminateCapability; 24 this.terminateCapability = terminateCapability;
20 } 25 }
21 static get current() { 26 static get current() {
22 return dart.as(_currentIsolateCache, Isolate); 27 return dart.as(_currentIsolateCache, Isolate);
23 } 28 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 93 }
89 setErrorsFatal(errorsAreFatal) { 94 setErrorsFatal(errorsAreFatal) {
90 let message = new core.List(3); 95 let message = new core.List(3);
91 dart.dsetindex(message, 0, "set-errors-fatal"); 96 dart.dsetindex(message, 0, "set-errors-fatal");
92 dart.dsetindex(message, 1, this.terminateCapability); 97 dart.dsetindex(message, 1, this.terminateCapability);
93 dart.dsetindex(message, 2, errorsAreFatal); 98 dart.dsetindex(message, 2, errorsAreFatal);
94 this.controlPort.send(message); 99 this.controlPort.send(message);
95 } 100 }
96 kill(priority) { 101 kill(priority) {
97 if (priority === void 0) 102 if (priority === void 0)
98 priority = BEFORE_NEXT_EVENT; 103 priority = Isolate.BEFORE_NEXT_EVENT;
99 this.controlPort.send(new List.from(["kill", this.terminateCapability, pri ority])); 104 this.controlPort.send(new List.from(["kill", this.terminateCapability, pri ority]));
100 } 105 }
101 ping(responsePort, pingType) { 106 ping(responsePort, pingType) {
102 if (pingType === void 0) 107 if (pingType === void 0)
103 pingType = IMMEDIATE; 108 pingType = Isolate.IMMEDIATE;
104 let message = new core.List(3); 109 let message = new core.List(3);
105 dart.dsetindex(message, 0, "ping"); 110 dart.dsetindex(message, 0, "ping");
106 dart.dsetindex(message, 1, responsePort); 111 dart.dsetindex(message, 1, responsePort);
107 dart.dsetindex(message, 2, pingType); 112 dart.dsetindex(message, 2, pingType);
108 this.controlPort.send(message); 113 this.controlPort.send(message);
109 } 114 }
110 addErrorListener(port) { 115 addErrorListener(port) {
111 let message = new core.List(2); 116 let message = new core.List(2);
112 dart.dsetindex(message, 0, "getErrors"); 117 dart.dsetindex(message, 0, "getErrors");
113 dart.dsetindex(message, 1, port); 118 dart.dsetindex(message, 1, port);
(...skipping 27 matching lines...) Expand all
141 } 146 }
142 } 147 }
143 Isolate.IMMEDIATE = 0; 148 Isolate.IMMEDIATE = 0;
144 Isolate.BEFORE_NEXT_EVENT = 1; 149 Isolate.BEFORE_NEXT_EVENT = 1;
145 Isolate.AS_EVENT = 2; 150 Isolate.AS_EVENT = 2;
146 dart.defineLazyProperties(Isolate, { 151 dart.defineLazyProperties(Isolate, {
147 get _currentIsolateCache() { 152 get _currentIsolateCache() {
148 return _isolate_helper.IsolateNatives.currentIsolate; 153 return _isolate_helper.IsolateNatives.currentIsolate;
149 } 154 }
150 }); 155 });
151 class SendPort extends dart.Object { 156 class SendPort extends core.Object {
152 } 157 }
153 class ReceivePort extends dart.Object { 158 class ReceivePort extends core.Object {
154 ReceivePort() { 159 ReceivePort() {
155 return new _isolate_helper.ReceivePortImpl(); 160 return new _isolate_helper.ReceivePortImpl();
156 } 161 }
157 ReceivePort$fromRawReceivePort(rawPort) { 162 ReceivePort$fromRawReceivePort(rawPort) {
158 return new _isolate_helper.ReceivePortImpl.fromRawReceivePort(rawPort); 163 return new _isolate_helper.ReceivePortImpl.fromRawReceivePort(rawPort);
159 } 164 }
160 } 165 }
161 dart.defineNamedConstructor(ReceivePort, 'fromRawReceivePort'); 166 dart.defineNamedConstructor(ReceivePort, 'fromRawReceivePort');
162 class RawReceivePort extends dart.Object { 167 class RawReceivePort extends core.Object {
163 RawReceivePort(handler) { 168 RawReceivePort(handler) {
164 if (handler === void 0) 169 if (handler === void 0)
165 handler = null; 170 handler = null;
166 return new _isolate_helper.RawReceivePortImpl(handler); 171 return new _isolate_helper.RawReceivePortImpl(handler);
167 } 172 }
168 } 173 }
169 class _IsolateUnhandledException extends dart.Object { 174 class _IsolateUnhandledException extends core.Object {
170 _IsolateUnhandledException(message, source, stackTrace) { 175 _IsolateUnhandledException(message, source, stackTrace) {
171 this.message = message; 176 this.message = message;
172 this.source = source; 177 this.source = source;
173 this.stackTrace = stackTrace; 178 this.stackTrace = stackTrace;
174 } 179 }
175 toString() { 180 toString() {
176 return 'IsolateUnhandledException: exception while handling message: ' + ` ${this.message} \n ` + `${dart.dinvoke(dart.dinvoke(this.source, 'toString'), ' replaceAll', "\n", "\n ")}\n` + 'original stack trace:\n ' + `${this.stackTrac e.toString().replaceAll("\n", "\n ")}`; 181 return 'IsolateUnhandledException: exception while handling message: ' + ` ${this.message} \n ` + `${dart.dinvoke(dart.dinvoke(this.source, 'toString'), ' replaceAll', "\n", "\n ")}\n` + 'original stack trace:\n ' + `${this.stackTrac e.toString().replaceAll("\n", "\n ")}`;
177 } 182 }
178 } 183 }
179 let _description = Symbol('_description'); 184 let _description = Symbol('_description');
180 class RemoteError extends dart.Object { 185 class RemoteError extends core.Object {
181 RemoteError(description, stackDescription) { 186 RemoteError(description, stackDescription) {
182 this[_description] = description; 187 this[_description] = description;
183 this.stackTrace = new _RemoteStackTrace(stackDescription); 188 this.stackTrace = new _RemoteStackTrace(stackDescription);
184 } 189 }
185 toString() { 190 toString() {
186 return this[_description]; 191 return this[_description];
187 } 192 }
188 } 193 }
189 let _trace = Symbol('_trace'); 194 let _trace = Symbol('_trace');
190 class _RemoteStackTrace extends dart.Object { 195 class _RemoteStackTrace extends core.Object {
191 _RemoteStackTrace($_trace) { 196 _RemoteStackTrace($_trace) {
192 this[_trace] = $_trace; 197 this[_trace] = $_trace;
193 } 198 }
194 toString() { 199 toString() {
195 return this[_trace]; 200 return this[_trace];
196 } 201 }
197 } 202 }
198 class Capability extends dart.Object {
199 Capability() {
200 return new _isolate_helper.CapabilityImpl();
201 }
202 }
203 // Exports: 203 // Exports:
204 exports.Capability = Capability;
204 exports.IsolateSpawnException = IsolateSpawnException; 205 exports.IsolateSpawnException = IsolateSpawnException;
205 exports.Isolate = Isolate; 206 exports.Isolate = Isolate;
206 exports.SendPort = SendPort; 207 exports.SendPort = SendPort;
207 exports.ReceivePort = ReceivePort; 208 exports.ReceivePort = ReceivePort;
208 exports.RawReceivePort = RawReceivePort; 209 exports.RawReceivePort = RawReceivePort;
209 exports.RemoteError = RemoteError; 210 exports.RemoteError = RemoteError;
210 exports.Capability = Capability;
211 })(isolate || (isolate = {})); 211 })(isolate || (isolate = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/dart/core.js ('k') | test/codegen/expect/dart/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698