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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/inline.dart

Issue 1685643002: dart2js cps: Set the return type on adapters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library cps_ir.optimization.inline; 5 library cps_ir.optimization.inline;
6 6
7 import 'cps_fragment.dart'; 7 import 'cps_fragment.dart';
8 import 'cps_ir_builder.dart' show ThisParameterLocal; 8 import 'cps_ir_builder.dart' show ThisParameterLocal;
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 import 'optimizers.dart'; 10 import 'optimizers.dart';
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 }); 367 });
368 newCallStructure = new CallStructure(signature.parameterCount); 368 newCallStructure = new CallStructure(signature.parameterCount);
369 } 369 }
370 370
371 Selector newSelector = 371 Selector newSelector =
372 new Selector(node.selector.kind, node.selector.memberName, 372 new Selector(node.selector.kind, node.selector.memberName,
373 newCallStructure); 373 newCallStructure);
374 Primitive result = cps.invokeMethod(thisParameter, newSelector, node.mask, 374 Primitive result = cps.invokeMethod(thisParameter, newSelector, node.mask,
375 arguments, node.callingConvention); 375 arguments, node.callingConvention);
376 result.type = typeSystem.getInvokeReturnType(node.selector, node.mask); 376 result.type = typeSystem.getInvokeReturnType(node.selector, node.mask);
377 returnContinuation.parameters.single.type = result.type;
377 cps.invokeContinuation(returnContinuation, <Primitive>[result]); 378 cps.invokeContinuation(returnContinuation, <Primitive>[result]);
378 return new FunctionDefinition(target, thisParameter, parameters, 379 return new FunctionDefinition(target, thisParameter, parameters,
379 returnContinuation, 380 returnContinuation,
380 cps.root); 381 cps.root);
381 } 382 }
382 383
383 // Given an invocation and a known target, possibly perform inlining. 384 // Given an invocation and a known target, possibly perform inlining.
384 // 385 //
385 // An optional call structure indicates a dynamic call. Calls that are 386 // An optional call structure indicates a dynamic call. Calls that are
386 // already resolved statically have a null call structure. 387 // already resolved statically have a null call structure.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 if (target.isOperator && 593 if (target.isOperator &&
593 (enclosingClass == backend.helpers.jsNumberClass || 594 (enclosingClass == backend.helpers.jsNumberClass ||
594 enclosingClass == backend.helpers.jsDoubleClass || 595 enclosingClass == backend.helpers.jsDoubleClass ||
595 enclosingClass == backend.helpers.jsIntClass)) { 596 enclosingClass == backend.helpers.jsIntClass)) {
596 // These should be handled by operator specialization. 597 // These should be handled by operator specialization.
597 return true; 598 return true;
598 } 599 }
599 return false; 600 return false;
600 } 601 }
601 } 602 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698