* BOM should not impact looking for the encoding string
* We should re-encode tokens when the encoding changes
* BOM should change the column of comments only
https://github.com/ruby/yarp/commit/119fc2d7b2
Right now, we have to keep the buffer FFI object in sync with the
definition of yp_buffer_t because we access its fields directly. If
we add more fields or change the order, things will get out of sync.
Instead, let's treat yp_buffer_t as an opaque pointer and access
its fields through accessor functions directly. This is more
consistent with how we handle strings anyway.
https://github.com/ruby/yarp/commit/878d845eff
Right now whenever you go to create a Ruby object from a C struct
we dynamically look up the constants. This is not great for
performance. Now instead we template out a constant for each VALUE
that holds the classes, and then directly reference it.
https://github.com/ruby/yarp/commit/f4756cda77
* So it can be reused by the Fiddle backend, etc and not just the C extension.
* Add YP_STRING_MAPPED to use a consistent interface for yp_string_t.
That way yp_string_free() can be used like for other string types.
* Fix handling of empty file for !HAVE_MMAP && !_WIN32
https://github.com/ruby/yarp/commit/e40bc35801
This is more or less the code I used in my POC in JRuby
to parse evals. Evals depend on parent variable scopes
and will produce a different syntax tree.
Questions:
1. How does MRI compile evals currently? I cannot find anything.
2. This passes in a char * of data. It does not encode the
variables we pass in because the system calling this already
knows. Is this adequate though?
3. Can I get guidance on how best to test this?
https://github.com/ruby/yarp/commit/f441b6fd2c
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:
* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp