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

Unified Diff: dart/pkg/compiler/lib/src/js_backend/backend.dart

Issue 828413004: Don’t exit prematurely if compilation failed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: dart/pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/dart/pkg/compiler/lib/src/js_backend/backend.dart b/dart/pkg/compiler/lib/src/js_backend/backend.dart
index d57e9a2a3e6372a29f937e3a4f79c5f0e5aedfae..48544c30a2b70c18aa28b8c755fff358c8d5572e 100644
--- a/dart/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/dart/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1200,6 +1200,11 @@ class JavaScriptBackend extends Backend {
void codegen(CodegenWorkItem work) {
Element element = work.element;
+ if (compiler.elementHasCompileTimeError(element)) {
+ generatedCode[element] = jsAst.js(
+ "function () { throw new Error('Compile time error in $element') }");
+ return;
+ }
var kind = element.kind;
if (kind == ElementKind.TYPEDEF) return;
if (element.isConstructor && element.enclosingClass == jsNullClass) {

Powered by Google App Engine
This is Rietveld 408576698