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

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

Issue 2716713003: Move main and isolate handling to enqueuer listeners. (Closed)
Patch Set: Created 3 years, 9 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/tool/perf.dart ('k') | tests/compiler/dart2js/kernel/closed_world_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/compiler_new.dart'; 10 import 'package:compiler/compiler_new.dart';
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 disableTypeInference: true, 67 disableTypeInference: true,
68 enableMinification: minify, 68 enableMinification: minify,
69 disableInlining: disableInlining, 69 disableInlining: disableInlining,
70 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations, 70 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
71 outputProvider: outputCollector); 71 outputProvider: outputCollector);
72 await compiler.init(); 72 await compiler.init();
73 compiler.parseScript(code); 73 compiler.parseScript(code);
74 lego.Element element = compiler.mainApp.find(entry); 74 lego.Element element = compiler.mainApp.find(entry);
75 if (element == null) return null; 75 if (element == null) return null;
76 compiler.phase = Compiler.PHASE_RESOLVING; 76 compiler.phase = Compiler.PHASE_RESOLVING;
77 compiler.enqueuer.resolution 77 compiler.processQueue(compiler.enqueuer.resolution, element,
78 .applyImpact(compiler.backend.computeHelpersImpact()); 78 compiler.libraryLoader.libraries);
79 compiler.processQueue(compiler.enqueuer.resolution, element);
80 ResolutionWorkItem resolutionWork = 79 ResolutionWorkItem resolutionWork =
81 new ResolutionWorkItem(compiler.resolution, element); 80 new ResolutionWorkItem(compiler.resolution, element);
82 resolutionWork.run(); 81 resolutionWork.run();
83 compiler.closeResolution(); 82 compiler.closeResolution();
84 CodegenWorkItem work = new CodegenWorkItem(compiler.backend, element); 83 CodegenWorkItem work = new CodegenWorkItem(compiler.backend, element);
85 compiler.phase = Compiler.PHASE_COMPILING; 84 compiler.phase = Compiler.PHASE_COMPILING;
86 work.run(); 85 work.run();
87 js.JavaScriptBackend backend = compiler.backend; 86 js.JavaScriptBackend backend = compiler.backend;
88 String generated = backend.getGeneratedCode(element); 87 String generated = backend.getGeneratedCode(element);
89 if (check != null) { 88 if (check != null) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 292 }
294 } 293 }
295 294
296 return checker; 295 return checker;
297 } 296 }
298 297
299 RegExp _directivePattern = new RegExp( 298 RegExp _directivePattern = new RegExp(
300 // \1 \2 \3 299 // \1 \2 \3
301 r'''// *(present|absent): *(?:"([^"]*)"|'([^'']*)')''', 300 r'''// *(present|absent): *(?:"([^"]*)"|'([^'']*)')''',
302 multiLine: true); 301 multiLine: true);
OLDNEW
« no previous file with comments | « pkg/compiler/tool/perf.dart ('k') | tests/compiler/dart2js/kernel/closed_world_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698