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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 813013002: Don't try to compile platform libraries with the new backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index 8345894e97778b1f5f02be77010bffb511661e18..9288e742392bd5113d06f0dee117267bfc79d974 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -64,6 +64,10 @@ class CspFunctionCompiler implements FunctionCompiler {
types = new TypeMaskSystem(compiler);
AstElement element = work.element;
return compiler.withCurrentElement(element, () {
+ if (element.library.isPlatformLibrary) {
+ compiler.log('Using SSA compiler for platform element $element');
+ return fallbackCompiler.compile(work);
+ }
try {
if (tracer != null) {
tracer.traceCompilation(element.name, null);
@@ -74,15 +78,9 @@ class CspFunctionCompiler implements FunctionCompiler {
treeFunction = optimizeTreeIR(treeFunction);
return compileToJavaScript(work, treeFunction);
} on CodegenBailout catch (e) {
- if (element.library.isPlatformLibrary) {
- compiler.log('Falling back to SSA compiler for $element'
- ' (${e.message})');
- return fallbackCompiler.compile(work);
- } else {
- String message = "Unable to compile $element with the new compiler.\n"
- " Reason: ${e.message}";
- compiler.internalError(element, message);
- }
+ String message = "Unable to compile $element with the new compiler.\n"
+ " Reason: ${e.message}";
+ compiler.internalError(element, message);
}
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698