Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pulling out bytestring parsing, fixing util require bug
- Loading branch information
1 parent
995bd43
commit fa1d7fb
Showing
4 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
fs = require 'fs' | ||
util = require '../src/util' | ||
disassemble = require '../src/disassembler' | ||
ClassFile = require '../src/class_file' | ||
|
||
bytecode_string = fs.readFileSync '/dev/stdin', 'binary' | ||
bytes_array = (bytecode_string.charCodeAt(i) for i in [0...bytecode_string.length]) | ||
bytes_array = util.bytestr_to_array fs.readFileSync('/dev/stdin', 'binary') | ||
class_data = new ClassFile bytes_array | ||
|
||
console.log disassemble class_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters