xo-interpreter2 stack: define-expr's work at top-level
This commit is contained in:
parent
735acc966b
commit
5e9b13c516
35 changed files with 1247 additions and 38 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