vm: remove uneeded hack

This commit is contained in:
Luna 2019-06-03 00:58:44 -03:00
parent 8bc220d2f8
commit 9f45dea2c0

View file

@ -237,13 +237,6 @@ pub const VM = struct {
fn doGetGlobal(self: *VM, name: []u8) !void {
var kv_opt = self.globals.get(name);
// take out the OP_CONST loaded before, if any
// note this is a complete hack.
//var val = self.peek(0);
//if (val.vtype == .Object and val.as.Object.otype == .String and std.mem.compare(u8, val.as.Object.value.String, name) == .Equal) {
// _ = self.pop();
//}
if (kv_opt) |kv| {
try self.push(kv.value);
} else {