Skip to content

Commit

Permalink
vm: support object property access on resource value types
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jow- committed Dec 4, 2021
1 parent 07802f3 commit 3489b75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vm.c
Expand Up @@ -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));
Expand Down

0 comments on commit 3489b75

Please sign in to comment.