Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prototype inline cache #551

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into prototype-inline-cache
  • Loading branch information
yang.zhao2 committed Jan 16, 2025
commit 3639c24d10aef53dc532d703baeabfcbb633da41
8 changes: 4 additions & 4 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4549,8 +4549,8 @@ static no_inline JSShape *js_new_shape2(JSContext *ctx, JSObject *proto,

/* insert in the hash table */
sh->hash = shape_initial_hash(proto);
sh->is_hashed = TRUE;
sh->has_small_array_index = FALSE;
sh->is_hashed = true;
sh->has_small_array_index = false;
sh->watchpoint = NULL;
js_shape_hash_link(ctx->rt, sh);
return sh;
Expand Down Expand Up @@ -4582,7 +4582,7 @@ static JSShape *js_clone_shape(JSContext *ctx, JSShape *sh1)
sh = get_shape_from_alloc(sh_alloc, hash_size);
sh->header.ref_count = 1;
add_gc_object(ctx->rt, &sh->header, JS_GC_OBJ_TYPE_SHAPE);
sh->is_hashed = FALSE;
sh->is_hashed = false;
sh->watchpoint = NULL;
if (sh->proto) {
js_dup(JS_MKPTR(JS_TAG_OBJECT, sh->proto));
Expand Down Expand Up @@ -8930,7 +8930,7 @@ static int JS_SetPropertyInternal2(JSContext *ctx, JSValue obj, JSAtom prop,
pr->u.value = val;
/* fast case */
add_ic_slot(ctx, icu, prop, p, p->shape->prop_count - 1, NULL);
return TRUE;
return true;
}
}

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.