Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: pkg/analyzer/tool/summary/build_sdk_summaries.dart

Issue 1998833002: Use BufferContext + offset instead of BufferPointer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/flat_buffers_test.dart ('k') | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/build_sdk_summaries.dart
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 9d1c34b590c46f341a2a6fee2a8787a8653d01f2..1bbd4da6967a97c46b676907b383912f620c88fa 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -139,9 +139,10 @@ _Output _buildMultipleOutputs(String sdkPath, bool includeSpec) {
*/
void _extractSingleOutput(String inputPath, int field, String outputPath) {
List<int> bytes = new File(inputPath).readAsBytesSync();
- fb.BufferPointer root = new fb.BufferPointer.fromBytes(bytes);
- fb.BufferPointer table = root.derefObject();
- List<int> fieldBytes = const fb.Uint8ListReader().vTableGet(table, field);
+ fb.BufferContext root = new fb.BufferContext.fromBytes(bytes);
+ int tableOffset = root.derefObject(0);
+ List<int> fieldBytes =
+ const fb.Uint8ListReader().vTableGet(root, tableOffset, field);
new File(outputPath).writeAsBytesSync(fieldBytes, mode: FileMode.WRITE_ONLY);
}
« no previous file with comments | « pkg/analyzer/test/src/summary/flat_buffers_test.dart ('k') | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698