Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| index fdf96ab52963ad969e39779c8df3113e6f766039..1dfe675bc360b7beb4f3fbc28a3ada3ab2cbdc34 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart |
| @@ -758,7 +758,13 @@ class JavaScriptBackend extends Backend { |
| void codegen(CodegenWorkItem work) { |
| Element element = work.element; |
| - if (element.kind.category == ElementCategory.VARIABLE) { |
| + var kind = element.kind; |
| + if (kind == ElementKind.TYPEDEF) return; |
| + if (element.isConstructor() && element.getEnclosingClass() == jsNullClass) { |
| + // Work around a problem compiling JSNull's constructor. |
|
ahe
2013/06/11 15:43:00
I had to move the work around here to make it more
|
| + return; |
| + } |
| + if (kind.category == ElementCategory.VARIABLE) { |
| Constant initialValue = compiler.constantHandler.compileWorkItem(work); |
| if (initialValue != null) { |
| return; |