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

Side by Side Diff: tests/utils/dummy_compiler_test.dart

Issue 338103004: Use metadata for patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | no next file » | 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 // VMOptions= 4 // VMOptions=
5 // VMOptions=--print-object-histogram 5 // VMOptions=--print-object-histogram
6 6
7 // Smoke test of the dart2js compiler API. 7 // Smoke test of the dart2js compiler API.
8 library dummy_compiler; 8 library dummy_compiler;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 getDispatchProperty(o) {} 93 getDispatchProperty(o) {}
94 setDispatchProperty(o, v) {} 94 setDispatchProperty(o, v) {}
95 var mapTypeToInterceptor;"""; 95 var mapTypeToInterceptor;""";
96 } else if (uri.path.endsWith('js_helper.dart')) { 96 } else if (uri.path.endsWith('js_helper.dart')) {
97 return """ 97 return """
98 library jshelper; class JSInvocationMirror {} 98 library jshelper; class JSInvocationMirror {}
99 class ConstantMap {} class TypeImpl {} 99 class ConstantMap {} class TypeImpl {}
100 createRuntimeType(String name) => null; 100 createRuntimeType(String name) => null;
101 class Closure {} 101 class Closure {}
102 class BoundClosure extends Closure {} 102 class BoundClosure extends Closure {}
103 const patch = 0;
103 """; 104 """;
104 } else if (uri.path.endsWith('isolate_helper.dart')) { 105 } else if (uri.path.endsWith('isolate_helper.dart')) {
105 return 'library isolatehelper; class _WorkerStub {}'; 106 return 'library isolatehelper; class _WorkerStub {}';
106 } else { 107 } else {
107 return "library lib${uri.path.replaceAll('/', '.')};"; 108 return "library lib${uri.path.replaceAll('/', '.')};";
108 } 109 }
109 } 110 }
110 111
111 Future<String> provider(Uri uri) { 112 Future<String> provider(Uri uri) {
112 String source; 113 String source;
(...skipping 23 matching lines...) Expand all
136 new Uri(scheme: 'package', path: '/'), 137 new Uri(scheme: 'package', path: '/'),
137 provider, handler); 138 provider, handler);
138 result.then((String code) { 139 result.then((String code) {
139 if (code == null) { 140 if (code == null) {
140 throw 'Compilation failed'; 141 throw 'Compilation failed';
141 } 142 }
142 }, onError: (e) { 143 }, onError: (e) {
143 throw 'Compilation failed'; 144 throw 'Compilation failed';
144 }).then(asyncSuccess); 145 }).then(asyncSuccess);
145 } 146 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698