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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2150313003: Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 7e899e75532f9a656bc12a234ebe53c79b931fce..bb83a8f2169b2b53cba7afcfc86ac74c24095171 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5615,14 +5615,15 @@ class SsaBuilder extends ast.Visitor
var filteredArguments = <HInstruction>[];
var parameterNameMap = new Map<String, js.Expression>();
params.orderedForEachParameter((ParameterElement parameter) {
- // TODO(jacobr): throw if parameter names do not match names of property
- // names in the class.
+ // TODO(jacobr): consider throwing if parameter names do not match
+ // names of properties in the class.
assert(parameter.isNamed);
HInstruction argument = arguments[i];
if (argument != null) {
filteredArguments.add(argument);
- parameterNameMap[parameter.name] =
- new js.InterpolatedExpression(positions++);
+ var jsName =
+ backend.nativeData.getUnescapedJSInteropName(parameter.name);
+ parameterNameMap[jsName] = new js.InterpolatedExpression(positions++);
}
i++;
});

Powered by Google App Engine
This is Rietveld 408576698