Skip to content

Commit

Permalink
Leave only widget creation tracker kernel pass in flutter frontend se…
Browse files Browse the repository at this point in the history
…rver. (flutter#4727)

* Leave only widget creation tracker kernel pass in flutter frontend server.

This is follow-up to https://dart-review.googlesource.com/c/sdk/+/43888.

* Adapt to updated interface

* Tyop

* Fix imports. Compiler interface extension

* Add trivial test back. Rename library to flutter_frontend_server.
  • Loading branch information
aam authored Mar 2, 2018
1 parent fb16d6b commit 97b2234
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 811 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ library track_widget_constructor_locations;
import 'package:kernel/ast.dart';
import 'package:kernel/class_hierarchy.dart';
import 'package:meta/meta.dart';
import 'package:vm/frontend_server.dart' show ProgramTransformer;

// Parameter name used to track were widget constructor calls were made from.
//
Expand Down Expand Up @@ -285,7 +286,7 @@ class _WidgetCallSiteTransformer extends Transformer {
/// The creation location is stored as a private field named `_location`
/// on the base widget class and flowed through the constructors using a named
/// parameter.
class WidgetCreatorTracker {
class WidgetCreatorTracker implements ProgramTransformer {
Class _widgetClass;
Class _locationClass;

Expand Down Expand Up @@ -440,6 +441,7 @@ class WidgetCreatorTracker {
///
/// It is safe to call this method on a delta program generated as part of
/// performing a hot reload.
@override
void transform(Program program) {
final List<Library> libraries = program.libraries;

Expand Down
Loading

0 comments on commit 97b2234

Please sign in to comment.