@@ -1228,7 +1228,7 @@ static JSValue js_typed_array_constructor_ta(JSContext *ctx,
1228
1228
int classid, uint32_t len);
1229
1229
static bool is_typed_array(JSClassID class_id);
1230
1230
static bool typed_array_is_oob(JSObject *p);
1231
- static uint32_t typed_array_get_length(JSContext *ctx, JSObject *p);
1231
+ static uint32_t typed_array_length( JSObject *p);
1232
1232
static JSValue JS_ThrowTypeErrorDetachedArrayBuffer(JSContext *ctx);
1233
1233
static JSValue JS_ThrowTypeErrorArrayBufferOOB(JSContext *ctx);
1234
1234
static JSVarRef *get_var_ref(JSContext *ctx, JSStackFrame *sf, int var_idx,
@@ -54118,7 +54118,7 @@ static bool typed_array_is_oob(JSObject *p)
54118
54118
54119
54119
/* WARNING: 'p' must be a typed array. Works even if the array buffer
54120
54120
is detached */
54121
- static uint32_t typed_array_get_length(JSContext *ctx, JSObject *p)
54121
+ static uint32_t typed_array_length( JSObject *p)
54122
54122
{
54123
54123
JSTypedArray *ta = p->u.typed_array;
54124
54124
int size_log2 = typed_array_size_log2(p->class_id);
@@ -54896,7 +54896,7 @@ static JSValue js_typed_array_indexOf(JSContext *ctx, JSValueConst this_val,
54896
54896
/* "includes" scans all the properties, so "undefined" can match */
54897
54897
if (special == special_includes)
54898
54898
if (JS_IsUndefined(argv[0]))
54899
- if (k < typed_array_get_length(ctx, p))
54899
+ if (k < typed_array_length( p))
54900
54900
res = 0;
54901
54901
goto done;
54902
54902
}
@@ -55337,8 +55337,8 @@ static JSValue js_typed_array_slice(JSContext *ctx, JSValueConst this_val,
55337
55337
55338
55338
p1 = get_typed_array(ctx, arr);
55339
55339
if (p1 != NULL && p->class_id == p1->class_id &&
55340
- typed_array_get_length(ctx, p1) >= count &&
55341
- typed_array_get_length(ctx, p) >= start + count) {
55340
+ typed_array_length( p1) >= count &&
55341
+ typed_array_length( p) >= start + count) {
55342
55342
shift = typed_array_size_log2(p->class_id);
55343
55343
memmove(p1->u.array.u.uint8_ptr,
55344
55344
p->u.array.u.uint8_ptr + (start << shift),
0 commit comments