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

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

Issue 382063002: Redo "Information about which functions require other functions is gathered in the enqueuer." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 5 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: sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index f01e964e510c102b25e6a3608f369ab65fb95766..7aefe4c95d7e7c2953caddd762a17a3fe1c8ae66 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -58,6 +58,8 @@ class CodegenRegistry extends Registry {
bool get isForResolution => false;
+ Element get currentElement => treeElements.currentElement;
+
// TODO(johnniwinther): Remove this getter when [Registry] creates a
// dependency node.
Setlet<Element> get otherDependencies => treeElements.otherDependencies;
@@ -82,15 +84,15 @@ class CodegenRegistry extends Registry {
}
void registerDynamicInvocation(Selector selector) {
- world.registerDynamicInvocation(selector);
+ world.registerDynamicInvocation(currentElement, selector);
}
void registerDynamicSetter(Selector selector) {
- world.registerDynamicSetter(selector);
+ world.registerDynamicSetter(currentElement, selector);
}
void registerDynamicGetter(Selector selector) {
- world.registerDynamicGetter(selector);
+ world.registerDynamicGetter(currentElement, selector);
}
void registerGetterForSuperMethod(Element element) {
@@ -129,7 +131,7 @@ class CodegenRegistry extends Registry {
}
void registerSelectorUse(Selector selector) {
- world.registerSelectorUse(selector);
+ world.registerSelectorUse(currentElement, selector);
}
void registerFactoryWithTypeArguments() {
@@ -310,8 +312,8 @@ abstract class Backend {
* Call this method to enable [noSuchMethod] handling in the
* backend.
*/
- void enableNoSuchMethod(Enqueuer enqueuer) {
- enqueuer.registerInvocation(compiler.noSuchMethodSelector);
+ void enableNoSuchMethod(Element context, Enqueuer enqueuer) {
+ enqueuer.registerInvocation(null, compiler.noSuchMethodSelector);
}
/// Call this method to enable support for isolates.
@@ -1400,7 +1402,7 @@ abstract class Compiler implements DiagnosticListener {
enqueuer.codegen.registerGetOfStaticFunction(main);
}
if (enabledNoSuchMethod) {
- backend.enableNoSuchMethod(enqueuer.codegen);
+ backend.enableNoSuchMethod(null, enqueuer.codegen);
}
if (compileAll) {
libraryLoader.libraries.forEach((LibraryElement library) {

Powered by Google App Engine
This is Rietveld 408576698