summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/level0.cpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 08:42:45 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-11-25 08:42:45 -0800
commit684ac69af192670bb6547ec01df19a3159e7d8e6 (patch)
treee6c6762e9fc40cf0ad557e160e9ab6ba7bb99eea /starts/meaning-vm/level0.cpp
parent520119a6f6ed418b8ae45bfde8239bbb532562cd (diff)
downloadstandingwithresilience-684ac69af192670bb6547ec01df19a3159e7d8e6.tar.gz
standingwithresilience-684ac69af192670bb6547ec01df19a3159e7d8e6.zip
separate functionality out a bit
Diffstat (limited to 'starts/meaning-vm/level0.cpp')
-rw-r--r--starts/meaning-vm/level0.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/starts/meaning-vm/level0.cpp b/starts/meaning-vm/level0.cpp
index a69da91..1efd33e 100644
--- a/starts/meaning-vm/level0.cpp
+++ b/starts/meaning-vm/level0.cpp
@@ -12,8 +12,8 @@ int main()
ref c = alloc();
ref d = alloc();
ref e = alloc();
- vref<int> num(3);
- vref<std::function<void()>> code([](){
+ ref num = valloc<int>(3);
+ ref code = valloc<std::function<void()>>([](){
std::cout << "Hello, world." << std::endl;
});
auto numlink = alloc();
@@ -31,8 +31,8 @@ int main()
std::cout << "Num: " << ref(num).dump(skip, skip);
std::cout << "Code: " << ref(code).dump(skip, skip);
std::cout << a.dump(skip, skip);
- std::cout << "Num: " << a.vget<int>(numlink).val() << std::endl;
- std::cout << "Code: "; a.vget<std::function<void()>>(codelink).val()();
+ std::cout << "Num: " << a.vget<int>(numlink) << std::endl;
+ std::cout << "Code: "; a.vget<std::function<void()>>(codelink)();
std::cout << allocated() << " allocated" << std::endl;