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

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

Issue 11536004: Remove all warnings from dart2js and add a test to prevent introduction of new. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/js_backend/native_emitter.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index 0a73d165a561a3f99a94fc629e14d220b0784d42..dd22b9a343a1476358e5a841505668c962984c78 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -399,13 +399,13 @@ function(cls, desc) {
} else {
// [subclass] is one of the preorderDispatchClasses, so CSE this
// reference with the previous reference.
- if (existing is js.VariableUse &&
- varDefns.containsKey(existing.name)) {
+ js.VariableUse use = existing.asVariableUse();
+ if (use != null && varDefns.containsKey(use.name)) {
// We end up here if the subclasses have a DAG structure. We
// don't have DAGs yet, but if the dispatch is used for mixins
// that will be a possibility.
// Re-use the previously created temporary variable.
- expressions.add(new js.VariableUse(existing.name));
+ expressions.add(new js.VariableUse(use.name));
} else {
String varName = 'v${varNames.length}_${tag.name.slowToString()}';
varNames.add(varName);

Powered by Google App Engine
This is Rietveld 408576698