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

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

Issue 16035026: Fix 2 host-checked error with the enqueuer: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « sdk/lib/_internal/compiler/implementation/ssa/codegen.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 // Test constant folding. 4 // Test constant folding.
5 5
6 library compiler_helper; 6 library compiler_helper;
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar t' 10 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar t'
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 compiler.phase = Compiler.PHASE_RESOLVING; 64 compiler.phase = Compiler.PHASE_RESOLVING;
65 compiler.backend.enqueueHelpers(compiler.enqueuer.resolution, 65 compiler.backend.enqueueHelpers(compiler.enqueuer.resolution,
66 compiler.globalDependencies); 66 compiler.globalDependencies);
67 compiler.processQueue(compiler.enqueuer.resolution, element); 67 compiler.processQueue(compiler.enqueuer.resolution, element);
68 compiler.world.populate(); 68 compiler.world.populate();
69 var context = new js.JavaScriptItemCompilationContext(); 69 var context = new js.JavaScriptItemCompilationContext();
70 leg.ResolutionWorkItem resolutionWork = 70 leg.ResolutionWorkItem resolutionWork =
71 new leg.ResolutionWorkItem(element, context); 71 new leg.ResolutionWorkItem(element, context);
72 resolutionWork.run(compiler, compiler.enqueuer.resolution); 72 resolutionWork.run(compiler, compiler.enqueuer.resolution);
73 leg.CodegenWorkItem work = 73 leg.CodegenWorkItem work =
74 new leg.CodegenWorkItem(element, resolutionWork.resolutionTree, context); 74 new leg.CodegenWorkItem(element, context);
75 compiler.phase = Compiler.PHASE_COMPILING; 75 compiler.phase = Compiler.PHASE_COMPILING;
76 work.run(compiler, compiler.enqueuer.codegen); 76 work.run(compiler, compiler.enqueuer.codegen);
77 js.JavaScriptBackend backend = compiler.backend; 77 js.JavaScriptBackend backend = compiler.backend;
78 return backend.assembleCode(element); 78 return backend.assembleCode(element);
79 } 79 }
80 80
81 MockCompiler compilerFor(String code, Uri uri, 81 MockCompiler compilerFor(String code, Uri uri,
82 {bool analyzeAll: false, 82 {bool analyzeAll: false,
83 bool analyzeOnly: false, 83 bool analyzeOnly: false,
84 String coreSource: DEFAULT_CORELIB}) { 84 String coreSource: DEFAULT_CORELIB}) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 final xRe = new RegExp('\\bx\\b'); 209 final xRe = new RegExp('\\bx\\b');
210 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 210 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
211 final spaceRe = new RegExp('\\s+'); 211 final spaceRe = new RegExp('\\s+');
212 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 212 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
213 if (shouldMatch) { 213 if (shouldMatch) {
214 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 214 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
215 } else { 215 } else {
216 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 216 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
217 } 217 }
218 } 218 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698