/** Creates a new global variable which links to * the oldName global variable. * * <b>WANRING</b> we are already using the 1.7.1 behaviour. */ public void alias(String name, String oldName) { assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw RaiseException.from(runtime, runtime.getRuntimeError(), "can't alias in tracer"); } globalVariables.put(name, oldVariable); }
/** Creates a new global variable which links to * the oldName global variable. * * <b>WANRING</b> we are already using the 1.7.1 behaviour. */ public void alias(String name, String oldName) { assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = (GlobalVariable)globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw new RaiseException(runtime, runtime.getRuntimeError(), "can't alias in tracer", false); } globalVariables.put(name, oldVariable); }
/** Creates a new global variable which links to * the oldName global variable. * * <b>WANRING</b> we are already using the 1.7.1 behaviour. */ public void alias(String name, String oldName) { assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw RaiseException.from(runtime, runtime.getRuntimeError(), "can't alias in tracer"); } globalVariables.put(name, oldVariable); }
/** Creates a new global variable which links to * the oldName global variable. * * <b>WANRING</b> we are already using the 1.7.1 behaviour. */ public void alias(String name, String oldName) { assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = (GlobalVariable)globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw new RaiseException(runtime, runtime.getRuntimeError(), "can't alias in tracer", false); } globalVariables.put(name, oldVariable); }