summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-12-05 00:16:53 +0100
committerJo-Philipp Wich <jo@mein.io>2021-12-05 00:26:54 +0100
commit3489b7571ee5e0e69f9f5724cd5b3701591353d1 (patch)
tree65add922f24250f859f3b753dc4f6d0e9d10c5f4
parent07802f37ddb13489cfde314716ad6181dd9b1671 (diff)
vm: support object property access on resource value types
Allow querying object properties on resource values. A resource value may have a prototype object set whose properties should be enumerable. Support that use case in the VM. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index f055564..7d77581 100644
--- a/vm.c
+++ b/vm.c
@@ -1025,6 +1025,7 @@ uc_vm_insn_load_val(uc_vm_t *vm, uc_vm_insn_t insn)
uc_value_t *v = uc_vm_stack_pop(vm);
switch (ucv_type(v)) {
+ case UC_RESSOURCE:
case UC_OBJECT:
case UC_ARRAY:
uc_vm_stack_push(vm, ucv_key_get(vm, v, k));