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

Unified Diff: pkg/compiler/lib/src/cps_ir/inline.dart

Issue 1612773002: Avoid using wrong 'adaptor' for native methods. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/inline.dart
diff --git a/pkg/compiler/lib/src/cps_ir/inline.dart b/pkg/compiler/lib/src/cps_ir/inline.dart
index 2771aefc89cef8aa6176d703f5beb7e88d28c4b2..4f752439a385780c1e5337c4f81b29bad8677c56 100644
--- a/pkg/compiler/lib/src/cps_ir/inline.dart
+++ b/pkg/compiler/lib/src/cps_ir/inline.dart
@@ -323,7 +323,7 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
outgoingNames.add(formal.name);
});
newCallStructure =
- new CallStructure(signature.parameterCount, outgoingNames);
+ new CallStructure(signature.parameterCount, outgoingNames);
} else {
signature.forEachOptionalParameter((ParameterElement formal) {
if (parameterIndex < parameters.length) {
@@ -441,7 +441,12 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
// The argument count at the call site does not match the target's
// formal parameter count. Build the IR term for an adapter function
// body.
- function = buildAdapter(invoke, target);
+ if (backend.isNative(target)) {
+ // TODO(25548): Generate correct adaptor for native methods.
+ return doNotInline();
+ } else {
+ function = buildAdapter(invoke, target);
+ }
} else {
function = _inliner.functionCompiler.compileToCpsIr(target);
void setValue(Variable variable, Reference<Primitive> value) {
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698