summaryrefslogtreecommitdiff
path: root/yarp/extension.c
AgeCommit message (Collapse)Author
2023-09-19[ruby/yarp] fix: handling escaped whitespace in a %w listMike Dalessio
Introduces a new flavor of unescaping, YP_UNESCAPE_WHITESPACE, which is the same as MINIMAL but also unescapes whitespace. Note that a spanning_heredoc.txt fixture test is updated to be less wrong, but YARP's behavior doesn't yet fully match Ruby in this case. Fixes https://github.com/ruby/yarp/pull/1505 https://github.com/ruby/yarp/commit/0af69bdeb1
2023-09-13[ruby/yarp] free strings in the ruby extensionNathan Froyd
https://github.com/ruby/yarp/commit/87dbb6cf1f
2023-09-06[ruby/yarp] Consider source encoding for `slice`Vinicius Stock
https://github.com/ruby/yarp/commit/8f59fc27cd Co-authored-by: Kevin Newton <[email protected]>
2023-08-30[ruby/yarp] Switch from handling const char * to const uint8_t *Kevin Newton
https://github.com/ruby/yarp/commit/465e7bb0a9
2023-08-30[ruby/yarp] debug: ensure valgrind will work when calling YARP.dumpMike Dalessio
https://github.com/ruby/yarp/commit/deba3420d5
2023-08-25Remove version templating in YARPKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/8298
2023-08-25[ruby/yarp] Introduce parse_lex instead of asking for a blockKevin Newton
https://github.com/ruby/yarp/commit/7e70339fe1
2023-08-25[ruby/yarp] Accept a block to parse and parse_file to get lexer output as wellKevin Newton
https://github.com/ruby/yarp/commit/40fbf61a8d
2023-08-25[ruby/yarp] Use templating to avoid duplicating the YARP version in many placesBenoit Daloze
https://github.com/ruby/yarp/commit/9c359fd92e
2023-08-24[ruby/yarp] Fix lex compat with BOMKevin Newton
* 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
2023-08-17[ruby/yarp] Treat yp_buffer_t as an opaque pointerKevin Newton
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 Notes: Merged: https://github.com/ruby/ruby/pull/8234
2023-08-16Resync YARPTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Less const_getKevin Newton
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 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Addressed review comments.Thomas E. Enebo
Missing any tests and in fact this is untested so still a WIP. https://github.com/ruby/yarp/commit/5411abd651 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Use yp_memchr in regexp parsingKevin Newton
https://github.com/ruby/yarp/commit/08081dd24f Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Hide debug methodsKevin Newton
https://github.com/ruby/yarp/commit/aa0dc2f301 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Add comment that extension.c should not contain non-trivial logicBenoit Daloze
https://github.com/ruby/yarp/commit/638f6849be Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Move efficient file reading using demand paging to librubyparserBenoit Daloze
* 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 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] Add simpler exported unescape function to librubyparserBenoit Daloze
* Moves logic from the C extension to librubyparser which can be shared with the Fiddle backend. https://github.com/ruby/yarp/commit/aa48d5e444 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-08-16[ruby/yarp] WIP - Introduce contextually parsing programs vs evalsThomas E. Enebo
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 Notes: Merged: https://github.com/ruby/ruby/pull/8226
2023-07-26[ruby/yarp] Fix error and warning locationsHaldun Bayhantopcu
https://github.com/ruby/yarp/commit/b91317ab39
2023-07-26[ruby/yarp] Fix comment locationsHaldun Bayhantopcu
https://github.com/ruby/yarp/commit/7d2a1f8f1f
2023-07-07[ruby/yarp] Add source to ParseResultJemma Issroff
https://github.com/ruby/yarp/commit/f3802e03e0
2023-07-07[ruby/yarp] Remove bin/newlinesJemma Issroff
Since newlines are working, this bin/newlines is less helpful, and we can remove the API for newlines https://github.com/ruby/yarp/commit/b538460b99
2023-07-05Manual YARP resyncJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/8007
2023-06-22Sync ruby/yarp to ↵Takashi Kokubun
https://github.com/ruby/yarp/commit/89a00203af803032383338c943836da6bafca7d9
2023-06-22[ruby/yarp] Do not leak file descriptorsKevin Newton
https://github.com/ruby/yarp/commit/83c2c45b28
2023-06-22Sync ruby/yarp with sync_default_gemsTakashi Kokubun
2023-06-22Fix leaked FD for an empty fileNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7970
2023-06-21[Feature #19741] Sync all files in yarpJemma Issroff
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 Notes: Merged: https://github.com/ruby/ruby/pull/7964