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

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

Issue 1315083002: dart2js: Use the NoInline annotation on getInterceptor in the JS runtime. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 73e5871b7d4fa24588b865bb792fce967d76b8b1..429cf1155338fffbf6161da668df3d0f7497c5db 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1672,7 +1672,7 @@ class TransformingVisitor extends LeafVisitor {
node.target.treeElements.getSendStructure(expr);
if (structure is InvokeStructure) {
return structure.semantics.kind == AccessKind.TOPLEVEL_METHOD &&
- compiler.backend.isForeign(structure.semantics.element);
+ backend.isForeign(structure.semantics.element);
}
}
return false;
@@ -1680,12 +1680,9 @@ class TransformingVisitor extends LeafVisitor {
ast.Statement body = node.target.node.body;
bool shouldInline() {
- // At compile time, 'getInterceptor' from the Javascript runtime has a
- // foreign body that returns undefined. It is later mutated by replacing
- // it with a specialized version. Inlining undefined would be wrong.
- // TODO(kmillikin): matching the name prevents inlining other functions
- // with the same name.
- if (node.target.name == 'getInterceptor') return false;
+ if (backend.annotations.noInline(node.target)) {
+ return false;
+ }
// Inline functions that are a single return statement, expression
// statement, or block containing a return statement or expression
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698