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

Side by Side Diff: pkg/fletchc/lib/src/fletch_compiler_hack.dart

Issue 918613002: Refactor implementation to address review comments and API design suggestions from Luke. (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
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.md file.
4
5 part of fletchc.fletch_compiler;
6
7 abstract class FletchCompilerHack extends apiimpl.Compiler {
8 FletchCompilerHack(
9 api.CompilerInputProvider provider,
10 api.CompilerOutputProvider outputProvider,
11 api.DiagnosticHandler handler,
12 Uri libraryRoot,
13 Uri packageRoot,
14 List<String> options,
15 Map<String, dynamic> environment)
16 : super(provider, outputProvider, handler, libraryRoot, packageRoot,
17 options, environment) {
18 switchBackendHack();
19 }
20
21 void switchBackendHack() {
22 // TODO(ahe): Modify dart2js to support a custom backend directly, and
23 // remove this method.
24 int backendTaskCount = backend.tasks.length;
25 int apiimplTaskCount = 2;
26 int baseTaskCount = tasks.length - backendTaskCount - apiimplTaskCount;
27
28 tasks.removeRange(baseTaskCount, baseTaskCount + backendTaskCount);
29
30 backend = new FletchBackend(this);
31 tasks.addAll(backend.tasks);
32 }
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698