Merge branch 'master' into fix_aot
This commit is contained in:
@@ -230,8 +230,6 @@ static inline JS_BOOL JS_VALUE_IS_NUMBER (JSValue v) {
|
||||
/* JS_IsPretext, JS_KeyGetStr, JS_PushGCRef, JS_PopGCRef, JS_AddGCRef, JS_DeleteGCRef
|
||||
are defined after JSContext (they need its fields) */
|
||||
|
||||
/* Forward declarations for memory functions (now declared in quickjs.h) */
|
||||
void *js_realloc (JSContext *ctx, void *ptr, size_t size);
|
||||
|
||||
/* Forward declaration for string_get */
|
||||
static inline int string_get (const JSText *p, int idx);
|
||||
@@ -921,8 +919,9 @@ typedef struct JSBlob {
|
||||
} JSBlob;
|
||||
|
||||
typedef struct JSText {
|
||||
objhdr_t hdr; /* mist header */
|
||||
word_t length; /* length (or hash for stoned text) */
|
||||
objhdr_t hdr; /* mist header — cap56 = allocated capacity */
|
||||
word_t length; /* character count (always) */
|
||||
word_t hash; /* cached hash (stoned text only) */
|
||||
word_t packed[]; /* two chars per packed word */
|
||||
} JSText;
|
||||
|
||||
@@ -1044,7 +1043,6 @@ static inline uint64_t fash64_hash_one (uint64_t word) {
|
||||
}
|
||||
|
||||
static inline word_t JSText_len (const JSText *text) {
|
||||
if (objhdr_s (text->hdr)) return objhdr_cap56 (text->hdr);
|
||||
return text->length;
|
||||
}
|
||||
|
||||
@@ -1587,7 +1585,6 @@ JSText *pretext_putc (JSContext *ctx, JSText *s, uint32_t c);
|
||||
JSText *pretext_concat_value (JSContext *ctx, JSText *s, JSValue v);
|
||||
JSValue js_new_blob (JSContext *ctx, blob *b);
|
||||
/* Functions from header region (defined in runtime.c) */
|
||||
void *js_realloc (JSContext *ctx, void *ptr, size_t size);
|
||||
void *ct_alloc (JSContext *ctx, size_t bytes, size_t align);
|
||||
void ct_free_all (JSContext *ctx);
|
||||
int ct_resize (JSContext *ctx);
|
||||
@@ -1639,13 +1636,6 @@ static inline int to_digit (int c) {
|
||||
else return 36;
|
||||
}
|
||||
|
||||
no_inline int js_realloc_array (JSContext *ctx, void **parray, int elem_size, int *psize, int req_size);
|
||||
static inline int js_resize_array (JSContext *ctx, void **parray, int elem_size, int *psize, int req_size) {
|
||||
if (unlikely (req_size > *psize))
|
||||
return js_realloc_array (ctx, parray, elem_size, psize, req_size);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
JSText *js_alloc_string (JSContext *ctx, int max_len);
|
||||
JSValue js_key_from_string (JSContext *ctx, JSValue val);
|
||||
|
||||
Reference in New Issue
Block a user