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

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

Issue 2349163003: Move towards using WorldImpact for codegen (Closed)
Patch Set: Reinsert missing features uses. Created 4 years, 2 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 | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/map_tracer_test.dart » ('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 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/src/elements/elements.dart' as lego; 10 import 'package:compiler/src/elements/elements.dart' as lego;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, 68 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
69 outputProvider: outputCollector); 69 outputProvider: outputCollector);
70 await compiler.init(); 70 await compiler.init();
71 compiler.parseScript(code); 71 compiler.parseScript(code);
72 lego.Element element = compiler.mainApp.find(entry); 72 lego.Element element = compiler.mainApp.find(entry);
73 if (element == null) return null; 73 if (element == null) return null;
74 compiler.phase = Compiler.PHASE_RESOLVING; 74 compiler.phase = Compiler.PHASE_RESOLVING;
75 compiler.backend.enqueueHelpers( 75 compiler.backend.enqueueHelpers(
76 compiler.enqueuer.resolution, compiler.globalDependencies); 76 compiler.enqueuer.resolution, compiler.globalDependencies);
77 compiler.processQueue(compiler.enqueuer.resolution, element); 77 compiler.processQueue(compiler.enqueuer.resolution, element);
78 compiler.openWorld.populate(); 78 compiler.openWorld.closeWorld();
79 compiler.backend.onResolutionComplete(); 79 compiler.backend.onResolutionComplete();
80 ResolutionWorkItem resolutionWork = new ResolutionWorkItem(element); 80 ResolutionWorkItem resolutionWork = new ResolutionWorkItem(element);
81 resolutionWork.run(compiler, compiler.enqueuer.resolution); 81 resolutionWork.run(compiler, compiler.enqueuer.resolution);
82 CodegenWorkItem work = new CodegenWorkItem(compiler, element); 82 CodegenWorkItem work = new CodegenWorkItem(compiler, element);
83 compiler.phase = Compiler.PHASE_COMPILING; 83 compiler.phase = Compiler.PHASE_COMPILING;
84 work.run(compiler, compiler.enqueuer.codegen); 84 work.run(compiler, compiler.enqueuer.codegen);
85 js.JavaScriptBackend backend = compiler.backend; 85 js.JavaScriptBackend backend = compiler.backend;
86 String generated = backend.getGeneratedCode(element); 86 String generated = backend.getGeneratedCode(element);
87 if (check != null) { 87 if (check != null) {
88 check(generated); 88 check(generated);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 281 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
282 final spaceRe = new RegExp('\\s+'); 282 final spaceRe = new RegExp('\\s+');
283 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 283 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
284 if (shouldMatch) { 284 if (shouldMatch) {
285 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 285 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
286 } else { 286 } else {
287 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 287 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
288 } 288 }
289 }); 289 });
290 } 290 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/map_tracer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698