[deps] rev package:source_maps to the latest

Change-Id: Ic0926143ea98bc3bc1eebfaca0d20c3f5578154a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282808
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
Devon Carew 2023-02-13 21:18:37 +00:00 committed by Commit Queue
parent c7aa32d07a
commit 21ab29fef6
6 changed files with 12 additions and 9 deletions

2
DEPS
View file

@ -161,7 +161,7 @@ vars = {
"pub_semver_rev": "c0e6ea74ccfbfdb2ef54c7cd9ad31455ca8e481f",
"shelf_rev": "707c8b2e5ca2a512315a3923fbeee87464eafcfa",
"source_map_stack_trace_rev": "a60ef54b36147b103d8b7d0317d6b578ebf874cc",
"source_maps_rev": "5f67212c86f34082aee7c278455d228b670c339c",
"source_maps_rev": "cf44db3cd1d9f8ea5340077a832aa0ce23234ba3",
"source_span_rev": "3951ba50ec29b9870c3131c6ddcc88700d26f3ee",
"sse_rev": "8c03b73f90d951f5b33dd496593718107c79f97a",
"stack_trace_rev": "6ceb191ace71c18ccf5648f6b2e8be52da39c56f",

View file

@ -121,7 +121,7 @@ SingleMapping convertFromHumanReadableSourceMap(String json) {
List<TargetLineEntry> lineEntries = lineEntryMap.values.toList();
Map outputMap = {
var outputMap = <String, dynamic>{
'version': 3,
'sourceRoot': inputMap['sourceRoot'],
'file': inputMap['file'],

View file

@ -64,7 +64,8 @@ int nextDeclarationCandidate(String sources, int start) {
///
/// Copied from [SingleMapping._findLine].
TargetLineEntry? findLine(SingleMapping sourceMap, int line) {
int index = binarySearch(sourceMap.lines, (e) => e.line > line);
int index =
binarySearch<TargetLineEntry>(sourceMap.lines, (e) => e.line > line);
return (index <= 0) ? null : sourceMap.lines[index - 1];
}
@ -79,6 +80,6 @@ TargetEntry? findColumn(int line, int column, TargetLineEntry? lineEntry) {
if (lineEntry == null || lineEntry.entries.isEmpty) return null;
if (lineEntry.line != line) return lineEntry.entries.last;
var entries = lineEntry.entries;
int index = binarySearch(entries, (e) => e.column > column);
int index = binarySearch<TargetEntry>(entries, (e) => e.column > column);
return (index <= 0) ? null : entries[index - 1];
}

View file

@ -77,7 +77,7 @@ StackDeobfuscationResult deobfuscateStack(
// inlined all the code into.
Map<int, List<FrameEntry>> frames = mapping.frames;
List<int> index = mapping.frameIndex;
int key = binarySearch(index, (i) => i > offset) - 1;
int key = binarySearch<int>(index, (i) => i > offset) - 1;
int depth = 0;
outer:
while (key >= 0) {

View file

@ -193,7 +193,8 @@ class TestCompiler {
}
setup.diagnosticMessages.clear();
var sourceMap = source_maps.SingleMapping.fromJson(code.sourceMap!);
var sourceMap = source_maps.SingleMapping.fromJson(
code.sourceMap!.cast<String, dynamic>());
return TestCompiler._(
setup, component, evaluator, code.metadata, sourceMap);
}

View file

@ -176,7 +176,7 @@ Future testStackTrace(Test test, String config, CompileFunc compile,
Map<int, List<FrameEntry>> frames =
_loadInlinedFrameData(sourceMap, sourceMapText);
List<int> indices = frames.keys.toList()..sort();
int key = binarySearch(indices, (i) => i > offset) - 1;
int key = binarySearch<int>(indices, (i) => i > offset) - 1;
int depth = 0;
outer:
while (key >= 0) {
@ -391,7 +391,8 @@ TargetLineEntry? _findLine(SingleMapping sourceMap, StackTraceLine stLine) {
}
TargetLineEntry? _findLineInternal(SingleMapping sourceMap, int line) {
int index = binarySearch(sourceMap.lines, (e) => e.line > line);
int index =
binarySearch<TargetLineEntry>(sourceMap.lines, (e) => e.line > line);
return (index <= 0) ? null : sourceMap.lines[index - 1];
}
@ -406,7 +407,7 @@ TargetEntry? _findColumn(int line, int column, TargetLineEntry? lineEntry) {
if (lineEntry == null || lineEntry.entries.isEmpty) return null;
if (lineEntry.line != line) return lineEntry.entries.last;
var entries = lineEntry.entries;
int index = binarySearch(entries, (e) => e.column > column);
int index = binarySearch<TargetEntry>(entries, (e) => e.column > column);
return (index <= 0) ? null : entries[index - 1];
}