summaryrefslogtreecommitdiff
path: root/yarp
AgeCommit message (Collapse)Author
2023-09-14[ruby/yarp] make some encoding tables `const`v3_3_0_preview2Nathan Froyd
https://github.com/ruby/yarp/commit/777c376deb
2023-09-13[ruby/yarp] free strings in the ruby extensionNathan Froyd
https://github.com/ruby/yarp/commit/87dbb6cf1f
2023-09-13[ruby/yarp] Fix associativity for a couple of operatorsKevin Newton
https://github.com/ruby/yarp/commit/820774976d
2023-09-13[ruby/yarp] Better handle invalid gvar writesKevin Newton
https://github.com/ruby/yarp/commit/eaaebc17c8
2023-09-13[ruby/yarp] Mark empty flags as well as locations and blocksNobuyoshi Nakada
https://github.com/ruby/yarp/commit/b74ce35379
2023-09-13[ruby/yarp] Handle parsing local variable singleton method definitionKevin Newton
https://github.com/ruby/yarp/commit/943204d56f
2023-09-12[ruby/yarp] Split AliasNodeKevin Newton
Into AliasGlobalVariableNode and AliasMethodNode. These have different enough semantics that we feel comfortable splitting them up. https://github.com/ruby/yarp/commit/c1f3e6d344
2023-09-12[ruby/yarp] Heredocs can create Interpolated(X)StringNodes orJemma Issroff
(X)StringNodes (https://github.com/ruby/yarp/pull/1427) Prior to this commit, heredocs were automatically InterpolatedNodes regardless of whether there was actually interpolation. With this commit, heredocs are only interpolate if there is actually interpolation https://github.com/ruby/yarp/commit/e9f436128b
2023-09-12[ruby/yarp] Move the post required parameters after the rest parameterBenoit Daloze
* See https://github.com/ruby/yarp/issues/1436 https://github.com/ruby/yarp/commit/6f4e9ff940
2023-09-11[ruby/yarp] Provide a flag for the integer baseKevin Newton
https://github.com/ruby/yarp/commit/45dd046b83
2023-09-11[ruby/yarp] Introduce MatchLastLineNode and InterpolatedMatchLastLineNodeKevin Newton
These are replacements for regular expressions when they are used alone as the predicate of a conditional. That's because they are significantly different from a regular expression because they are not evaluated for truthyness, but instead evaluated as a match against the last line read by an IO object. https://github.com/ruby/yarp/commit/0f1c7780e8
2023-09-11Use constant lookup for constant namesKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/8413
2023-09-11Remove deprecated aliases from yarp compilerKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/8413
2023-09-11[ruby/yarp] Mark flags as privateKevin Newton
The flags integer is an implementation detail. We want people to use the query methods to access the individual fields so we are freed from having to maintain a specific order. As such, this commit changes the Ruby API to mark all flags fields as private attr_readers. The only one that has a clear use case is returning the set of options given to regular expressions, to mirror the Regexp#options API. So, to support this use case, this commit introduces RegularExpressionNode#options and InterpolatedRegularExpressionNode#options. These APIs provide back the same integer so that they can be used interchangeably. https://github.com/ruby/yarp/commit/4e6d5dd99f
2023-09-11[ruby/yarp] Fix order of Regexp flagsTim Morgan
https://github.com/ruby/yarp/commit/e421305ea2
2023-09-08[YARP] Extract YP_COMPILE helper (#8403)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-08[ruby/yarp] Increment versionKevin Newton
https://github.com/ruby/yarp/commit/2b41ceb754
2023-09-08[ruby/yarp] Template out a comment_targets methodKevin Newton
https://github.com/ruby/yarp/commit/a94af7c4c8
2023-09-08[YARP] Implement compilation for RationalNodes, fix other num types (#8404)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-08[YARP] Implement compilation for Regex / InterpolatedRegex (#8396)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-08[YARP] Implement compilation for InterpolatedXStringNode (#8395)Jemma Issroff
* [YARP] Implemented compilation for InterpolatedXStringNode * Extract common function for interpolated nodes Notes: Merged-By: jemmaissroff
2023-09-08[ruby/yarp] Flatten multitarget into multiwriteKevin Newton
https://github.com/ruby/yarp/commit/1021dac372
2023-09-08[ruby/yarp] Multi target nodesKevin Newton
https://github.com/ruby/yarp/commit/fa53fe88e4
2023-09-07[ruby/yarp] Avoid an extra "stop" parameter to yp_strspn_whitespace_newlinesMike Dalessio
and use yp_strspn_inline_whitespace instead. Partially reverts implementation details from #1152 https://github.com/ruby/yarp/commit/c8f9f4cfde
2023-09-07[ruby/yarp] Extract error messages into diagnostic.c and use canonical ↵Mike Dalessio
message IDs The parser now passes around `yp_diagnostic_id_t` for diagnostic messages instead of character strings, and we rely on the function `diagnostic_message()` to resolve that to a string. In addition, many messages were edited so that the parser expresses coordinate ideas in similar form [1] using consistent voice and typographic conventions. Closes https://github.com/ruby/yarp/pull/1379, and makes progress on #941. [1] Strunk & White rule 19 https://github.com/ruby/yarp/commit/0b6dd85bf1
2023-09-07[YARP] Miscellaneous small bug fixes (#8387)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-07[ruby/yarp] remove now-redundant `YP_TOKEN_NOT_PROVIDED_VALUE`Nathan Froyd
https://github.com/ruby/yarp/commit/8f9a3c2345
2023-09-07[ruby/yarp] use `YP_LOCATION_*_VALUE` macros more consistentlyNathan Froyd
https://github.com/ruby/yarp/commit/bcad93e2fc
2023-09-07[ruby/yarp] Introduce owned constantsKevin Newton
Before this commit, constants in the constant pool were assumed to be slices of the source string. This works in _almost_ all cases. There are times, however, when a string needs to be synthesized. This can occur when passing in locals that need to be scoped through eval, or when generating method names like `foo=`. After this commit, there is a single bit `owned` boolean on constants in the pool that indicates whether or not it is a slice of the source string. If it is not, it is assumed to be allocated memory that should be freed by the constant pool when the constant pool is freed. When serializing, the most significant bit in the location of the contents of the constant indicates whether or not it is owned. When it is, instead of 4 bytes for the source offset and 4 bytes for the length it is instead 4 bytes for the buffer offset and 4 bytes the length. The contents of the owned constants are embedded into the buffer after the constant pool itself. https://github.com/ruby/yarp/commit/461c047365
2023-09-07[YARP] Use the correct field for the name on classes and modulesKevin Newton
2023-09-07[ruby/yarp] Constants and def nodesKevin Newton
https://github.com/ruby/yarp/commit/6b2421ce1b
2023-09-07[ruby/yarp] Constants on rest parameter nodesKevin Newton
https://github.com/ruby/yarp/commit/a6fdb8aae9
2023-09-07[ruby/yarp] Constants on keyword rest parametersKevin Newton
https://github.com/ruby/yarp/commit/5e1a8fbc54
2023-09-07[ruby/yarp] Constants on keyword parametersKevin Newton
https://github.com/ruby/yarp/commit/d2d4f25a23
2023-09-07[ruby/yarp] Remove name constant from classes/modulesKevin Newton
https://github.com/ruby/yarp/commit/26105f0b58
2023-09-06[ruby/yarp] Consider source encoding for `slice`Vinicius Stock
https://github.com/ruby/yarp/commit/8f59fc27cd Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
2023-09-06[ruby/yarp] Constant on block parameter nodeKevin Newton
https://github.com/ruby/yarp/commit/2cd9a67150
2023-09-06[ruby/yarp] Constants on classes and modulesKevin Newton
(https://github.com/ruby/yarp/pull/1409) https://github.com/ruby/yarp/commit/0a11ec579f
2023-09-06[YARP] ClassNode and ModuleNode use name_constant (#8384)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-06[YARP] Use constant_id lookups where possible (#8374)Jemma Issroff
This commit extracts a `yp_constant_id_lookup` method and uses yp_constant_id_lookup where possible Notes: Merged-By: jemmaissroff
2023-09-06[ruby/yarp] Temporarily add name_constant to replace name on ↵Kevin Newton
ClassNode/ModuleNode https://github.com/ruby/yarp/commit/8f87686e9c
2023-09-06[ruby/yarp] Add constants and constantsKevin Newton
https://github.com/ruby/yarp/commit/d7eaa89bc3
2023-09-06[ruby/yarp] Add deprecated aliases of the form YP_NODE_<name>_NODEBenoit Daloze
https://github.com/ruby/yarp/commit/ae1f45ff52
2023-09-06[ruby/yarp] Rename YP_NODE_*_NODE to YP_*_NODEBenoit Daloze
https://github.com/ruby/yarp/commit/d93b93f342
2023-09-05[ruby/yarp] Flatten CallAndWriteNode, CallOrWriteNode, and CallOperatorWriteNodeKevin Newton
https://github.com/ruby/yarp/commit/8f26ffa0b2
2023-09-05[ruby/yarp] Rename CallNode#operator_loc to CallNode#call_operator_locKevin Newton
https://github.com/ruby/yarp/commit/fbcd307a54
2023-09-05[ruby/yarp] Introduce a BlockLocalVariableNodeKevin Newton
This is a tradeoff that I think is worth it. Right now we have a location list that tracks the location of each of the block locals. Instead, I'd like to make that a node list that has a proper node in each spot in the list. In doing so, we eliminate the need to have a location list at all, making it simpler on all of the various consumers as we have one fewer field type. There should be minimal memory implications here since this syntax is exceedingly rare. https://github.com/ruby/yarp/commit/04d329ddf0
2023-09-05[YARP] Fix aliasing instructions to use INT2FIX (#8373)Jemma Issroff
Notes: Merged-By: jemmaissroff
2023-09-06Suppress macro redefinition warningsNobuyoshi Nakada
When building with ruby, `snprintf` is replaced with `ruby_snprintf`.
2023-09-05[YARP] Implemented Compiler for Constant(Or/Operator/And)Nodes (#8355)Jemma Issroff
Notes: Merged-By: jemmaissroff