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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/optimizers.dart

Issue 1570813003: dart2js cps: Fix for tear-off of noSuchMethod or toString on null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.cps_ir.optimizers; 5 library dart2js.cps_ir.optimizers;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../universe/selector.dart'; 10 import '../universe/selector.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 /// Returns true if [value] satisfies a branching condition with the 49 /// Returns true if [value] satisfies a branching condition with the
50 /// given strictness. 50 /// given strictness.
51 /// 51 ///
52 /// For non-strict, this is the opposite of [isFalsyConstant]. 52 /// For non-strict, this is the opposite of [isFalsyConstant].
53 bool isTruthyConstant(ConstantValue value, {bool strict: false}) { 53 bool isTruthyConstant(ConstantValue value, {bool strict: false}) {
54 return strict ? value.isTrue : !isFalsyConstant(value); 54 return strict ? value.isTrue : !isFalsyConstant(value);
55 } 55 }
56 56
57 /// Selector that do not throw when invoked on the null class. 57 /// Selectors that do not throw when invoked on the null value.
58 final List<Selector> selectorsOnNull = <Selector>[ 58 final List<Selector> selectorsOnNull = <Selector>[
59 Selectors.equals, Selectors.hashCode_, Selectors.runtimeType_, 59 Selectors.equals, Selectors.hashCode_, Selectors.runtimeType_,
60 Selectors.toString_]; 60 Selectors.toString_, Selectors.toStringGetter,
61 Selectors.noSuchMethodGetter];
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698