summaryrefslogtreecommitdiff
path: root/prism/templates/lib
AgeCommit message (Collapse)Author
2025-12-08Bump Prism to v1.5.2Takashi Kokubun
[Backport #21187]
2025-09-13Bump Prism version to 1.5.1 (#14549)Takashi Kokubun
2025-09-12Bump Prism version to 1.5.0Takashi Kokubun
2024-12-16[ruby/prism] Bump to v1.2.0Kevin Newton
https://github.com/ruby/prism/commit/817a8e39d9 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Bump to v1.1.0Kevin Newton
https://github.com/ruby/prism/commit/f80026883d Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-11[ruby/prism] Bump typechecking depsKevin Newton
https://github.com/ruby/prism/commit/230c8b8a48
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-10-09[ruby/prism] Attempt to assume binary is UTF-8Kevin Newton
https://github.com/ruby/prism/commit/343197e4ff
2024-09-25[ruby/prism] Type every node field and mark on-error-only types explicitlyBenoit Daloze
* For Loader.java, do not deserialize the AST if there are errors, so then Java nodes only have non-error types for fields. https://github.com/ruby/prism/commit/ae78e3c605
2024-09-13[ruby/prism] Refactor and move common node flags count into a constant to ↵Andrew Konchin
reuse in templates https://github.com/ruby/prism/commit/c20bf05ecc
2024-09-13[ruby/prism] Unify code style of flags generation in the nodes templatesAndrew Konchin
https://github.com/ruby/prism/commit/dbb7e0a44e
2024-08-28[PRISM] Sync version updateKevin Newton
2024-08-13[ruby/prism] Fix up spacing in generated node.rbKevin Newton
https://github.com/ruby/prism/commit/50d79b734b
2024-07-17[ruby/prism] [Doc] Tweak example of `Prism::Dispatcher`Koichi ITO
This PR tweaked the documentation to correct an error encountered when running the example code of `Prism::Dispatcher`. This aims to make understanding the example smoother. https://github.com/ruby/prism/commit/165a1a0e78
2024-07-11[ruby/prism] Bump typecheck dependencies to fix CIKevin Newton
https://github.com/ruby/prism/commit/c7a4a90ee8
2024-07-11[ruby/prism] Various cleanup for initializers and typechecksKevin Newton
https://github.com/ruby/prism/commit/86cf82794a
2024-07-11[ruby/prism] Add node ids to nodesKevin Newton
https://github.com/ruby/prism/commit/bf16ade7f9
2024-07-11[ruby/prism] Move Node#type and Node::type documentationKevin Newton
https://github.com/ruby/prism/commit/08a71f6259
2024-07-11[ruby/prism] Add Node#breadth_first_searchKevin Newton
https://github.com/ruby/prism/commit/1ffb141199
2024-07-11[ruby/prism] Expose common flags in inspect outputKevin Newton
https://github.com/ruby/prism/commit/d0143865c2
2024-07-11[ruby/prism] Expose flags on every node typeKevin Newton
https://github.com/ruby/prism/commit/9f12a56fd6
2024-07-11[ruby/prism] Move location to second position for node initializersKevin Newton
https://github.com/ruby/prism/commit/4cc0eda4ca
2024-06-07Sync prism version to latestKevin Newton
2024-05-13[ruby/prism] Autoload newlines and comment visitorsKevin Newton
Having the @newline instance variable in every node adds up, and since it is so rarely used, we only want to add it when necessary. Moving this into an autoloaded file and moving the instance variable out of the default initializers reduces allocated memory because the nodes are now smaller and some fit into the compact list. On my machine, I'm seeing about an 8% drop. https://github.com/ruby/prism/commit/eea92c07d2
2024-05-10[PRISM] Bump to version 0.29.0Kevin Newton
2024-05-08[PRISM] Sync prism version bumpKevin Newton
2024-05-03[ruby/prism] Prism::Location#adjoinKevin Newton
https://github.com/ruby/prism/commit/a298db68e3
2024-05-03[ruby/prism] Prism::Node#tunnelKevin Newton
https://github.com/ruby/prism/commit/0bf5d651da
2024-05-03[ruby/prism] Create specialized `ASCIISource` with asciionly optimizationsVinicius Stock
https://github.com/ruby/prism/commit/40993166a8
2024-05-02[ruby/prism] Node#script_lines and supporting infraKevin Newton
https://github.com/ruby/prism/commit/cb4a8ab772
2024-04-26[ruby/prism] Bump to v0.27.0Kevin Newton
https://github.com/ruby/prism/commit/c9edeef91a
2024-04-26[ruby/prism] Location#slice_lines, Node#slice_linesKevin Newton
https://github.com/ruby/prism/commit/9b61f6fdb3
2024-04-24[ruby/prism] Change inspect from recursive to a queueKevin Newton
We would previously cause a stack overflow if we parsed a file that was too deeply nested when we were calling inspect. Instead, we now use a queue of commands to do it linearly so we don't. https://github.com/ruby/prism/commit/0f21f5bfe1
2024-04-23[ruby/prism] Implement case equality on nodesPhilip Mueller
https://github.com/ruby/prism/commit/dc121e4fdf
2024-04-22[ruby/prism] Consolidate integer fields into a single reflection classKevin Newton
https://github.com/ruby/prism/commit/0156057580
2024-04-19[ruby/prism] Split parse result based on typeKevin Newton
https://github.com/ruby/prism/commit/17194e096d
2024-04-18[ruby/prism] Bump to v0.26.0Kevin Newton
https://github.com/ruby/prism/commit/eadb09ef36
2024-04-17[ruby/prism] Add a reflection API for determining the fields of a nodeKevin Newton
https://github.com/ruby/prism/commit/f3f9950a74
2024-04-05[ruby/prism] Bump to v0.25.0Kevin Newton
https://github.com/ruby/prism/commit/4da514456f
2024-03-28[ruby/prism] Ensure deserialization works with errors+warnings>256Kevin Newton
https://github.com/ruby/prism/commit/f540e830b5
2024-03-18[ruby/prism] Use `require_relative` in the Prism codebaseKoichi ITO
If there are many searches in the `$LOAD_PATH` in the user environment, require will perform unnecessary searches that are not needed. In contrast, `require_relative` is efficient because it uses a relative path. https://github.com/ruby/prism/commit/438ccc67bd
2024-03-06[ruby/prism] Expose types on diagnosticsKevin Newton
https://github.com/ruby/prism/commit/a735c2262f
2024-03-06[ruby/prism] Move polyfill to separate file to type-check it independently.Ufuk Kayserilioglu
https://github.com/ruby/prism/commit/2a583b041b
2024-03-06[ruby/prism] `Prism::Compiler` should be a subclass of `Prism::Visitor`Ufuk Kayserilioglu
https://github.com/ruby/prism/commit/a01d6a4e32
2024-03-06[ruby/prism] Fix some missing methods/signatures in RBIsUfuk Kayserilioglu
https://github.com/ruby/prism/commit/1d87b8c46c
2024-03-06[ruby/prism] Move template related methods/classes under `Prism::Template` ↵Ufuk Kayserilioglu
namespace https://github.com/ruby/prism/commit/0e4dbcd3e4
2024-03-04[ruby/prism] Use a more efficient StringIO on TruffleRubyBenoit Daloze
* The stdlib StringIO is synchronized and this occurs a high overhead. * This is about twice as fast on TruffleRuby but surprisingly it is slower on JRuby. I am not sure why but probably @ivar access and integer arithmetic is much slower than Java field access/arithmetic on JRuby. * On CRuby interpreter it is slower, which is expected as the GVL already protects StringIO. * So we enable this only on TruffleRuby to not slow down other Rubies. * PRISM_FFI_BACKEND=true ruby -v -Ilib -rprism -rbenchmark -e '300.times { p Benchmark.realtime { Dir.glob("lib/**/*.rb") { |f| Prism.parse_file(f) } } }' ruby 3.3.0: 0.215 => 0.251 (cext: 0.062) ruby 3.3.0 YJIT: 0.118 => 0.113 (cext: 0.053) truffleruby JVM: 0.101 => 0.054 jruby 9.4.6.0: 0.162 => 0.219 jruby 9.4.6.0 indy: 0.078 => 0.086 * For the record here are the numbers for using the String directly, without a StringIO-like object: ruby 3.3.0: 0.215 => 0.234 (cext: 0.062) ruby 3.3.0 YJIT: 0.118 => 0.111 (cext: 0.053) truffleruby native: 0.101 => 0.053 jruby 9.4.6.0: 0.162 => 0.195 jruby 9.4.6.0 indy: 0.078 => 0.082 As we can see, that extra object adds a non-trivial overhead on CRuby interpreter and JRuby. But we need to make it possible to use StringIO and SimpleStringIO interchangeably. https://github.com/ruby/prism/commit/938677cbd2
2024-02-29[ruby/prism] Lazily create Location objects in ↵Benoit Daloze
Prism::Serialize::Loader#load_location * Following the changes in #2428. * PRISM_FFI_BACKEND=true ruby -v -Ilib -rprism -rbenchmark -e '10.times { p Benchmark.realtime { Dir.glob("lib/**/*.rb") { |f| Prism.parse_file(f) } } }' ruby 3.3.0: 0.255 => 0.210 ruby 3.3.0 YJIT: 0.150 => 0.120 https://github.com/ruby/prism/commit/fabf809bbf
2024-02-29[ruby/prism] Resync RBI and test it in CIKevin Newton
https://github.com/ruby/prism/commit/4ef4032774
2024-02-28[ruby/prism] Rewrite logic for CHECK_FIELD_KIND to improve readabilityBenoit Daloze
https://github.com/ruby/prism/commit/f731edcc26