aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* RubyVM::InstructionSequence.compile_file_prismKevin Newton2023-11-202-41/+75
| | | | | | | | * Provide a new API compile_file_prism which mirrors compile_file but uses prism to parse/compile. * Provide the ability to run test-all with RUBY_ISEQ_DUMP_DEBUG set to "prism". If it is, we'll use the new compile_file_prism API to load iseqs during the test run.
* [PRISM] Implement once node for interpolated regexeileencodes2023-11-202-1/+47
| | | | | | | | This PR implements the once node on interpolated regexes. There is a bug in Prism where the interpolated regex with the once flag only works when there is not a local variable so the test uses a "1". We'll need to fix that.
* [PRISM] Don't pop args to YieldNodeJemma Issroff2023-11-202-1/+5
|
* [ruby/prism] adds encodings for ibm869Lynne Ashminov2023-11-204-0/+39
| | | | | | (https://github.com/ruby/prism/pull/1886) https://github.com/ruby/prism/commit/41462400b7
* [ruby/prism] Add and test ibm863 encodingMaple Ong2023-11-204-0/+39
| | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/prism/pull/1853) * Add and test ibm863 * Remove dup encoding and add alias * Update test/prism/encoding_test.rb Co-authored-by: Kevin Newton <kddnewton@gmail.com> * Readd bitfield table lol --------- https://github.com/ruby/prism/commit/4cd756d7ff Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* Fix indentation [ci skip]Peter Zhu2023-11-201-26/+26
|
* proc.c: Make Method and UnboundMethod embdedJean Boussier2023-11-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid some needless malloc churn ``` compare-ruby: ruby 3.3.0dev (2023-11-20T02:02:55Z master 701b0650de) [arm64-darwin22] last_commit=[ruby/prism] feat: add encoding for IBM865 (https://github.com/ruby/prism/pull/1884) built-ruby: ruby 3.3.0dev (2023-11-20T16:23:07Z embedded-methods e35284bfaa) [arm64-darwin22] warming up.. | |compare-ruby|built-ruby| |:------------------------|-----------:|---------:| |allocate_method | 8.413M| 12.333M| | | -| 1.47x| |allocate_unbound_method | 8.083M| 11.607M| | | -| 1.44x| ``` ``` prelude: | class SomeClass def foo end end some_object = SomeClass.new benchmark: allocate_method: some_object.method(:foo) allocate_unbound_method: SomeClass.instance_method(:foo) ```
* marshal.c: embed load and dump argument objectsJean Boussier2023-11-201-6/+16
| | | | This avoid a bit of needless malloc churn.
* compile.c: make pinned_list embedableJean Boussier2023-11-201-19/+7
| | | | This saves some malloc churn for small pin lists.
* [ruby/prism] Disallow defining a numbered parameter methodKevin Newton2023-11-202-47/+52
| | | | | | (https://github.com/ruby/prism/pull/1797) https://github.com/ruby/prism/commit/c13165e6aa
* [ruby/prism] feat: Adds macCroatian encodingDavid Wessman2023-11-204-0/+38
| | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/prism/pull/1880) * feat: Adds macCroatian encoding - Based on: https://en.wikipedia.org/wiki/Mac_OS_Croatian_encoding https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CROATIAN.TXT Co-authored-by: Josefine Rost <nijrost@gmail.com> * Use output from bin/encodings and adds to docs/encoding.md --------- https://github.com/ruby/prism/commit/019a82d8f3 Co-authored-by: Josefine Rost <nijrost@gmail.com>
* [ruby/prism] Add character APIs for locationsKevin Newton2023-11-204-23/+83
| | | | | | (https://github.com/ruby/prism/pull/1809) https://github.com/ruby/prism/commit/d493ccd093
* [ruby/prism] Correctly parse the `resuce` modifier in the rhs of theHiroya Fujinami2023-11-207-400/+423
| | | | | | | | | assignments (https://github.com/ruby/prism/pull/1879) Fix https://github.com/ruby/prism/pull/1541 https://github.com/ruby/prism/commit/9fb276e1f4
* [ruby/prism] Remove non-ASCII source charactersKevin Newton2023-11-202-12/+21
| | | | | | (https://github.com/ruby/prism/pull/1787) https://github.com/ruby/prism/commit/5acc38a2f3
* [ruby/prism] Fix parsing `...` in argumentsHiroya Fujinami2023-11-204-0/+29
| | | | | | | | | | | | | | | (https://github.com/ruby/prism/pull/1882) * Fix parsing `...` in arguments Fix https://github.com/ruby/prism/pull/1830 Fix https://github.com/ruby/prism/pull/1831 * Rename the constant name to PM_ERR_ARGUMENT_FORWARDING_UNBOUND https://github.com/ruby/prism/pull/1882#discussion_r1398461156 https://github.com/ruby/prism/commit/519653aec2
* Fix crash when iterating over generic ivarsPeter Zhu2023-11-202-1/+3
|
* Switching first argument in pm_interpolated_node_compileeileencodes2023-11-201-8/+9
| | | | | This changes the first argument in `pm_interpolated_node_compile` to use a pointer.
* Embed Thread::Backtrace::Location into Thread::BacktraceÉtienne Barrié2023-11-201-16/+10
| | | | Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
* Specialize String#dupJean Boussier2023-11-202-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | `String#+@` is 2-3 times faster than `String#dup` because it can directly go through `rb_str_dup` instead of using the generic much slower `rb_obj_dup`. This fact led to the existance of the ugly `Performance/UnfreezeString` rubocop performance rule that encourage users to rewrite the much more readable and convenient `"foo".dup` into the ugly `(+"foo")`. Let's make that rubocop rule useless. ``` compare-ruby: ruby 3.3.0dev (2023-11-20T02:02:55Z master 701b0650de) [arm64-darwin22] last_commit=[ruby/prism] feat: add encoding for IBM865 (https://github.com/ruby/prism/pull/1884) built-ruby: ruby 3.3.0dev (2023-11-20T12:51:45Z faster-str-lit-dup 6b745bbc5d) [arm64-darwin22] warming up.. | |compare-ruby|built-ruby| |:------|-----------:|---------:| |uplus | 16.312M| 16.332M| | | -| 1.00x| |dup | 5.912M| 16.329M| | | -| 2.76x| ```
* [ruby/prism] feat: add encoding for IBM865Derek Moore2023-11-204-0/+39
| | | | | | | | | | (https://github.com/ruby/prism/pull/1884) * feat: add encoding for IBM865 * style: fix incorrect autoformat https://github.com/ruby/prism/commit/14c6ae0182
* [wasm] Enable more ext libraries on CI as much as possibleYuta Saito2023-11-191-1/+1
|
* [ruby/open3] [DOC] RDoc for Open3Burdette Lamar2023-11-191-23/+66
| | | | | | (https://github.com/ruby/open3/pull/20) https://github.com/ruby/open3/commit/4c9e7492eb
* [ruby/prism] Don't add an invalid identifier capture to localsHiroya Fujinami2023-11-193-9/+106
| | | | | | | | | | | | | | (https://github.com/ruby/prism/pull/1836) * Don't add an invalid identifier capture to locals Fix https://github.com/ruby/prism/pull/1815 * Delay creating a MatchWriteNode https://github.com/ruby/prism/pull/1836#discussion_r1393716600 https://github.com/ruby/prism/commit/635f595a36
* [ruby/prism] feat: add encoding for ibm866Syed Faraaz Ahmad2023-11-194-0/+39
| | | | | | | | | | | | (https://github.com/ruby/prism/pull/1864) Add encoding for ibm866 --------- https://github.com/ruby/prism/commit/1a96cc71f7 Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* [ruby/prism] Add GB1988 encodingOrhan Toy2023-11-194-0/+38
| | | | https://github.com/ruby/prism/commit/78d3fa7172
* [ruby/prism] Add macCyrillic encodingOrhan Toy2023-11-194-0/+38
| | | | https://github.com/ruby/prism/commit/220b40921a
* [ruby/prism] Fix typos in comments and docsMartin Emde2023-11-191-1/+1
| | | | https://github.com/ruby/prism/commit/16b3d19758
* [prism] Update common.mk for prism big5 hkscsKevin Newton2023-11-181-0/+5
|
* [ruby/prism] Big5 HKSCS encodingRyan Garver2023-11-185-0/+58
| | | | https://github.com/ruby/prism/commit/3ca9823eb4
* [ruby/prism] Add IBM864 encodingMike Dalton2023-11-184-0/+39
| | | | | | | Fixes https://github.com/ruby/prism/pull/1868 Related #1843 https://github.com/ruby/prism/commit/abc136dfc9
* [ruby/prism] Faster lex_keywordHaldun Bayhantopcu2023-11-181-47/+50
| | | | https://github.com/ruby/prism/commit/23a68dcda2
* [ruby/prism] Add macCentEuro encodingThomas Marshall2023-11-184-0/+38
| | | | https://github.com/ruby/prism/commit/ff95edbd99
* [ruby/irb] Fix irb crash on `{}.` completiontomoya ishida2023-11-184-6/+24
| | | | | | (https://github.com/ruby/irb/pull/764) https://github.com/ruby/irb/commit/07e4d540cc
* Ensure keyword splat method argument is hashJeremy Evans2023-11-182-0/+11
| | | | | | | | Commit e87d0882910001ef3b0c2ccd43bf00cee8c34a0c introduced a regression where the keyword splat object passed by the caller would be directly used by callee as keyword splat parameters, if it implemented #to_hash. The return value of #to_hash would be ignored in this case.
* Lrama v0.5.10yui-knk2023-11-1837-890/+1317
|
* [ruby/prism] Revert "Ensure serialized file is little endian"Kevin Newton2023-11-183-34/+9
| | | | https://github.com/ruby/prism/commit/4cec275fff
* Fix ordering for auto compaction in get_overloaded_cme()Alan Wu2023-11-171-3/+3
| | | | | | | | | | | | | | | | | Found through GC.stress + GC.auto_compact crashes in GH-8932. Previously, the compaction run within `rb_method_entry_alloc()` could move the `def->body.iseq.cref` and `iseqptr` set up before the call and leave the `def` pointing to moved addresses. Nothing was marking `def` during that GC run. Low probability reproducer: GC.stress = true GC.auto_compact = true arr = [] alloc = 1000.times.map { [] } alloc = nil a = arr.first GC.start
* Fix File.directory? doc hidding File::Stat#directory? docDana Sherson2023-11-171-2/+0
| | | | Now the documentation that was already in the codebase for `File::Stat#directory?` shows up.
* Fix corruption when out of shape during ivar removePeter Zhu2023-11-172-49/+55
| | | | | | | | | | | | | | | | | | | | | | | Reproduction script: ``` o = Object.new 10.times { |i| o.instance_variable_set(:"@a#{i}", i) } i = 0 a = Object.new while RubyVM::Shape.shapes_available > 2 a.instance_variable_set(:"@i#{i}", 1) i += 1 end o.remove_instance_variable(:@a0) puts o.instance_variable_get(:@a1) ``` Before this patch, it would incorrectly output `2` and now it correctly outputs `1`.
* [ruby/prism] Ensure serialized file is little endianKevin Newton2023-11-173-9/+34
| | | | https://github.com/ruby/prism/commit/0c762ee68a
* [ruby/prism] Silence clang analyzer warnings for the memory leaksHaldun Bayhantopcu2023-11-171-0/+5
| | | | https://github.com/ruby/prism/commit/68112c556e
* [ruby/prism] add Windows-874 encodingPeter Cai2023-11-174-0/+39
| | | | https://github.com/ruby/prism/commit/0670dd3b9a
* [ruby/prism] Update spacing in encoding_test.rbKevin Newton2023-11-171-1/+1
| | | | https://github.com/ruby/prism/commit/56508c2201
* [ruby/prism] Add macThaiHaldun Bayhantopcu2023-11-174-0/+38
| | | | https://github.com/ruby/prism/commit/f654058f50
* [ruby/prism] Add macRomanHaldun Bayhantopcu2023-11-174-0/+38
| | | | https://github.com/ruby/prism/commit/42b20ee399
* [ruby/prism] Add macUkraineHaldun Bayhantopcu2023-11-173-0/+37
| | | | https://github.com/ruby/prism/commit/440557fddc
* [ruby/prism] Do not allow trailing commas in calls without parenthesisHaldun Bayhantopcu2023-11-172-0/+13
| | | | https://github.com/ruby/prism/commit/f1d56da58f
* [ruby/prism] Never test locale encodingKevin Newton2023-11-171-3/+2
| | | | https://github.com/ruby/prism/commit/f0f057b055
* [ruby/prism] Do not test locale encoding on windowsKevin Newton2023-11-171-1/+4
| | | | https://github.com/ruby/prism/commit/8f40536431
* mingw.yml - remove encoding, run tests in cmd shellMSP-Greg2023-11-171-2/+3
|