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

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

Issue 8913006: Expands on previous function RTT to support named/optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java b/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
index 7eb025528231973905036e7e53a8c293b229a013..8072ccef16d7457c13e9530b7668ef97d2e28caa 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
@@ -606,7 +606,7 @@ public class GenerateJavascriptAST {
JsName getterJsName = globalScope.declareName(getterName, getterName, methodName);
getterJsName.setObfuscatable(false);
String mangledMethodName = mangler.mangleNamedMethod(methodElement, unitLibrary);
- String mangledRttMethodName = mangler.mangleRttLookupMethod(methodElement, unitLibrary);
+ JsNameRef mangledRttMethod = rtt.getRTTLookupMethodNameRef(methodElement);
JsFunction func = new JsFunction(globalScope);
JsNameRef getterJsNameRef;
if (isTopLevel || methodElement.getModifiers().isStatic()) {
@@ -623,7 +623,7 @@ public class GenerateJavascriptAST {
AstUtil.newNameRef(classJsNameRef, mangledMethodName)));
JsBinaryOperation varLookup = AstUtil.newAssignment(
AstUtil.newNameRef(returnVar.makeRef(), "$lookupRTT"),
- AstUtil.newNameRef(classJsNameRef, mangledRttMethodName));
+ mangledRttMethod);
stmts.add(varLookup.makeStmt());
stmts.add(new JsReturn(returnVar.makeRef()));
} else {
@@ -633,7 +633,7 @@ public class GenerateJavascriptAST {
getterJsNameRef = AstUtil.newNameRef(prototypeRef, getterJsName);
JsExpression bindMethodCall = AstUtil.newInvocation(new JsNameRef("$bind"),
AstUtil.newNameRef(prototypeRef, mangledMethodName),
- AstUtil.newNameRef(prototypeRef, mangledRttMethodName), new JsThisRef());
+ mangledRttMethod, new JsThisRef());
func.setBody(AstUtil.newBlock(new JsReturn(bindMethodCall)));
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698