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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1681293005: Fix JS-intrinsic definition of SDK classes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/runtime/dart/_runtime.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 005808114b65eefe3e35961473b15a75dcb16424..2a8e4b61c52c3f30494d95e721f4f91a102aa44f 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -2399,6 +2399,9 @@ class JSCodegenVisitor extends GeneralizingAstVisitor
if (isPublic(fieldName)) _addExport(fieldName, exportName);
var declKeyword = field.isConst || field.isFinal ? 'const' : 'let';
+ if (isJSTopLevel && jsInit is JS.ClassExpression) {
+ return new JS.ClassDeclaration(jsInit);
+ }
return js.statement('#;', [
annotate(
new JS.VariableDeclarationList(declKeyword, [
« no previous file with comments | « lib/runtime/dart/_runtime.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698