-
Notifications
You must be signed in to change notification settings - Fork 6k
Const finder fixes #15880
Const finder fixes #15880
Conversation
dnfield
commented
Jan 22, 2020
- Hit all libraries, not just the main one. Found this necessary when testing this on the gallery.
- Make sure we ignore consts we don't care about (return if it doesn't match, don't just continue).
| instance[kvp.key.canonicalName.name] = value.value; | ||
| } | ||
| constantInstances.add(instance); | ||
| if (_visitedInstnaces.add(instance.toString())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cheating a little, but it's simpler than creating a class that can properly hash and equality compare a dynamic map.
It's good enough to dedup things when all the parameters are in order.
| ..addOption('main-library-uri', | ||
| help: 'The package: URI to treat as the main entrypoint library ' | ||
| '(the same package used to create the kernel-file).', | ||
| valueHelp: 'package:hello_world/main.dart') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just doesn't work. Gallery, for example, uses multiple libraries to define icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you add any tests to cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're making me sad. I'll update the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| @override | ||
| void visitInstanceConstantReference(InstanceConstant node) { | ||
| node.fieldValues.values.whereType<InstanceConstant>().forEach(visitInstanceConstantReference); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is important if the const is defined inline somewhere - it never gets visited by this method otherwise.
It has to be up here before we check for matches because it could either be in the class we care about or in some other class.
flutter/engine@46e58b9...439a218 git log 46e58b9..439a218 --first-parent --oneline 2020-01-23 zhongwuzw@qq.com Fixes labelPrefix memory leak in FlutterEngine (flutter/engine#14674) 2020-01-23 matthew-carroll@users.noreply.github.com Release TextureView surface within FlutterTextureView when disconnected. (#48535) (flutter/engine#15899) 2020-01-23 iska.kaushik@gmail.com [fuchsia] Timeline events in profile mode to observatory (flutter/engine#15900) 2020-01-23 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from N502w... to Wc7e4... (flutter/engine#15935) 2020-01-23 tvolkert@users.noreply.github.com Add script to force build LUCI builders for a specified commit (flutter/engine#15938) 2020-01-23 skia-flutter-autoroll@skia.org Roll src/third_party/dart 6aa7407d6309..e84bea25df23 (6 commits) (flutter/engine#15934) 2020-01-23 skia-flutter-autoroll@skia.org Roll src/third_party/skia f9aea7f7e502..e4ddb8a7cddc (35 commits) (flutter/engine#15931) 2020-01-23 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from LGwl3... to LAOYs... (flutter/engine#15930) 2020-01-23 skia-flutter-autoroll@skia.org Roll src/third_party/dart 582727a4ec3b..6aa7407d6309 (4 commits) (flutter/engine#15923) 2020-01-23 gw280@google.com Revert "Migrate flutter_runner from flutter_runner::{Thread,Loop} to fml::{Thread,MessageLoop} (#15118)" (flutter/engine#15903) 2020-01-23 skia-flutter-autoroll@skia.org Roll src/third_party/dart a9ea9365ad8a..582727a4ec3b (33 commits) (flutter/engine#15906) 2020-01-22 brianosman@google.com Implement new SkCanvas virtuals in testing canvases (flutter/engine#15893) 2020-01-22 dnfield@google.com Const finder fixes (flutter/engine#15880) 2020-01-22 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from v-OJE... to N502w... (flutter/engine#15892) 2020-01-22 dnfield@google.com errant log (flutter/engine#15891) 2020-01-22 skia-flutter-autoroll@skia.org Roll src/third_party/skia d59053987a27..f9aea7f7e502 (10 commits) (flutter/engine#15890) 2020-01-22 jason-simmons@users.noreply.github.com [libtxt] Assign a unique ID to each glyph cluster within a line (flutter/engine#15742) 2020-01-22 skia-flutter-autoroll@skia.org Roll src/third_party/dart 439cabaec02f..a9ea9365ad8a (4 commits) (flutter/engine#15886) 2020-01-22 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from jAkm1... to LGwl3... (flutter/engine#15884) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC aaclarke@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
This reverts commit a431488.