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

Side by Side Diff: pkg/dartdoc/mirrors/dart2js_mirror.dart

Issue 10836312: Add a couple of workarounds for issues caused by current dart2js patch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('mirrors.dart2js'); 5 #library('mirrors.dart2js');
6 6
7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); 7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics');
8 #import('../../../lib/compiler/implementation/elements/elements.dart'); 8 #import('../../../lib/compiler/implementation/elements/elements.dart');
9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api'); 9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api');
10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart'); 10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart');
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 backend.processNativeClasses(world, libraries.getValues()); 237 backend.processNativeClasses(world, libraries.getValues());
238 for (var library in elements) { 238 for (var library in elements) {
239 library.localMembers.forEach((element) { 239 library.localMembers.forEach((element) {
240 world.addToWorkList(element); 240 world.addToWorkList(element);
241 }); 241 });
242 } 242 }
243 progress.reset(); 243 progress.reset();
244 world.forEach((WorkItem work) { 244 world.forEach((WorkItem work) {
245 withCurrentElement(work.element, () => work.run(this, world)); 245 withCurrentElement(work.element, () => work.run(this, world));
246 }); 246 });
247 //world.queueIsClosed = true;
248 assert(world.checkNoEnqueuedInvokedInstanceMethods());
249 } 247 }
250 248
251 String codegen(WorkItem work, Enqueuer world) { 249 String codegen(WorkItem work, Enqueuer world) {
252 return null; 250 return null;
253 } 251 }
254 } 252 }
255 253
256 // TODO(johnniwinther): The source for the apidoc includes calls to methods on 254 // TODO(johnniwinther): The source for the apidoc includes calls to methods on
257 // for instance [MathPrimitives] which are not resolved by dart2js. Since we 255 // for instance [MathPrimitives] which are not resolved by dart2js. Since we
258 // do not need to analyse the body of functions to produce the documenation 256 // do not need to analyse the body of functions to produce the documenation
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 bool get isSetter() => _kind == Dart2JsMethodKind.SETTER; 1299 bool get isSetter() => _kind == Dart2JsMethodKind.SETTER;
1302 1300
1303 bool get isOperator() => _kind == Dart2JsMethodKind.OPERATOR; 1301 bool get isOperator() => _kind == Dart2JsMethodKind.OPERATOR;
1304 1302
1305 String get operatorName() => _operatorName; 1303 String get operatorName() => _operatorName;
1306 1304
1307 Location get location() { 1305 Location get location() {
1308 var node = _function.parseNode(_diagnosticListener); 1306 var node = _function.parseNode(_diagnosticListener);
1309 if (node !== null) { 1307 if (node !== null) {
1310 var script = _function.getCompilationUnit().script; 1308 var script = _function.getCompilationUnit().script;
1309 if (_function.isPatched) {
1310 // TODO(ager): This should not be necessary when patch
1311 // support has been reworked.
1312 script = _function.patch.getCompilationUnit().script;
1313 }
1311 var span = system.compiler.spanFromNode(node, script.uri); 1314 var span = system.compiler.spanFromNode(node, script.uri);
1312 return new Dart2JsLocation(script, span); 1315 return new Dart2JsLocation(script, span);
1313 } 1316 }
1314 return super.location; 1317 return super.location;
1315 } 1318 }
1316 1319
1317 } 1320 }
1318 1321
1319 class Dart2JsFieldMirror extends Dart2JsElementMirror 1322 class Dart2JsFieldMirror extends Dart2JsElementMirror
1320 implements Dart2JsMemberMirror, FieldMirror { 1323 implements Dart2JsMemberMirror, FieldMirror {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 if (node !== null) { 1361 if (node !== null) {
1359 var span = system.compiler.spanFromNode(node, script.uri); 1362 var span = system.compiler.spanFromNode(node, script.uri);
1360 return new Dart2JsLocation(script, span); 1363 return new Dart2JsLocation(script, span);
1361 } else { 1364 } else {
1362 var span = system.compiler.spanFromElement(_variable); 1365 var span = system.compiler.spanFromElement(_variable);
1363 return new Dart2JsLocation(script, span); 1366 return new Dart2JsLocation(script, span);
1364 } 1367 }
1365 } 1368 }
1366 } 1369 }
1367 1370
OLDNEW
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | utils/apidoc/apidoc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698