mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Run bootstrap test in strong mode
Fixes https://github.com/dart-lang/sdk/issues/33811 Change-Id: Ie4863d5a1e8932bbf5d16a3a84236f7a66d27534 Reviewed-on: https://dart-review.googlesource.com/65084 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Peter von der Ahé <ahe@google.com>
This commit is contained in:
parent
38db4a10db
commit
e7c6416f80
|
@ -1106,8 +1106,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
|||
expression.extend();
|
||||
} else {
|
||||
VariableDeclaration variable = new VariableDeclarationJudgment.forValue(
|
||||
expression, functionNestingLevel);
|
||||
push(new CascadeJudgment(variable));
|
||||
expression, functionNestingLevel)
|
||||
..fileOffset = expression.fileOffset;
|
||||
push(new CascadeJudgment(variable)..fileOffset = expression.fileOffset);
|
||||
push(new VariableUseGenerator(this, token, variable));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,12 @@ class FastaVerifyingVisitor extends VerifyingVisitor
|
|||
visitAsExpression(AsExpression node) {
|
||||
super.visitAsExpression(node);
|
||||
if (node.fileOffset == -1) {
|
||||
problem(node, "No offset for $node");
|
||||
TreeNode parent = node.parent;
|
||||
while (parent != null) {
|
||||
if (parent.fileOffset != -1) break;
|
||||
parent = parent.parent;
|
||||
}
|
||||
problem(parent, "No offset for $node", context: node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,18 +46,17 @@ Future main() async {
|
|||
|
||||
Future runCompiler(Uri compiler, Uri input, Uri output) async {
|
||||
Uri dartVm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
|
||||
StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), <String>[
|
||||
"-c",
|
||||
"--no_preview_dart_2",
|
||||
compiler.toFilePath(),
|
||||
"--compile-sdk=sdk/",
|
||||
"--output=${output.toFilePath()}",
|
||||
"--verify",
|
||||
input.toFilePath(),
|
||||
]);
|
||||
if (result.output.isNotEmpty) {
|
||||
print(result.output);
|
||||
}
|
||||
StdioProcess result = await StdioProcess.run(
|
||||
dartVm.toFilePath(),
|
||||
<String>[
|
||||
compiler.toFilePath(),
|
||||
"--compile-sdk=sdk/",
|
||||
"--output=${output.toFilePath()}",
|
||||
"--verify",
|
||||
"--strong",
|
||||
input.toFilePath(),
|
||||
],
|
||||
suppressOutput: false);
|
||||
if (result.exitCode != 0) {
|
||||
throw "Compilation failed.";
|
||||
}
|
||||
|
|
|
@ -1075,7 +1075,7 @@ abstract class _ChunkedJsonParser<T> {
|
|||
* This function scans through the string literal for escapes, and copies
|
||||
* slices of non-escape characters using [addSliceToString].
|
||||
*/
|
||||
int parseStringToBuffer(position) {
|
||||
int parseStringToBuffer(int position) {
|
||||
int end = chunkEnd;
|
||||
int start = position;
|
||||
while (true) {
|
||||
|
|
Loading…
Reference in a new issue