Skip to content

Commit

Permalink
Version 2.14.0-8.0.dev
Browse files Browse the repository at this point in the history
Merge commit 'f6b257307fc7307b97f1b3ba3cd10cd8221d6d9c' into 'dev'
  • Loading branch information
Dart CI committed Apr 15, 2021
2 parents 1330d95 + f6b2573 commit eff12d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions pkg/analyzer/lib/src/workspace/bazel_watcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ abstract class PollTrigger {
/// target of a symlink.
class _BazelInvocationWatcher implements PollTrigger {
/// Determines how often do we check for `command.log` changes.
static const _pollInterval = Duration(seconds: 1);
///
/// Note that on some systems the granularity is about 1s, so let's set this
/// to some greater value just to be safe we don't miss any updates.
static const _pollInterval = Duration(seconds: 2);

/// To confirm that a build finished, we check for these messages in the
/// `command.log`.
Expand Down Expand Up @@ -461,8 +464,8 @@ class _BazelInvocationWatcher implements PollTrigger {
void cancel() => _timer.cancel();

bool _buildFinished(String contents) {
// Only look at the last 100 characters.
var offset = max(0, contents.length - 100);
// Only look at the last 1024 characters.
var offset = max(0, contents.length - 1024);
return _buildCompletedMsgs.any((msg) => contents.contains(msg, offset));
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3330,7 +3330,9 @@ class ConstantEvaluator implements ExpressionVisitor<Constant> {
}

Constant canonicalize(Constant constant) {
return canonicalizationCache.putIfAbsent(constant, () => constant);
// Don't use putIfAbsent to avoid the context allocation needed
// for the closure.
return canonicalizationCache[constant] ??= constant;
}

T withNewInstanceBuilder<T>(
Expand Down
2 changes: 1 addition & 1 deletion tools/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ CHANNEL dev
MAJOR 2
MINOR 14
PATCH 0
PRERELEASE 7
PRERELEASE 8
PRERELEASE_PATCH 0

0 comments on commit eff12d7

Please sign in to comment.