@powerlang/egg-js
Version:
A Smalltalk VM that runs on top of JavaScript
54 lines (39 loc) • 846 B
JavaScript
import SExpression from './SExpression.js';
let SScript = class extends SExpression {
constructor() {
super();
this._statements = nil;
this._compiledCode = nil;
}
static new() {
return this.basicNew().initialize();
}
argumentCount() {
return this._compiledCode.argumentCount();
}
compiledCode() {
return this._compiledCode;
}
compiledCode_(anObject) {
this._compiledCode = anObject;
return this;
}
initialize() {
this._statements = [];
return this;
}
optimizedCode_(anObject) {
return this.compiledCode().optimizedCode_(anObject);
}
statements() {
return this._statements;
}
statements_(aCollection) {
this._statements = aCollection;
return this;
}
tempCount() {
return this._compiledCode.tempCount();
}
}
export default SScript