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

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

Issue 1086413002: dart2js: reify type variables as result of class enqueueing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 8 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/js_backend/type_variable_handler.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 disableInlining: disableInlining); 62 disableInlining: disableInlining);
63 return compiler.init().then((_) { 63 return compiler.init().then((_) {
64 compiler.parseScript(code); 64 compiler.parseScript(code);
65 lego.Element element = compiler.mainApp.find(entry); 65 lego.Element element = compiler.mainApp.find(entry);
66 if (element == null) return null; 66 if (element == null) return null;
67 compiler.phase = Compiler.PHASE_RESOLVING; 67 compiler.phase = Compiler.PHASE_RESOLVING;
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 var context = new js.JavaScriptItemCompilationContext(); 73 var context = new js.JavaScriptItemCompilationContext();
73 leg.ResolutionWorkItem resolutionWork = 74 leg.ResolutionWorkItem resolutionWork =
74 new leg.ResolutionWorkItem(element, context); 75 new leg.ResolutionWorkItem(element, context);
75 resolutionWork.run(compiler, compiler.enqueuer.resolution); 76 resolutionWork.run(compiler, compiler.enqueuer.resolution);
76 leg.CodegenWorkItem work = 77 leg.CodegenWorkItem work =
77 new leg.CodegenWorkItem(element, context); 78 new leg.CodegenWorkItem(element, context);
78 compiler.phase = Compiler.PHASE_COMPILING; 79 compiler.phase = Compiler.PHASE_COMPILING;
79 work.run(compiler, compiler.enqueuer.codegen); 80 work.run(compiler, compiler.enqueuer.codegen);
80 js.JavaScriptBackend backend = compiler.backend; 81 js.JavaScriptBackend backend = compiler.backend;
81 String generated = backend.assembleCode(element); 82 String generated = backend.assembleCode(element);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 258 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
258 final spaceRe = new RegExp('\\s+'); 259 final spaceRe = new RegExp('\\s+');
259 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 260 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
260 if (shouldMatch) { 261 if (shouldMatch) {
261 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 262 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
262 } else { 263 } else {
263 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 264 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
264 } 265 }
265 }); 266 });
266 } 267 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/type_variable_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698