Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Implement stdin.read_exact() to specification #69

Open
3 tasks
sunjay opened this issue Apr 17, 2017 · 0 comments
Open
3 tasks

Implement stdin.read_exact() to specification #69

sunjay opened this issue Apr 17, 2017 · 0 comments

Comments

@sunjay
Copy link
Owner

sunjay commented Apr 17, 2017

The current instruction generation for stdin.read_exact() is not exactly what was described in #66.

  • Implement the full, exception safe version of reading input (branching on whether a read returned null or not)
  • Put this behind a compiler flag since it may be desirable to turn it off
    • Alternatively, add an unsafe method called stdin.read_exact_unchecked which reads the bytes without checking if each one is zero
    • Another alterative is to have a method for reading a single byte that is unchecked, probably makes more sense this way
  • Consider whether this is needed when reading just a single byte at a time (see cat.brn)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant