[前][次][番号順一覧][スレッド一覧]

ruby-changes:73746

From: Aaron <ko1@a...>
Date: Tue, 27 Sep 2022 08:11:15 +0900 (JST)
Subject: [ruby-changes:73746] 06abfa5be6 (master): Revert this until we can figure out WB issues or remove shapes from GC

https://git.ruby-lang.org/ruby.git/commit/?id=06abfa5be6

From 06abfa5be60e589052eb3bdfdae6c132bea3d20b Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Mon, 26 Sep 2022 16:09:50 -0700
Subject: Revert this until we can figure out WB issues or remove shapes from
 GC

Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
---
 bootstraptest/test_attr.rb                         |  16 -
 common.mk                                          | 322 ---------
 compile.c                                          |  26 +-
 debug_counter.h                                    |  10 +-
 ext/coverage/depend                                |   4 -
 ext/objspace/depend                                |   5 -
 ext/objspace/objspace.c                            |   1 -
 gc.c                                               | 215 ++----
 include/ruby/internal/core/robject.h               |   3 +-
 include/ruby/internal/fl_type.h                    |  19 +-
 inits.c                                            |   1 -
 internal.h                                         |   3 +
 internal/class.h                                   |  11 +-
 internal/imemo.h                                   |   1 -
 internal/object.h                                  |  22 +
 internal/variable.h                                |   5 -
 iseq.c                                             |  16 +-
 lib/mjit/compiler.rb                               | 117 +++-
 marshal.c                                          |  10 +-
 misc/lldb_cruby.py                                 |   6 +-
 mjit_c.rb                                          |  37 +-
 mjit_compiler.h                                    |   2 +-
 object.c                                           |  46 +-
 ractor_core.h                                      |   6 +-
 shape.c                                            | 571 ----------------
 shape.h                                            | 153 -----
 .../objectspace/reachable_objects_from_spec.rb     |   2 +-
 spec/ruby/optional/capi/shared/rbasic.rb           |  11 +-
 test/-ext-/marshal/test_internal_ivar.rb           |   1 -
 test/objspace/test_objspace.rb                     |  14 +-
 test/ruby/test_mjit.rb                             |   4 +-
 test/ruby/test_shapes.rb                           | 171 -----
 tool/mjit/bindgen.rb                               |  10 +-
 variable.c                                         | 752 +++++++++++----------
 variable.h                                         |  10 +-
 vm.c                                               |  45 --
 vm_callinfo.h                                      | 108 +--
 vm_core.h                                          |  11 +-
 vm_eval.c                                          |   4 +-
 vm_insnhelper.c                                    | 490 ++++----------
 yjit/bindgen/src/main.rs                           |   7 -
 yjit/src/asm/x86_64/mod.rs                         |   2 +-
 yjit/src/codegen.rs                                | 135 ++--
 yjit/src/cruby.rs                                  |  12 +-
 yjit/src/cruby_bindings.inc.rs                     |  41 +-
 45 files changed, 928 insertions(+), 2530 deletions(-)
 delete mode 100644 shape.c
 delete mode 100644 shape.h
 delete mode 100644 test/ruby/test_shapes.rb

diff --git a/bootstraptest/test_attr.rb b/bootstraptest/test_attr.rb
index 3cb9d3eb39..721a847145 100644
--- a/bootstraptest/test_attr.rb
+++ b/bootstraptest/test_attr.rb
@@ -34,19 +34,3 @@ assert_equal %{ok}, %{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_attr.rb#L34
     print "ok"
   end
 }, '[ruby-core:15120]'
-
-assert_equal %{ok}, %{
-  class Big
-    attr_reader :foo
-    def initialize
-      @foo = "ok"
-    end
-  end
-
-  obj = Big.new
-  100.times do |i|
-    obj.instance_variable_set(:"@ivar_\#{i}", i)
-  end
-
-  Big.new.foo
-}
diff --git a/common.mk b/common.mk
index cfcd6bd5a0..150add3026 100644
--- a/common.mk
+++ b/common.mk
@@ -136,7 +136,6 @@ COMMONOBJS    = array.$(OBJEXT) \ https://github.com/ruby/ruby/blob/trunk/common.mk#L136
 		regsyntax.$(OBJEXT) \
 		ruby.$(OBJEXT) \
 		scheduler.$(OBJEXT) \
-		shape.$(OBJEXT) \
 		signal.$(OBJEXT) \
 		sprintf.$(OBJEXT) \
 		st.$(OBJEXT) \
@@ -1833,7 +1832,6 @@ array.$(OBJEXT): $(top_srcdir)/internal/proc.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1832
 array.$(OBJEXT): $(top_srcdir)/internal/rational.h
 array.$(OBJEXT): $(top_srcdir)/internal/serial.h
 array.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-array.$(OBJEXT): $(top_srcdir)/internal/variable.h
 array.$(OBJEXT): $(top_srcdir)/internal/vm.h
 array.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 array.$(OBJEXT): {$(VPATH)}array.c
@@ -1850,7 +1848,6 @@ array.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1848
 array.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
 array.$(OBJEXT): {$(VPATH)}builtin.h
 array.$(OBJEXT): {$(VPATH)}config.h
-array.$(OBJEXT): {$(VPATH)}constant.h
 array.$(OBJEXT): {$(VPATH)}debug_counter.h
 array.$(OBJEXT): {$(VPATH)}defines.h
 array.$(OBJEXT): {$(VPATH)}encoding.h
@@ -2013,7 +2010,6 @@ array.$(OBJEXT): {$(VPATH)}oniguruma.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2010
 array.$(OBJEXT): {$(VPATH)}probes.dmyh
 array.$(OBJEXT): {$(VPATH)}probes.h
 array.$(OBJEXT): {$(VPATH)}ruby_assert.h
-array.$(OBJEXT): {$(VPATH)}shape.h
 array.$(OBJEXT): {$(VPATH)}st.h
 array.$(OBJEXT): {$(VPATH)}subst.h
 array.$(OBJEXT): {$(VPATH)}transient_heap.h
@@ -2032,7 +2028,6 @@ ast.$(OBJEXT): $(top_srcdir)/internal/parse.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2028
 ast.$(OBJEXT): $(top_srcdir)/internal/serial.h
 ast.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
 ast.$(OBJEXT): $(top_srcdir)/internal/symbol.h
-ast.$(OBJEXT): $(top_srcdir)/internal/variable.h
 ast.$(OBJEXT): $(top_srcdir)/internal/vm.h
 ast.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 ast.$(OBJEXT): {$(VPATH)}assert.h
@@ -2050,11 +2045,9 @@ ast.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2045
 ast.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
 ast.$(OBJEXT): {$(VPATH)}builtin.h
 ast.$(OBJEXT): {$(VPATH)}config.h
-ast.$(OBJEXT): {$(VPATH)}constant.h
 ast.$(OBJEXT): {$(VPATH)}defines.h
 ast.$(OBJEXT): {$(VPATH)}encoding.h
 ast.$(OBJEXT): {$(VPATH)}id.h
-ast.$(OBJEXT): {$(VPATH)}id_table.h
 ast.$(OBJEXT): {$(VPATH)}intern.h
 ast.$(OBJEXT): {$(VPATH)}internal.h
 ast.$(OBJEXT): {$(VPATH)}internal/abi.h
@@ -2214,7 +2207,6 @@ ast.$(OBJEXT): {$(VPATH)}onigmo.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2207
 ast.$(OBJEXT): {$(VPATH)}oniguruma.h
 ast.$(OBJEXT): {$(VPATH)}ruby_assert.h
 ast.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-ast.$(OBJEXT): {$(VPATH)}shape.h
 ast.$(OBJEXT): {$(VPATH)}st.h
 ast.$(OBJEXT): {$(VPATH)}subst.h
 ast.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -2398,7 +2390,6 @@ bignum.$(OBJEXT): {$(VPATH)}internal/warning_push.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2390
 bignum.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
 bignum.$(OBJEXT): {$(VPATH)}missing.h
 bignum.$(OBJEXT): {$(VPATH)}ruby_assert.h
-bignum.$(OBJEXT): {$(VPATH)}shape.h
 bignum.$(OBJEXT): {$(VPATH)}st.h
 bignum.$(OBJEXT): {$(VPATH)}subst.h
 bignum.$(OBJEXT): {$(VPATH)}thread.h
@@ -2414,7 +2405,6 @@ builtin.$(OBJEXT): $(top_srcdir)/internal/gc.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2405
 builtin.$(OBJEXT): $(top_srcdir)/internal/imemo.h
 builtin.$(OBJEXT): $(top_srcdir)/internal/serial.h
 builtin.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-builtin.$(OBJEXT): $(top_srcdir)/internal/variable.h
 builtin.$(OBJEXT): $(top_srcdir)/internal/vm.h
 builtin.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 builtin.$(OBJEXT): {$(VPATH)}assert.h
@@ -2432,10 +2422,8 @@ builtin.$(OBJEXT): {$(VPATH)}builtin.c https://github.com/ruby/ruby/blob/trunk/common.mk#L2422
 builtin.$(OBJEXT): {$(VPATH)}builtin.h
 builtin.$(OBJEXT): {$(VPATH)}builtin_binary.inc
 builtin.$(OBJEXT): {$(VPATH)}config.h
-builtin.$(OBJEXT): {$(VPATH)}constant.h
 builtin.$(OBJEXT): {$(VPATH)}defines.h
 builtin.$(OBJEXT): {$(VPATH)}id.h
-builtin.$(OBJEXT): {$(VPATH)}id_table.h
 builtin.$(OBJEXT): {$(VPATH)}intern.h
 builtin.$(OBJEXT): {$(VPATH)}internal.h
 builtin.$(OBJEXT): {$(VPATH)}internal/abi.h
@@ -2584,7 +2572,6 @@ builtin.$(OBJEXT): {$(VPATH)}missing.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2572
 builtin.$(OBJEXT): {$(VPATH)}node.h
 builtin.$(OBJEXT): {$(VPATH)}ruby_assert.h
 builtin.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-builtin.$(OBJEXT): {$(VPATH)}shape.h
 builtin.$(OBJEXT): {$(VPATH)}st.h
 builtin.$(OBJEXT): {$(VPATH)}subst.h
 builtin.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -2787,7 +2774,6 @@ class.$(OBJEXT): {$(VPATH)}onigmo.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2774
 class.$(OBJEXT): {$(VPATH)}oniguruma.h
 class.$(OBJEXT): {$(VPATH)}ruby_assert.h
 class.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-class.$(OBJEXT): {$(VPATH)}shape.h
 class.$(OBJEXT): {$(VPATH)}st.h
 class.$(OBJEXT): {$(VPATH)}subst.h
 class.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3191,7 +3177,6 @@ compile.$(OBJEXT): {$(VPATH)}re.h https://github.com/ruby/ruby/blob/trunk/common.mk#L3177
 compile.$(OBJEXT): {$(VPATH)}regex.h
 compile.$(OBJEXT): {$(VPATH)}ruby_assert.h
 compile.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-compile.$(OBJEXT): {$(VPATH)}shape.h
 compile.$(OBJEXT): {$(VPATH)}st.h
 compile.$(OBJEXT): {$(VPATH)}subst.h
 compile.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
@@ -3216,7 +3201,6 @@ complex.$(OBJEXT): $(top_srcdir)/internal/object.h https://github.com/ruby/ruby/blob/trunk/common.mk#L3201
 complex.$(OBJEXT): $(top_srcdir)/internal/rational.h
 complex.$(OBJEXT): $(top_srcdir)/internal/serial.h
 complex.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-complex.$(OBJEXT): $(top_srcdir)/internal/variable.h
 complex.$(OBJEXT): $(top_srcdi (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]