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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 266913017: Convert property methods into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 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 | Annotate | Revision Log
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 mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 return resolveNodeStatement(parsedTree, mainApp); 406 return resolveNodeStatement(parsedTree, mainApp);
407 } 407 }
408 408
409 TreeElementMapping resolveNodeStatement(Node tree, Element element) { 409 TreeElementMapping resolveNodeStatement(Node tree, Element element) {
410 ResolverVisitor visitor = 410 ResolverVisitor visitor =
411 new ResolverVisitor(this, element, new CollectingTreeElements(element)); 411 new ResolverVisitor(this, element, new CollectingTreeElements(element));
412 if (visitor.scope is LibraryScope) { 412 if (visitor.scope is LibraryScope) {
413 visitor.scope = new MethodScope(visitor.scope, element); 413 visitor.scope = new MethodScope(visitor.scope, element);
414 } 414 }
415 visitor.visit(tree); 415 visitor.visit(tree);
416 visitor.scope = new LibraryScope(element.getLibrary()); 416 visitor.scope = new LibraryScope(element.library);
417 return visitor.mapping; 417 return visitor.mapping;
418 } 418 }
419 419
420 resolverVisitor() { 420 resolverVisitor() {
421 Element mockElement = 421 Element mockElement =
422 new FunctionElementX('', ElementKind.FUNCTION, Modifiers.EMPTY, 422 new FunctionElementX('', ElementKind.FUNCTION, Modifiers.EMPTY,
423 mainApp.entryCompilationUnit, false); 423 mainApp.entryCompilationUnit, false);
424 ResolverVisitor visitor = 424 ResolverVisitor visitor =
425 new ResolverVisitor(this, mockElement, 425 new ResolverVisitor(this, mockElement,
426 new CollectingTreeElements(mockElement)); 426 new CollectingTreeElements(mockElement));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } else { 580 } else {
581 sourceFile = compiler.sourceFiles[uri.toString()]; 581 sourceFile = compiler.sourceFiles[uri.toString()];
582 } 582 }
583 if (sourceFile != null && begin != null && end != null) { 583 if (sourceFile != null && begin != null && end != null) {
584 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 584 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x));
585 } else { 585 } else {
586 print(message); 586 print(message);
587 } 587 }
588 }; 588 };
589 } 589 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/memory_compiler.dart ('k') | tests/compiler/dart2js/reexport_handled_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698