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

Unified Diff: tools/precompilation/create_instructions_snapshot_assembly.dart

Issue 1318803002: Toward precompiled snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: READ_POINTERS Created 5 years, 4 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
Index: tools/precompilation/create_instructions_snapshot_assembly.dart
diff --git a/tools/precompilation/create_instructions_snapshot_assembly.dart b/tools/precompilation/create_instructions_snapshot_assembly.dart
new file mode 100644
index 0000000000000000000000000000000000000000..acf42b144d9dfc8088a27f417419d53c1a63914a
--- /dev/null
+++ b/tools/precompilation/create_instructions_snapshot_assembly.dart
@@ -0,0 +1,21 @@
+import 'dart:io';
+
+void main(List<String> args) {
+ print(args[0]);
+ print(args[1]);
+
+ var bytes = new File(args[0]).readAsBytesSync();
+ print(bytes.length);
+
+ var out = new StringBuffer();
+ out.writeln(".text");
+ out.writeln(" .global kInstructionsSnapshot");
+ out.writeln("kInstructionsSnapshot:");
+ out.writeln(" .balign 32, 0");
+ for (var i = 0; i < bytes.length; i++) {
+ var byte = bytes[i];
+ out.writeln(" .byte $byte");
+ }
+
+ new File(args[1]).writeAsString(out.toString());
+}

Powered by Google App Engine
This is Rietveld 408576698