mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Trim down redbean a little bit
This makes redbean.c a little less long. It also reduces the size of redbean-original.com from being 333K to 213K.
This commit is contained in:
parent
87029ac3f9
commit
5022f9e920
21 changed files with 999 additions and 669 deletions
8
third_party/quickjs/quickjs.c
vendored
8
third_party/quickjs/quickjs.c
vendored
|
@ -12983,8 +12983,12 @@ static JSValue js_create_function(JSContext *ctx, JSFunctionDef *fd)
|
|||
}
|
||||
} else {
|
||||
b->vardefs = (void *)((uint8_t*)b + vardefs_offset);
|
||||
memcpy(b->vardefs, fd->args, fd->arg_count * sizeof(fd->args[0]));
|
||||
memcpy(b->vardefs + fd->arg_count, fd->vars, fd->var_count * sizeof(fd->vars[0]));
|
||||
if (fd->arg_count) {
|
||||
memcpy(b->vardefs, fd->args, fd->arg_count * sizeof(fd->args[0]));
|
||||
}
|
||||
if (fd->var_count) {
|
||||
memcpy(b->vardefs + fd->arg_count, fd->vars, fd->var_count * sizeof(fd->vars[0]));
|
||||
}
|
||||
}
|
||||
b->var_count = fd->var_count;
|
||||
b->arg_count = fd->arg_count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue