@powerlang/egg-js
Version:
A Smalltalk VM that runs on top of JavaScript
76 lines (56 loc) • 1.16 kB
JavaScript
import SScript from './SScript.js';
let SBlock = class extends SScript {
constructor() {
super();
this._index = nil;
this._capturedVariables = nil;
this._inlinedArgs = nil;
}
static decodeUsing_(aTreecodeDecoder) {
return aTreecodeDecoder.decodeBlock();
}
acceptVisitor_(visitor) {
return visitor.visitBlock_(this);
}
capturedVariables() {
return this._capturedVariables;
}
capturedVariables_(aCollection) {
this._capturedVariables = aCollection;
return this;
}
capturesHome() {
return this._compiledCode.capturesHome();
}
index() {
return this._index;
}
index_(anInteger) {
this._index = anInteger;
return this;
}
initialize() {
this._capturedVariables = [];
return this;
}
inlinedArgs() {
return this._inlinedArgs;
}
inlinedArgs_(anArray) {
this._inlinedArgs = anArray;
return this;
}
isBlock() {
return true;
}
isInlined() {
return this._compiledCode.isNil();
}
offsetOfCurrentEnvironment() {
return 2;
}
optimizedCode() {
return this._compiledCode.optimizedCode();
}
}
export default SBlock