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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 12525007: Record dependency information to implement first version of dependency (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased/merged Created 7 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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 0b7f016025476524dff192504b6d43eb6d7b0c1c..a21d70aced24a252f8643e0463e1580761ecf601 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1526,7 +1526,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
methodName = 'split';
// Split returns a List, so we make sure the backend knows the
// list class is instantiated.
- world.registerInstantiatedClass(compiler.listClass);
+ world.registerInstantiatedClass(
+ compiler.listClass, work.resolutionTree);
} else if (target == backend.jsStringConcat) {
push(new js.Binary('+', object, arguments[0]), node);
return;
@@ -1647,7 +1648,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
void registerGetter(HInvokeDynamic node) {
Selector selector = getOptimizedSelectorFor(node, node.selector);
world.registerDynamicGetter(selector.name, selector);
- world.registerInstantiatedClass(compiler.functionClass);
+ world.registerInstantiatedClass(
+ compiler.functionClass, work.resolutionTree);
registerInvoke(node, selector);
}
@@ -1775,7 +1777,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
assert(type == HType.UNKNOWN);
return;
}
- world.registerInstantiatedClass(dartType.element);
+ world.registerInstantiatedClass(dartType.element, work.resolutionTree);
}
visitForeign(HForeign node) {
@@ -1838,10 +1840,10 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (node.constant is ConstructedConstant ||
node.constant is InterceptorConstant) {
ConstantHandler handler = compiler.constantHandler;
- handler.registerCompileTimeConstant(node.constant);
+ handler.registerCompileTimeConstant(node.constant, work.resolutionTree);
}
if (node.constant is! InterceptorConstant) {
- world.registerInstantiatedClass(type.element);
+ world.registerInstantiatedClass(type.element, work.resolutionTree);
}
}
@@ -2051,7 +2053,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (instr is !HInvokeStatic) {
backend.registerNonCallStaticUse(node);
if (node.element.isFunction()) {
- world.registerInstantiatedClass(compiler.functionClass);
+ world.registerInstantiatedClass(
+ compiler.functionClass, work.resolutionTree);
}
} else if (instr.target != node) {
backend.registerNonCallStaticUse(node);
@@ -2062,7 +2065,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
ClassElement cls = element.getEnclosingClass();
if (element.isGenerativeConstructor()
|| (element.isFactoryConstructor() && cls == compiler.listClass)) {
- world.registerInstantiatedClass(cls);
+ world.registerInstantiatedClass(cls, work.resolutionTree);
}
push(new js.VariableUse(backend.namer.isolateAccess(node.element)));
}
@@ -2118,7 +2121,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
void visitLiteralList(HLiteralList node) {
- world.registerInstantiatedClass(compiler.listClass);
+ world.registerInstantiatedClass(
+ compiler.listClass, work.resolutionTree);
generateArrayLiteral(node);
}
@@ -2252,7 +2256,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
void checkType(HInstruction input, DartType type, {bool negative: false}) {
assert(invariant(input, !type.isMalformed,
message: 'Attempt to check malformed type $type'));
- world.registerIsCheck(type);
+ world.registerIsCheck(type, work.resolutionTree);
Element element = type.element;
use(input);
js.PropertyAccess field =
@@ -2314,7 +2318,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
void visitIs(HIs node) {
DartType type = node.typeExpression;
- world.registerIsCheck(type);
+ world.registerIsCheck(type, work.resolutionTree);
Element element = type.element;
if (identical(element.kind, ElementKind.TYPE_VARIABLE)) {
compiler.unimplemented("visitIs for type variables",
@@ -2387,7 +2391,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (node.isChecked) {
DartType type = node.instructionType.computeType(compiler);
Element element = type.element;
- world.registerIsCheck(type);
+ world.registerIsCheck(type, work.resolutionTree);
if (node.isArgumentTypeCheck) {
if (element == backend.jsIntClass) {

Powered by Google App Engine
This is Rietveld 408576698