Commit graph

80555 commits

Author SHA1 Message Date
Jun Aruga
15ee9c7c1b
[DOC] README.md: Remove Cirrus CI badge image. (#8785)
We removed the `.cirrus.yml` at the commit
<01b5d1d2ff>.
Let's remove the badge image too.
2023-10-27 15:53:43 +02:00
Vinicius Stock
7e4d2bb81d [ruby/prism] Move static annotations into _static files
9a6d735890
2023-10-27 13:45:53 +00:00
Vinicius Stock
06173a41dd [ruby/prism] Add rbi_class to fields
568fb39e2c
2023-10-27 13:45:52 +00:00
Vinicius Stock
544f64075b [ruby/prism] Add RBI and RBS templates for Prism
b62305ff3e

Co-authored-by: Stan Lo <st0012@users.noreply.github.com>
2023-10-27 13:45:52 +00:00
Kevin Newton
a8af5d3808 [ruby/prism] Use MatchWriteNode on split InterpolatedREN
ee54244800
2023-10-27 13:40:25 +00:00
Nobuyoshi Nakada
9c5b084c0a
Adjust indent [ci skip] 2023-10-27 17:01:44 +09:00
Nobuyoshi Nakada
934beac118
Select the destination for the latest date by whether inplace mode 2023-10-27 16:57:21 +09:00
Takashi Kokubun
bba9465934 Let bundled_gems use matzbot's token for git push 2023-10-26 23:17:50 -07:00
dependabot[bot]
f9f0cfe785 Bump ruby/setup-ruby from 1.158.0 to 1.159.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.158.0 to 1.159.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](cd48c8e227...54a18e26db)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 20:13:17 -07:00
Kazuhiro NISHIYAMA
8b3a2d56fd
Update gem version in NEWS [ci skip]
ref 77d7ac7c06
2023-10-27 11:24:30 +09:00
Kevin Newton
a40e2b8ee9 [ruby/prism] Fix parsing lone assoc splat within hash patterns
1da5e05672
2023-10-27 02:09:33 +00:00
Lars Kanis
9a618b95cd
[Feature #19244] Windows: Prefer USERPROFILE over HOMEPATH on startup as well 2023-10-27 10:16:18 +09:00
Kazuhiro NISHIYAMA
77d7ac7c06
Update bundled_gems [ci skip] 2023-10-27 08:41:32 +09:00
Aaron Patterson
bbf1d621ba Decrease redblack cache / shape size in debug
When running tests in debug mode, we have tests that try to exhaust the
space used for shapes and the redblack cache.  However, this can cause
Out of Memory issues on some machines, so this commit decreases the
cache sizes when RUBY_DEBUG is enabled
2023-10-26 14:49:42 -07:00
Jean Boussier
8e62596e38
Move some defines from shape.h to shape.c
If they are only used there, we might as well not expose them.
2023-10-26 13:07:08 -07:00
Kevin Newton
719b40bdf6
[prism] Update prettyprint deps 2023-10-26 15:47:01 -04:00
Kevin Newton
6e8ff9d275 [ruby/prism] Allow regexp flags to change
88a61cc30c
2023-10-26 19:43:17 +00:00
Kevin Newton
f3e77f36c5 [ruby/prism] Fix up newline test
9fdb41d8ba
2023-10-26 19:40:21 +00:00
Kevin Newton
55b81e419f
Use new prism prettyprint APIs 2023-10-26 15:23:46 -04:00
Kevin Newton
21dc64534b [ruby/prism] Regenerate snapshots
160df9a687
2023-10-26 15:19:52 -04:00
Kevin Newton
d1bb858d47 [ruby/prism] Match existing Ruby prettyprint
6d8358c083
2023-10-26 15:19:43 -04:00
Kevin Newton
e9aa2398b9 [ruby/prism] Get general prettyprint structure working
7c9cf63d4c
2023-10-26 15:19:35 -04:00
Benoit Daloze
9792be3610 [ruby/prism] Avoid warning for pm_token_buffer_t initialization
* This was causing this error on macOS Mojave:
  src/prism.c:8216:48: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
            pm_token_buffer_t token_buffer = { 0 };
                                               ^

5055fc04fd
2023-10-26 19:12:04 +00:00
Kevin Newton
6241cfab74
[prism] handle locals consistently 2023-10-26 15:08:31 -04:00
Kevin Newton
e3258dd627
Integrate new prism multi target names 2023-10-26 15:03:33 -04:00
Kevin Newton
018f0a9c5f [ruby/prism] Rename to lefts/rights
e6deed05a5
2023-10-26 14:59:13 -04:00
Kevin Newton
922f48f081 [ruby/prism] Remove RequiredDestructuredParameterNode in favor of MultiTargetNode
6d1858192e
2023-10-26 14:59:07 -04:00
Kevin Newton
533bd1d1fa [ruby/prism] Ensure no extra multi-target nodes are created for splats
e60240d54b
2023-10-26 14:59:00 -04:00
Kevin Newton
82acca915a [ruby/prism] Ensure no extra multi-target nodes are created
ec31fd827f
2023-10-26 14:58:55 -04:00
Kevin Newton
234e8fb819 [ruby/prism] Split up multi target/write targets
dda7a0da52
2023-10-26 14:58:48 -04:00
Jemma Issroff
7e4ee92de2 [ruby/prism] Add KeywordSplat flag to ArgumentsNode
Method calls with keyword splat args compile differently than
without since they merge the keyword arg hash with the keyword splat
hash. We know this information at parse time, so can set a flag
which the compiler can use.

e5f8a9a3cd
2023-10-26 18:47:50 +00:00
eileencodes
a082e560bb [PRISM] Implement regex encoding flags
Added the  correct encoding to the allocated regex. This required making
a new method to set the encoding and pass that to `rb_enc_reg_new`
instead of `rb_reg_new`. The former `rb_reg_new` would set the encoding
to ASCII8BIT regardless of encoding flag.
2023-10-26 11:11:52 -07:00
Jemma Issroff
2573d56884 [PRISM] Change --dump keyword to prism_parsetree 2023-10-26 13:29:04 -03:00
lukeg
b57b7acc20 add more shapes tests 2023-10-26 13:07:12 -03:00
Jemma Issroff
4f8a33eb05 [PRISM] Cleanup macro usage for common ADD_INSN 2023-10-26 12:47:28 -03:00
HParker
8f4a8cd05b teach prism define to compile basic types 2023-10-26 11:54:26 -03:00
Jemma Issroff
9570a88bb3 [PRISM] Implement compilation for ConstantPathAndWriteNode 2023-10-26 11:42:15 -03:00
Jemma Issroff
ec2878c11b [PRISM] Implement compilation for ConstantPathOrWriteNode 2023-10-26 11:42:15 -03:00
Jemma Issroff
b5f61750b9 [PRISM] Implemented ConstantPathOperatorWriteNode 2023-10-26 11:42:15 -03:00
Benoit Daloze
631ddb34e4 [ruby/prism] Split Prism::Loader#load_node in one lambda per node type
* Otherwise load_node is too big to compile and is forced to run in interpreter:
  https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759730996
* For the benchmark at https://github.com/oracle/truffleruby/issues/3293#issuecomment-1759790280
  TruffleRuby Native 23.1.0:
  Before: 10.574041 After: 5.592436
  JRuby 9.4.3.0:
  Before: 7.037780 After: 3.995317
  JRuby 9.4.3.0 -Xcompile.invokedynamic=true:
  Before: 7.047832 After: 2.269294

a592ec346a
2023-10-26 14:34:41 +00:00
Kevin Newton
51ea82a770 [ruby/prism] Expose options on match last line nodes
0284b38861
2023-10-26 13:58:40 +00:00
Kevin Newton
3ed317a441
Remove JavaScript templates 2023-10-26 09:50:40 -04:00
Kevin Newton
feb1427ad8 [ruby/prism] Compile with WASI
73c44b0b9c
2023-10-26 13:33:22 +00:00
Jemma Issroff
bfb9b5e699 [PRISM] Implement compilation for CaseNode 2023-10-26 08:45:43 -03:00
Jemma Issroff
7b6b17a92b [PRISM] Rename new tests to use assert_prism_eval 2023-10-26 07:15:35 -03:00
Jemma Issroff
d6cb2dc622 [PRISM] Refactor tests to deconflict with existing tests 2023-10-26 07:15:35 -03:00
Jemma Issroff
8e5744588f [PRISM] Implement CallOperatorWriteNode 2023-10-26 07:15:35 -03:00
Jemma Issroff
68a81b44e3 [PRISM] Implement compilation for CallOrWriteNode 2023-10-26 07:15:35 -03:00
Jemma Issroff
e28a033035 [PRISM] Extract helper to use for CallOrWriteNode 2023-10-26 07:15:35 -03:00
Jemma Issroff
2a8dbb1323 [PRISM] Implemented compilation for CallAndWriteNode 2023-10-26 07:15:35 -03:00