aboutsummaryrefslogtreecommitdiffstats
path: root/yarp/extension.c
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/yarp] Switch from handling const char * to const uint8_t *Kevin Newton2023-08-301-6/+6
| | | | https://github.com/ruby/yarp/commit/465e7bb0a9
* [ruby/yarp] debug: ensure valgrind will work when calling YARP.dumpMike Dalessio2023-08-301-1/+15
| | | | https://github.com/ruby/yarp/commit/deba3420d5
* Remove version templating in YARPKevin Newton2023-08-251-2/+5
|
* [ruby/yarp] Introduce parse_lex instead of asking for a blockKevin Newton2023-08-251-78/+65
| | | | https://github.com/ruby/yarp/commit/7e70339fe1
* [ruby/yarp] Accept a block to parse and parse_file to get lexer output as wellKevin Newton2023-08-251-1/+50
| | | | https://github.com/ruby/yarp/commit/40fbf61a8d
* [ruby/yarp] Use templating to avoid duplicating the YARP version in many placesBenoit Daloze2023-08-251-6/+2
| | | | https://github.com/ruby/yarp/commit/9c359fd92e
* [ruby/yarp] Fix lex compat with BOMKevin Newton2023-08-241-0/+14
| | | | | | | | * 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
* [ruby/yarp] Treat yp_buffer_t as an opaque pointerKevin Newton2023-08-171-2/+2
| | | | | | | | | | | | 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
* Resync YARPTakashi Kokubun2023-08-161-18/+39
|
* [ruby/yarp] Less const_getKevin Newton2023-08-161-1/+4
| | | | | | | | | 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
* [ruby/yarp] Addressed review comments.Thomas E. Enebo2023-08-161-5/+5
| | | | | | Missing any tests and in fact this is untested so still a WIP. https://github.com/ruby/yarp/commit/5411abd651
* [ruby/yarp] Use yp_memchr in regexp parsingKevin Newton2023-08-161-1/+1
| | | | https://github.com/ruby/yarp/commit/08081dd24f
* [ruby/yarp] Hide debug methodsKevin Newton2023-08-161-6/+7
| | | | https://github.com/ruby/yarp/commit/aa0dc2f301
* [ruby/yarp] Add comment that extension.c should not contain non-trivial logicBenoit Daloze2023-08-161-0/+3
| | | | https://github.com/ruby/yarp/commit/638f6849be
* [ruby/yarp] Move efficient file reading using demand paging to librubyparserBenoit Daloze2023-08-161-163/+29
| | | | | | | | | * 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
* [ruby/yarp] Add simpler exported unescape function to librubyparserBenoit Daloze2023-08-161-21/+7
| | | | | | * Moves logic from the C extension to librubyparser which can be shared with the Fiddle backend. https://github.com/ruby/yarp/commit/aa48d5e444
* [ruby/yarp] WIP - Introduce contextually parsing programs vs evalsThomas E. Enebo2023-08-161-5/+5
| | | | | | | | | | | | | | | 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
* [ruby/yarp] Fix error and warning locationsHaldun Bayhantopcu2023-07-261-2/+2
| | | | https://github.com/ruby/yarp/commit/b91317ab39
* [ruby/yarp] Fix comment locationsHaldun Bayhantopcu2023-07-261-1/+1
| | | | https://github.com/ruby/yarp/commit/7d2a1f8f1f
* [ruby/yarp] Add source to ParseResultJemma Issroff2023-07-071-4/+6
| | | | https://github.com/ruby/yarp/commit/f3802e03e0
* [ruby/yarp] Remove bin/newlinesJemma Issroff2023-07-071-23/+0
| | | | | | | 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
* Manual YARP resyncJemma Issroff2023-07-051-164/+297
|
* Sync ruby/yarp to ↵Takashi Kokubun2023-06-221-1/+1
| | | | https://github.com/ruby/yarp/commit/89a00203af803032383338c943836da6bafca7d9
* [ruby/yarp] Do not leak file descriptorsKevin Newton2023-06-221-0/+1
| | | | https://github.com/ruby/yarp/commit/83c2c45b28
* Sync ruby/yarp with sync_default_gemsTakashi Kokubun2023-06-221-1/+0
|
* Fix leaked FD for an empty fileNobuyoshi Nakada2023-06-221-0/+1
|
* [Feature #19741] Sync all files in yarpJemma Issroff2023-06-211-0/+556
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