Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8e3be46

Browse files
author
Dart CI
committed
Version 2.15.0-6.0.dev
Merge commit 'e8e0a39464012a05fbfbde707c36255a7a99c1be' into 'dev'
2 parents 624de6e + e8e0a39 commit 8e3be46

18 files changed

+123
-32
lines changed

pkg/front_end/lib/src/fasta/kernel/expression_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4009,7 +4009,7 @@ class PrefixUseGenerator extends Generator {
40094009
Object result = qualifiedLookup(send.token);
40104010
if (send is SendAccessGenerator) {
40114011
result = _helper.finishSend(
4012-
result, send.typeArguments, send.arguments, fileOffset,
4012+
result, send.typeArguments, send.arguments, send.fileOffset,
40134013
isTypeArgumentsInForest: send.isTypeArgumentsInForest);
40144014
}
40154015
if (isNullAware) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
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.
4+
5+
import 'unresolved_prefix_access.dart' as prefix;
6+
7+
test() {
8+
prefix.unresolved();
9+
prefix?.test();
10+
}
11+
12+
main() {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import 'unresolved_prefix_access.dart' as prefix;
2+
3+
test() {}
4+
main() {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import 'unresolved_prefix_access.dart' as prefix;
2+
3+
main() {}
4+
test() {}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
library /*isNonNullableByDefault*/;
2+
//
3+
// Problems in library:
4+
//
5+
// pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
6+
// prefix.unresolved();
7+
// ^^^^^^^^^^
8+
//
9+
// pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
10+
// Try replacing '?.' with '.'
11+
// prefix?.test();
12+
// ^^^^^^
13+
//
14+
import self as self;
15+
16+
import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
17+
18+
static method test() → dynamic {
19+
invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
20+
prefix.unresolved();
21+
^^^^^^^^^^";
22+
invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
23+
Try replacing '?.' with '.'
24+
prefix?.test();
25+
^^^^^^" in self::test();
26+
}
27+
static method main() → dynamic {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
library /*isNonNullableByDefault*/;
2+
import self as self;
3+
4+
import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
5+
6+
static method test() → dynamic
7+
;
8+
static method main() → dynamic
9+
;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
library /*isNonNullableByDefault*/;
2+
//
3+
// Problems in library:
4+
//
5+
// pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
6+
// prefix.unresolved();
7+
// ^^^^^^^^^^
8+
//
9+
// pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
10+
// Try replacing '?.' with '.'
11+
// prefix?.test();
12+
// ^^^^^^
13+
//
14+
import self as self;
15+
16+
import "org-dartlang-testcase:///unresolved_prefix_access.dart" as prefix;
17+
18+
static method test() → dynamic {
19+
invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:8:10: Error: Method not found: 'unresolved'.
20+
prefix.unresolved();
21+
^^^^^^^^^^";
22+
invalid-expression "pkg/front_end/testcases/general/unresolved_prefix_access.dart:9:3: Error: A prefix can't be used with null-aware operators.
23+
Try replacing '?.' with '.'
24+
prefix?.test();
25+
^^^^^^" in self::test();
26+
}
27+
static method main() → dynamic {}

runtime/bin/security_context.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ static void ReleaseCertificate(void* isolate_data, void* context_pointer) {
122122

123123
static intptr_t EstimateX509Size(X509* certificate) {
124124
intptr_t length = i2d_X509(certificate, NULL);
125-
return length > 0 ? length : 0;
125+
length = length > 0 ? length : 0;
126+
// An X509 is a tree of structures, which are either opaque or will be opaque
127+
// in the future. Estimate the overhead to 512 bytes by rounding up
128+
// sizeof(X509) + sizeof(X509_CINF).
129+
return length + 512;
126130
}
127131

128132
// Returns the handle for a Dart object wrapping the X509 certificate object.
@@ -154,7 +158,7 @@ Dart_Handle X509Helper::WrappedX509Certificate(X509* certificate) {
154158
return status;
155159
}
156160
const intptr_t approximate_size_of_certificate =
157-
sizeof(*certificate) + EstimateX509Size(certificate);
161+
EstimateX509Size(certificate);
158162
ASSERT(approximate_size_of_certificate > 0);
159163
Dart_NewFinalizableHandle(result, reinterpret_cast<void*>(certificate),
160164
approximate_size_of_certificate,

runtime/vm/compiler/backend/il_x64.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5290,6 +5290,11 @@ LocationSummary* DoubleToDoubleInstr::MakeLocationSummary(Zone* zone,
52905290
void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
52915291
XmmRegister value = locs()->in(0).fpu_reg();
52925292
XmmRegister result = locs()->out(0).fpu_reg();
5293+
if (value != result) {
5294+
// Clear full register to avoid false dependency due to
5295+
// a partial access to XMM register in roundsd instruction.
5296+
__ xorps(result, result);
5297+
}
52935298
switch (recognized_kind()) {
52945299
case MethodRecognizer::kDoubleTruncate:
52955300
__ roundsd(result, value, compiler::Assembler::kRoundToZero);

runtime/vm/cpu_x64.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ class TargetCPUFeatures : public AllStatic {
6161
static bool sse4_1_supported() { return HostCPUFeatures::sse4_1_supported(); }
6262
static bool popcnt_supported() { return HostCPUFeatures::popcnt_supported(); }
6363
static bool abm_supported() { return HostCPUFeatures::abm_supported(); }
64-
static bool double_truncate_round_supported() { return false; }
64+
static bool double_truncate_round_supported() {
65+
return HostCPUFeatures::sse4_1_supported();
66+
}
6567
};
6668

6769
} // namespace dart

0 commit comments

Comments
 (0)