Move CRuby-specific prism files to top level

This commit is contained in:
Kevin Newton 2023-09-28 09:05:16 -04:00
parent 834560a923
commit a213d21448
6 changed files with 1081 additions and 1087 deletions

2150
common.mk

File diff suppressed because it is too large Load Diff

View File

@ -13372,4 +13372,4 @@ rb_iseq_ibf_load_extra_data(VALUE str)
return extra_str; return extra_str;
} }
#include "prism/prism_compiler.c" #include "prism_compile.c"

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
module Prism module Prism
class ISeqTest < Test::Unit::TestCase class TestCompilePrism < Test::Unit::TestCase
def test_empty_program def test_empty_program
test_prism_eval("") test_prism_eval("")
end end
@ -334,10 +334,11 @@ module Prism
end end
def test_prism_eval(source) def test_prism_eval(source)
compare_eval(source) $VERBOSE, verbose_bak = nil, $VERBOSE
begin begin
$VERBOSE, verbose_bak = nil, $VERBOSE compare_eval(source)
# Test "popped" functionality # Test "popped" functionality
compare_eval("#{source}; 1") compare_eval("#{source}; 1")
ensure ensure

View File

@ -398,12 +398,6 @@ module SyncDefaultGems
cp_r("#{upstream}/spec", "spec/syntax_suggest") cp_r("#{upstream}/spec", "spec/syntax_suggest")
cp_r("#{upstream}/exe/syntax_suggest", "libexec/syntax_suggest") cp_r("#{upstream}/exe/syntax_suggest", "libexec/syntax_suggest")
when "prism" when "prism"
# We don't want to remove prism-specific files that existing in ruby/ruby
# that do not exist in ruby/prism, so we temporarily move them out of the
# prism dir, wipe the prism dir, and then put them back.
mv("prism/prism_init.c", ".")
mv("prism/prism_compiler.c", ".")
mv("test/prism/iseq_test.rb", ".")
rm_rf(%w[test/prism prism]) rm_rf(%w[test/prism prism])
cp_r("#{upstream}/ext/prism", "prism") cp_r("#{upstream}/ext/prism", "prism")
@ -420,9 +414,6 @@ module SyncDefaultGems
rm_rf("prism/templates/java") rm_rf("prism/templates/java")
rm("prism/extconf.rb") rm("prism/extconf.rb")
mv("prism_init.c", "prism/")
mv("prism_compiler.c", "prism/")
mv("iseq_test.rb", "test/prism/")
else else
sync_lib gem, upstream sync_lib gem, upstream
end end