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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 962703004: Add "force inline" to internal annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 SsaCodeGeneratorTask generator; 8 SsaCodeGeneratorTask generator;
9 SsaBuilderTask builder; 9 SsaBuilderTask builder;
10 SsaOptimizerTask optimizer; 10 SsaOptimizerTask optimizer;
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 if (inliningStack.any((entry) => entry.function == function)) { 1356 if (inliningStack.any((entry) => entry.function == function)) {
1357 return false; 1357 return false;
1358 } 1358 }
1359 1359
1360 if (element.isSynthesized) return true; 1360 if (element.isSynthesized) return true;
1361 1361
1362 if (inExpressionOfThrow || inLazyInitializerExpression) { 1362 if (inExpressionOfThrow || inLazyInitializerExpression) {
1363 return reductiveHeuristic(); 1363 return reductiveHeuristic();
1364 } 1364 }
1365 1365
1366 if (cachedCanBeInlined == true) return cachedCanBeInlined; 1366 if (cachedCanBeInlined == true) {
1367 1367 // We may have forced the inlining of some methods. Therefore check
1368 if (backend.functionsToAlwaysInline.contains(function)) { 1368 // if we can inline this method regardless of size.
1369 // Inline this function regardless of it's size.
1370 assert(InlineWeeder.canBeInlined(function, -1, false, 1369 assert(InlineWeeder.canBeInlined(function, -1, false,
1371 allowLoops: true)); 1370 allowLoops: true));
1372 return true; 1371 return true;
1373 } 1372 }
1374 1373
1375 int numParameters = function.functionSignature.parameterCount; 1374 int numParameters = function.functionSignature.parameterCount;
1376 int maxInliningNodes; 1375 int maxInliningNodes;
1377 bool useMaxInliningNodes = true; 1376 bool useMaxInliningNodes = true;
1378 if (insideLoop) { 1377 if (insideLoop) {
1379 maxInliningNodes = InlineWeeder.INLINING_NODES_INSIDE_LOOP + 1378 maxInliningNodes = InlineWeeder.INLINING_NODES_INSIDE_LOOP +
(...skipping 5542 matching lines...) Expand 10 before | Expand all | Expand 10 after
6922 if (unaliased is TypedefType) throw 'unable to unalias $type'; 6921 if (unaliased is TypedefType) throw 'unable to unalias $type';
6923 unaliased.accept(this, builder); 6922 unaliased.accept(this, builder);
6924 } 6923 }
6925 6924
6926 void visitDynamicType(DynamicType type, SsaBuilder builder) { 6925 void visitDynamicType(DynamicType type, SsaBuilder builder) {
6927 JavaScriptBackend backend = builder.compiler.backend; 6926 JavaScriptBackend backend = builder.compiler.backend;
6928 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 6927 ClassElement cls = backend.findHelper('DynamicRuntimeType');
6929 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 6928 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
6930 } 6929 }
6931 } 6930 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698