|
@@ -268,24 +268,26 @@ define(function () {
|
|
}
|
|
}
|
|
|
|
|
|
// Fallbacks
|
|
// Fallbacks
|
|
- SmalltalkMethodContext.prototype.locals = {};
|
|
|
|
|
|
+ SmalltalkMethodContext.prototype.locals = Object.freeze({});
|
|
SmalltalkMethodContext.prototype.receiver = null;
|
|
SmalltalkMethodContext.prototype.receiver = null;
|
|
SmalltalkMethodContext.prototype.selector = null;
|
|
SmalltalkMethodContext.prototype.selector = null;
|
|
SmalltalkMethodContext.prototype.lookupClass = null;
|
|
SmalltalkMethodContext.prototype.lookupClass = null;
|
|
|
|
+ SmalltalkMethodContext.prototype.outerContext = null;
|
|
|
|
+ SmalltalkMethodContext.prototype.index = 0;
|
|
|
|
|
|
defineMethod(SmalltalkMethodContext, "fill", function (receiver, selector, locals, lookupClass) {
|
|
defineMethod(SmalltalkMethodContext, "fill", function (receiver, selector, locals, lookupClass) {
|
|
this.receiver = receiver;
|
|
this.receiver = receiver;
|
|
this.selector = selector;
|
|
this.selector = selector;
|
|
- this.locals = locals || {};
|
|
|
|
|
|
+ if (locals != null) this.locals = locals;
|
|
this.lookupClass = lookupClass;
|
|
this.lookupClass = lookupClass;
|
|
if (this.homeContext) {
|
|
if (this.homeContext) {
|
|
this.homeContext.evaluatedSelector = selector;
|
|
this.homeContext.evaluatedSelector = selector;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
defineMethod(SmalltalkMethodContext, "fillBlock", function (locals, ctx, index) {
|
|
defineMethod(SmalltalkMethodContext, "fillBlock", function (locals, ctx, index) {
|
|
- this.locals = locals || {};
|
|
|
|
|
|
+ if (locals != null) this.locals = locals;
|
|
this.outerContext = ctx;
|
|
this.outerContext = ctx;
|
|
- this.index = index || 0;
|
|
|
|
|
|
+ if (index) this.index = index;
|
|
});
|
|
});
|
|
defineMethod(SmalltalkMethodContext, "init", function () {
|
|
defineMethod(SmalltalkMethodContext, "init", function () {
|
|
var frame = this;
|
|
var frame = this;
|