| Index: lib/src/codegen/js_codegen.dart
|
| diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
|
| index b93b8cfc83122bab103466140185a7a1a723dc32..6e39a3e789e18732d39469527475c1bcdd492a5c 100644
|
| --- a/lib/src/codegen/js_codegen.dart
|
| +++ b/lib/src/codegen/js_codegen.dart
|
| @@ -235,7 +235,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| var lhs = _visit(node.expression);
|
| var typeofName = _jsTypeofName(type);
|
| if (typeofName != null) {
|
| - result = js.call('typeof # == #', [lhs, typeofName]);
|
| + result = js.call('typeof # == #', [lhs, js.string(typeofName, "'")]);
|
| } else {
|
| // Always go through a runtime helper, because implicit interfaces.
|
| result = js.call('dart.is(#, #)', [lhs, _emitTypeName(type)]);
|
| @@ -1913,8 +1913,8 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| @override
|
| visitListLiteral(ListLiteral node) {
|
| // TODO(jmesserly): make this faster. We're wasting an array.
|
| - var list = js.call('new List.from(#)',
|
| - [new JS.ArrayInitializer(_visitList(node.elements))]);
|
| + var list = js.call('new #.from(#)',
|
| + [_emitTypeName(node.staticType), new JS.ArrayInitializer(_visitList(node.elements))]);
|
| if (node.constKeyword != null) {
|
| list = js.commentExpression('Unimplemented const', list);
|
| }
|
| @@ -2025,11 +2025,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| return result;
|
| }
|
|
|
| - JS.Statement _visitOrEmpty(Statement node) {
|
| - if (node == null) return new JS.EmptyStatement();
|
| - return _visit(node);
|
| - }
|
| -
|
| List _visitList(Iterable<AstNode> nodes) {
|
| if (nodes == null) return null;
|
| var result = [];
|
|
|