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

ruby-changes:65433

From: John <ko1@a...>
Date: Thu, 11 Mar 2021 02:38:37 +0900 (JST)
Subject: [ruby-changes:65433] 9d0ae387c8 (master): Remove DEFINED_IVAR2 from enum

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

From 9d0ae387c86f3fc85cf00a9a4cf8c6e18b4181bf Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@h...>
Date: Tue, 9 Mar 2021 16:33:28 -0800
Subject: Remove DEFINED_IVAR2 from enum

This version of defined? doesn't seem to be possible to emit anymore.
---
 iseq.h                               | 1 -
 tool/ruby_vm/views/_leaf_helpers.erb | 1 -
 vm_insnhelper.c                      | 3 ---
 3 files changed, 5 deletions(-)

diff --git a/iseq.h b/iseq.h
index bae534c..6a6c69a 100644
--- a/iseq.h
+++ b/iseq.h
@@ -289,7 +289,6 @@ enum defined_type { https://github.com/ruby/ruby/blob/trunk/iseq.h#L289
     DEFINED_FALSE,
     DEFINED_ASGN,
     DEFINED_EXPR,
-    DEFINED_IVAR2,
     DEFINED_REF,
     DEFINED_FUNC,
     DEFINED_CONST_FROM
diff --git a/tool/ruby_vm/views/_leaf_helpers.erb b/tool/ruby_vm/views/_leaf_helpers.erb
index cbb7373..1735db2 100644
--- a/tool/ruby_vm/views/_leaf_helpers.erb
+++ b/tool/ruby_vm/views/_leaf_helpers.erb
@@ -20,7 +20,6 @@ leafness_of_defined(rb_num_t op_type) https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_leaf_helpers.erb#L20
     /* see also: vm_insnhelper.c:vm_defined() */
     switch (op_type) {
       case DEFINED_IVAR:
-      case DEFINED_IVAR2:
       case DEFINED_GVAR:
       case DEFINED_CVAR:
       case DEFINED_YIELD:
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 4d9e780..5f8bffb 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3998,9 +3998,6 @@ vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_ https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3998
 	    expr_type = DEFINED_IVAR;
 	}
 	break;
-      case DEFINED_IVAR2:
-	klass = vm_get_cbase(GET_EP());
-	break;
       case DEFINED_GVAR:
 	if (rb_gvar_defined(SYM2ID(obj))) {
 	    expr_type = DEFINED_GVAR;
-- 
cgit v1.1


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

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