From 21ab29fef6212ec27a4b98b6aae7dec8afb80768 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 13 Feb 2023 21:18:37 +0000 Subject: [PATCH] [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 Reviewed-by: Nate Bosch Commit-Queue: Devon Carew --- DEPS | 2 +- pkg/compiler/test/sourcemaps/tools/save.dart | 2 +- pkg/dart2js_tools/lib/src/sourcemap_helper.dart | 5 +++-- pkg/dart2js_tools/lib/src/trace_decoder.dart | 2 +- .../expression_compiler/expression_compiler_e2e_suite.dart | 3 ++- pkg/sourcemap_testing/lib/src/stacktrace_helper.dart | 7 ++++--- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/DEPS b/DEPS index 77bbd61cb2e..50c95b78851 100644 --- a/DEPS +++ b/DEPS @@ -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", diff --git a/pkg/compiler/test/sourcemaps/tools/save.dart b/pkg/compiler/test/sourcemaps/tools/save.dart index 1ee85954937..9af319e0e96 100644 --- a/pkg/compiler/test/sourcemaps/tools/save.dart +++ b/pkg/compiler/test/sourcemaps/tools/save.dart @@ -121,7 +121,7 @@ SingleMapping convertFromHumanReadableSourceMap(String json) { List lineEntries = lineEntryMap.values.toList(); - Map outputMap = { + var outputMap = { 'version': 3, 'sourceRoot': inputMap['sourceRoot'], 'file': inputMap['file'], diff --git a/pkg/dart2js_tools/lib/src/sourcemap_helper.dart b/pkg/dart2js_tools/lib/src/sourcemap_helper.dart index 81a9ace9945..0cd4e6cf54e 100644 --- a/pkg/dart2js_tools/lib/src/sourcemap_helper.dart +++ b/pkg/dart2js_tools/lib/src/sourcemap_helper.dart @@ -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(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(entries, (e) => e.column > column); return (index <= 0) ? null : entries[index - 1]; } diff --git a/pkg/dart2js_tools/lib/src/trace_decoder.dart b/pkg/dart2js_tools/lib/src/trace_decoder.dart index 29eda251e91..11907df143c 100644 --- a/pkg/dart2js_tools/lib/src/trace_decoder.dart +++ b/pkg/dart2js_tools/lib/src/trace_decoder.dart @@ -77,7 +77,7 @@ StackDeobfuscationResult deobfuscateStack( // inlined all the code into. Map> frames = mapping.frames; List index = mapping.frameIndex; - int key = binarySearch(index, (i) => i > offset) - 1; + int key = binarySearch(index, (i) => i > offset) - 1; int depth = 0; outer: while (key >= 0) { diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart index 96f74052502..4d7ab6273ef 100644 --- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart +++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart @@ -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()); return TestCompiler._( setup, component, evaluator, code.metadata, sourceMap); } diff --git a/pkg/sourcemap_testing/lib/src/stacktrace_helper.dart b/pkg/sourcemap_testing/lib/src/stacktrace_helper.dart index 43c9fa996d4..120658a0844 100644 --- a/pkg/sourcemap_testing/lib/src/stacktrace_helper.dart +++ b/pkg/sourcemap_testing/lib/src/stacktrace_helper.dart @@ -176,7 +176,7 @@ Future testStackTrace(Test test, String config, CompileFunc compile, Map> frames = _loadInlinedFrameData(sourceMap, sourceMapText); List indices = frames.keys.toList()..sort(); - int key = binarySearch(indices, (i) => i > offset) - 1; + int key = binarySearch(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(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(entries, (e) => e.column > column); return (index <= 0) ? null : entries[index - 1]; }