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

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: Created 5 years, 3 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 | « runtime/vm/snapshot_test.cc ('k') | tools/precompilation/test_linux.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..98cccb26db7563c27700d15b5c16a27d902500f9
--- /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(" .globl _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());
+}
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | tools/precompilation/test_linux.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698