@@ -86,9 +86,8 @@ public class StaticScope implements Serializable {
8686
8787 private Type type ;
8888 private boolean isBlockOrEval ;
89- private boolean isArgumentScope ; // Is this block and argument scope of a define_method (for the purposes of zsuper) .
89+ private boolean isArgumentScope ; // Is this block and argument scope of a define_method.
9090
91- private int scopeId ;
9291 private IRScope irScope ; // Method/Closure that this static scope corresponds to
9392
9493 public enum Type {
@@ -134,10 +133,6 @@ public IRScope getIRScope() {
134133 return irScope ;
135134 }
136135
137- public int getScopeId () {
138- return scopeId ;
139- }
140-
141136 public IRScopeType getScopeType () {
142137 return scopeType ;
143138 }
@@ -146,16 +141,9 @@ public void setScopeType(IRScopeType scopeType) {
146141 this .scopeType = scopeType ;
147142 }
148143
149- public void setIRScope (IRScope irScope , boolean isForLoopBody ) {
150- if (!isForLoopBody ) {
151- this .irScope = irScope ;
152- }
153- this .scopeId = irScope .getScopeId ();
154- this .scopeType = irScope .getScopeType ();
155- }
156-
157144 public void setIRScope (IRScope irScope ) {
158- setIRScope (irScope , false );
145+ this .irScope = irScope ;
146+ this .scopeType = irScope .getScopeType ();
159147 }
160148
161149 /**
@@ -233,18 +221,6 @@ public void setVariables(String[] names) {
233221 System .arraycopy (names , 0 , variableNames , 0 , names .length );
234222 }
235223
236- /* Note: Only used by compiler until it can use getConstant again or use some other refactoring */
237- public IRubyObject getConstantWithConstMissing (String internedName ) {
238- IRubyObject result = getConstantInner (internedName );
239-
240- // If we could not find the constant from cref..then try getting from inheritence hierarchy
241- return result == null ? cref .getConstant (internedName ) : result ;
242- }
243-
244- public boolean isConstantDefined (String internedName ) {
245- return getConstant (internedName ) != null ;
246- }
247-
248224 public IRubyObject getConstant (String internedName ) {
249225 IRubyObject result = getConstantInner (internedName );
250226
@@ -268,18 +244,6 @@ private IRubyObject getConstantInnerNoObject(String internedName) {
268244 return getConstantInner (internedName );
269245 }
270246
271- public IRubyObject setConstant (String internedName , IRubyObject result ) {
272- RubyModule module ;
273-
274- if ((module = getModule ()) != null ) {
275- module .setConstant (internedName , result );
276- return result ;
277- }
278-
279- // TODO: wire into new exception handling mechanism
280- throw result .getRuntime ().newTypeError ("no class/module to define constant" );
281- }
282-
283247 /**
284248 * Next outer most scope in list of scopes. An enclosing scope may have no direct scoping
285249 * relationship to its child. If I am in a localScope and then I enter something which
0 commit comments