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

Side by Side Diff: compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java

Issue 8948001: Updates dartc to recognize 'default' keyword on interface and updated factory method syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from mmendez Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler.backend.js; 5 package com.google.dart.compiler.backend.js;
6 6
7 import com.google.common.collect.Lists; 7 import com.google.common.collect.Lists;
8 import com.google.dart.compiler.DartCompilationError; 8 import com.google.dart.compiler.DartCompilationError;
9 import com.google.dart.compiler.DartCompilerContext; 9 import com.google.dart.compiler.DartCompilerContext;
10 import com.google.dart.compiler.InternalCompilerException; 10 import com.google.dart.compiler.InternalCompilerException;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 import com.google.dart.compiler.ast.DartMethodDefinition; 48 import com.google.dart.compiler.ast.DartMethodDefinition;
49 import com.google.dart.compiler.ast.DartMethodInvocation; 49 import com.google.dart.compiler.ast.DartMethodInvocation;
50 import com.google.dart.compiler.ast.DartNamedExpression; 50 import com.google.dart.compiler.ast.DartNamedExpression;
51 import com.google.dart.compiler.ast.DartNativeBlock; 51 import com.google.dart.compiler.ast.DartNativeBlock;
52 import com.google.dart.compiler.ast.DartNativeDirective; 52 import com.google.dart.compiler.ast.DartNativeDirective;
53 import com.google.dart.compiler.ast.DartNewExpression; 53 import com.google.dart.compiler.ast.DartNewExpression;
54 import com.google.dart.compiler.ast.DartNode; 54 import com.google.dart.compiler.ast.DartNode;
55 import com.google.dart.compiler.ast.DartNodeTraverser; 55 import com.google.dart.compiler.ast.DartNodeTraverser;
56 import com.google.dart.compiler.ast.DartNullLiteral; 56 import com.google.dart.compiler.ast.DartNullLiteral;
57 import com.google.dart.compiler.ast.DartParameter; 57 import com.google.dart.compiler.ast.DartParameter;
58 import com.google.dart.compiler.ast.DartParameterizedNode; 58 import com.google.dart.compiler.ast.DartParameterizedTypeNode;
59 import com.google.dart.compiler.ast.DartParenthesizedExpression; 59 import com.google.dart.compiler.ast.DartParenthesizedExpression;
60 import com.google.dart.compiler.ast.DartPlainVisitor; 60 import com.google.dart.compiler.ast.DartPlainVisitor;
61 import com.google.dart.compiler.ast.DartPropertyAccess; 61 import com.google.dart.compiler.ast.DartPropertyAccess;
62 import com.google.dart.compiler.ast.DartRedirectConstructorInvocation; 62 import com.google.dart.compiler.ast.DartRedirectConstructorInvocation;
63 import com.google.dart.compiler.ast.DartResourceDirective; 63 import com.google.dart.compiler.ast.DartResourceDirective;
64 import com.google.dart.compiler.ast.DartReturnStatement; 64 import com.google.dart.compiler.ast.DartReturnStatement;
65 import com.google.dart.compiler.ast.DartSourceDirective; 65 import com.google.dart.compiler.ast.DartSourceDirective;
66 import com.google.dart.compiler.ast.DartStatement; 66 import com.google.dart.compiler.ast.DartStatement;
67 import com.google.dart.compiler.ast.DartStringInterpolation; 67 import com.google.dart.compiler.ast.DartStringInterpolation;
68 import com.google.dart.compiler.ast.DartStringLiteral; 68 import com.google.dart.compiler.ast.DartStringLiteral;
(...skipping 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after
3849 generateFieldAccess(field, qualifier, accessorName, accessThroughS him); 3849 generateFieldAccess(field, qualifier, accessorName, accessThroughS him);
3850 return generateStoreField(invoke, rhs); 3850 return generateStoreField(invoke, rhs);
3851 } 3851 }
3852 3852
3853 default: 3853 default:
3854 throw new AssertionError("I do not know how to store into: " + Element Kind.of(element)); 3854 throw new AssertionError("I do not know how to store into: " + Element Kind.of(element));
3855 } 3855 }
3856 } 3856 }
3857 3857
3858 @Override 3858 @Override
3859 public JsNode visitParameterizedNode(DartParameterizedNode node) { 3859 public JsNode visitParameterizedTypeNode(DartParameterizedTypeNode node) {
3860 return node.getExpression().accept(this); 3860 return node.getExpression().accept(this);
3861 } 3861 }
3862 3862
3863 @Override 3863 @Override
3864 public JsNode visitImportDirective(DartImportDirective node) { 3864 public JsNode visitImportDirective(DartImportDirective node) {
3865 throw new AssertionError("should never be called directly"); 3865 throw new AssertionError("should never be called directly");
3866 } 3866 }
3867 3867
3868 @Override 3868 @Override
3869 public JsNode visitLibraryDirective(DartLibraryDirective node) { 3869 public JsNode visitLibraryDirective(DartLibraryDirective node) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
3915 JsBlock blockStatics) { 3915 JsBlock blockStatics) {
3916 GenerateJavascriptVisitor generator = 3916 GenerateJavascriptVisitor generator =
3917 new GenerateJavascriptVisitor(unit, context, translationContext, 3917 new GenerateJavascriptVisitor(unit, context, translationContext,
3918 optStrategy, typeProvider, generateClosureCompatibleCode); 3918 optStrategy, typeProvider, generateClosureCompatibleCode);
3919 // Generate the Javascript AST. 3919 // Generate the Javascript AST.
3920 node.accept(generator); 3920 node.accept(generator);
3921 // Set aside the static initializations 3921 // Set aside the static initializations
3922 generator.addStaticInitsToBlock(blockStatics); 3922 generator.addStaticInitsToBlock(blockStatics);
3923 } 3923 }
3924 } 3924 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698