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

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

Issue 1211223002: Mark static function getters as used in codegen. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: add test Created 5 years, 6 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 | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | 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) 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 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 generateInstanceGetterWithCompiledReceiver( 3419 generateInstanceGetterWithCompiledReceiver(
3420 node, elements.getSelector(node), elements.getTypeMask(node), receiver); 3420 node, elements.getSelector(node), elements.getTypeMask(node), receiver);
3421 } 3421 }
3422 3422
3423 /// Generate a closurization of the static or top level [function]. 3423 /// Generate a closurization of the static or top level [function].
3424 void generateStaticFunctionGet(ast.Send node, MethodElement function) { 3424 void generateStaticFunctionGet(ast.Send node, MethodElement function) {
3425 generateIsDeferredLoadedCheckOfSend(node); 3425 generateIsDeferredLoadedCheckOfSend(node);
3426 // TODO(5346): Try to avoid the need for calling [declaration] before 3426 // TODO(5346): Try to avoid the need for calling [declaration] before
3427 // creating an [HStatic]. 3427 // creating an [HStatic].
3428 push(new HStatic(function.declaration, backend.nonNullType)); 3428 push(new HStatic(function.declaration, backend.nonNullType));
3429 // TODO(ahe): This should be registered in codegen.
3430 registry.registerGetOfStaticFunction(function.declaration);
3431 } 3429 }
3432 3430
3433 /// Read a local variable, function or parameter. 3431 /// Read a local variable, function or parameter.
3434 void handleLocalGet(LocalElement local) { 3432 void handleLocalGet(LocalElement local) {
3435 stack.add(localsHandler.readLocal(local)); 3433 stack.add(localsHandler.readLocal(local));
3436 } 3434 }
3437 3435
3438 @override 3436 @override
3439 void visitDynamicPropertyGet( 3437 void visitDynamicPropertyGet(
3440 ast.Send node, 3438 ast.Send node,
(...skipping 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after
8686 if (unaliased is TypedefType) throw 'unable to unalias $type'; 8684 if (unaliased is TypedefType) throw 'unable to unalias $type';
8687 unaliased.accept(this, builder); 8685 unaliased.accept(this, builder);
8688 } 8686 }
8689 8687
8690 void visitDynamicType(DynamicType type, SsaBuilder builder) { 8688 void visitDynamicType(DynamicType type, SsaBuilder builder) {
8691 JavaScriptBackend backend = builder.compiler.backend; 8689 JavaScriptBackend backend = builder.compiler.backend;
8692 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 8690 ClassElement cls = backend.findHelper('DynamicRuntimeType');
8693 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 8691 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
8694 } 8692 }
8695 } 8693 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698