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

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

Issue 1126163002: Improve resolution/codegen separation invariant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/enqueue.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 4
5 library compiler_helper; 5 library compiler_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 import 'package:compiler/compiler.dart' as api; 10 import 'package:compiler/compiler.dart' as api;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 compiler.backend.enqueueHelpers(compiler.enqueuer.resolution, 68 compiler.backend.enqueueHelpers(compiler.enqueuer.resolution,
69 compiler.globalDependencies); 69 compiler.globalDependencies);
70 compiler.processQueue(compiler.enqueuer.resolution, element); 70 compiler.processQueue(compiler.enqueuer.resolution, element);
71 compiler.world.populate(); 71 compiler.world.populate();
72 compiler.backend.onResolutionComplete(); 72 compiler.backend.onResolutionComplete();
73 var context = new js.JavaScriptItemCompilationContext(); 73 var context = new js.JavaScriptItemCompilationContext();
74 leg.ResolutionWorkItem resolutionWork = 74 leg.ResolutionWorkItem resolutionWork =
75 new leg.ResolutionWorkItem(element, context); 75 new leg.ResolutionWorkItem(element, context);
76 resolutionWork.run(compiler, compiler.enqueuer.resolution); 76 resolutionWork.run(compiler, compiler.enqueuer.resolution);
77 leg.CodegenWorkItem work = 77 leg.CodegenWorkItem work =
78 new leg.CodegenWorkItem(element, context); 78 new leg.CodegenWorkItem(compiler, element, context);
79 compiler.phase = Compiler.PHASE_COMPILING; 79 compiler.phase = Compiler.PHASE_COMPILING;
80 work.run(compiler, compiler.enqueuer.codegen); 80 work.run(compiler, compiler.enqueuer.codegen);
81 js.JavaScriptBackend backend = compiler.backend; 81 js.JavaScriptBackend backend = compiler.backend;
82 String generated = backend.assembleCode(element); 82 String generated = backend.assembleCode(element);
83 if (check != null) { 83 if (check != null) {
84 check(generated); 84 check(generated);
85 } 85 }
86 return generated; 86 return generated;
87 }); 87 });
88 } 88 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 259 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
260 final spaceRe = new RegExp('\\s+'); 260 final spaceRe = new RegExp('\\s+');
261 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 261 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
262 if (shouldMatch) { 262 if (shouldMatch) {
263 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 263 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
264 } else { 264 } else {
265 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 265 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
266 } 266 }
267 }); 267 });
268 } 268 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698