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

Unified Diff: pkg/compiler/lib/src/constants/expressions.dart

Issue 2154583002: dart2js: get:hashCode methods to avoid Object.hashCode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/common/tasks.dart ('k') | pkg/compiler/lib/src/dart_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/expressions.dart
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 9ecbaa56b7f8572da3efe7f52b46739ae9b0f37a..9eb3fdc7ba46ebce51933a7952d19e9856a0e5e9 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -101,12 +101,7 @@ abstract class ConstantExpression {
int _computeHashCode();
- int get hashCode {
- if (_hashCode == null) {
- _hashCode = _computeHashCode();
- }
- return _hashCode;
- }
+ int get hashCode => _hashCode ??= _computeHashCode();
bool _equals(ConstantExpression other);
« no previous file with comments | « pkg/compiler/lib/src/common/tasks.dart ('k') | pkg/compiler/lib/src/dart_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698