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

Unified Diff: dart/frog/leg/ssa/builder.dart

Issue 9689045: Library privacy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « dart/frog/leg/scanner/token.dart ('k') | dart/frog/leg/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/builder.dart
diff --git a/dart/frog/leg/ssa/builder.dart b/dart/frog/leg/ssa/builder.dart
index 94ba1d6474ef4f20048106f7dfe01ae329c9d36c..922b0aa15ed6038d0d1b87ac51374af7229cfaa9 100644
--- a/dart/frog/leg/ssa/builder.dart
+++ b/dart/frog/leg/ssa/builder.dart
@@ -706,6 +706,8 @@ class SsaBuilder implements Visitor {
// they are added.
BreakHandler currentBreakHandler = const NullBreakHandler();
+ LibraryElement get currentLibrary() => work.element.getLibrary();
+
SsaBuilder(Compiler compiler, WorkItem work)
: this.compiler = compiler,
this.work = work,
@@ -913,7 +915,10 @@ class SsaBuilder implements Visitor {
body.functionParameters.forEachParameter((parameter) {
bodyCallInputs.add(localsHandler.readLocal(parameter));
});
- SourceString methodName = body.name;
+ // TODO(ahe): The constructor name is statically resolved. See
+ // SsaCodeGenerator.visitInvokeDynamicMethod. Is there a cleaner
+ // way to do this?
+ SourceString methodName = new SourceString(compiler.namer.getName(body));
add(new HInvokeDynamicMethod(null, methodName, bodyCallInputs));
}
close(new HReturn(newObject)).addSuccessor(graph.exit);
@@ -1743,7 +1748,7 @@ class SsaBuilder implements Visitor {
}
addGenericSendArgumentsToList(node.arguments, inputs);
String name = compiler.namer.instanceMethodName(
- Namer.OPERATOR_EQUALS, 1);
+ currentLibrary, Namer.OPERATOR_EQUALS, 1);
push(new HForeign(new DartString.literal('!!#.$name'),
const LiteralDartString('bool'),
inputs));
« no previous file with comments | « dart/frog/leg/scanner/token.dart ('k') | dart/frog/leg/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698