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

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: Fix analyzer warnings in js_util_test, skip js_util_test in csp mode and baseline expectations for … 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 9c7a31f397cb43a65a64743a02b3ab7e615f6aa0..71485817e97deae67a04c71db30ed7d9a49f1689 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5619,14 +5619,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