xo-interpreter2 stack: define-expr's work at top-level
This commit is contained in:
parent
57f6f9073e
commit
6f3833d6fb
56 changed files with 1550 additions and 65 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "LocalEnv.hpp"
|
||||
#include <xo/object2/Array.hpp>
|
||||
#include <xo/reflectutil/typeseq.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::AGCObject;
|
||||
|
|
@ -64,6 +65,8 @@ namespace xo {
|
|||
void
|
||||
DLocalEnv::assign_value(Binding ix, obj<AGCObject> x)
|
||||
{
|
||||
scope log(XO_DEBUG(true));
|
||||
|
||||
assert(!ix.is_global());
|
||||
|
||||
const DLocalEnv * env = this;
|
||||
|
|
@ -76,6 +79,7 @@ namespace xo {
|
|||
auto j = ix.j_slot();
|
||||
|
||||
if (j < static_cast<decltype(j)>(env->size())) {
|
||||
log && log("STUB: need write barrier for GC here");
|
||||
(*(env->args_))[j] = x;
|
||||
} else {
|
||||
assert(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue