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

ruby-changes:73814

From: Aaron <ko1@a...>
Date: Sat, 1 Oct 2022 08:07:39 +0900 (JST)
Subject: [ruby-changes:73814] 9a6803c90b (master): Revert "This commit implements the Object Shapes technique in CRuby."

https://git.ruby-lang.org/ruby.git/commit/?id=9a6803c90b

From 9a6803c90b817f70389cae10d60b50ad752da48f Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Fri, 30 Sep 2022 16:01:50 -0700
Subject: Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
---
 bootstraptest/test_attr.rb               |  16 -
 common.mk                                | 322 --------------
 compile.c                                |  26 +-
 debug_counter.h                          |   9 +-
 ext/coverage/depend                      |   4 -
 ext/objspace/depend                      |   5 -
 gc.c                                     |  50 ++-
 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/object.h                        |  22 +
 internal/variable.h                      |   5 -
 iseq.c                                   |  14 +-
 lib/mjit/compiler.rb                     | 117 +++--
 marshal.c                                |  10 +-
 misc/lldb_cruby.py                       |   1 -
 mjit_c.rb                                |  35 +-
 mjit_compiler.h                          |   2 +-
 object.c                                 |  46 +-
 ractor_core.h                            |   6 +-
 shape.c                                  | 523 ----------------------
 shape.h                                  | 150 -------
 test/-ext-/marshal/test_internal_ivar.rb |   1 -
 test/ruby/test_mjit.rb                   |   4 +-
 test/ruby/test_object.rb                 |   9 -
 test/ruby/test_shapes.rb                 | 173 --------
 tool/mjit/bindgen.rb                     |  10 +-
 variable.c                               | 739 +++++++++++++++++--------------
 variable.h                               |  10 +-
 vm.c                                     |  31 --
 vm_callinfo.h                            | 108 +----
 vm_core.h                                |  11 +-
 vm_eval.c                                |   4 +-
 vm_insnhelper.c                          | 485 ++++++--------------
 yjit/bindgen/src/main.rs                 |   7 -
 yjit/src/asm/x86_64/mod.rs               |   2 +-
 yjit/src/codegen.rs                      | 133 +++---
 yjit/src/cruby.rs                        |  12 +-
 yjit/src/cruby_bindings.inc.rs           |  39 +-
 41 files changed, 880 insertions(+), 2298 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 0fe5217566..c56817d957 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_srcdir)/internal/vm.h
 complex.$(OBJEXT): $(top_srcdir)/internal/warnings.h
 complex.$(OBJEXT): {$(VPATH)}assert.h
@@ -3231,7 +3215,6 @@ complex.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h https://github.com/ruby/ruby/blob/trunk/common.mk#L3215
 complex.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
 complex.$(OBJEXT): {$(VPATH)}complex.c
 complex.$(OBJEXT): {$(VPATH)}config.h
-complex.$(OBJEXT): {$(VPATH)}constant.h
 complex.$(OBJEXT): {$(VPATH)}defines.h
 complex.$(OBJEXT): {$(VPATH)}id.h
 complex.$(OBJEXT): {$(VPATH)}id_table.h
@@ -3379,7 +3362,6 @@ complex.$(OBJEXT): {$(VPATH)}internal/warning_push.h https://github.com/ruby/ruby/blob/trunk/common.mk#L3362
 complex.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
 complex.$(OBJEXT): {$(VPATH)}missing.h
 complex.$(OBJEXT): {$(VPATH)}ruby_assert.h
-c (... truncated)

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

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