path
stringlengths
14
112
content
stringlengths
0
6.32M
size
int64
0
6.32M
max_lines
int64
1
100k
repo_name
stringclasses
2 values
autogenerated
bool
1 class
cosmopolitan/third_party/quickjs/qjsc.c
/* * QuickJS command line compiler * * Copyright (c) 2018-2021 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the r...
22,253
737
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/reflect.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
7,035
198
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs-libc.c
/* * QuickJS C library * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, incl...
110,437
3,847
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/proxy.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
32,352
962
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libunicode.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBUNICODE_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBUNICODE_H_ #include "third_party/quickjs/libunicode.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ #define LRE_BOOL int /* for documentation purposes */ /* define it to incl...
2,896
107
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/LICENSE
QuickJS Javascript Engine Copyright (c) 2017-2021 Fabrice Bellard Copyright (c) 2017-2021 Charlie Gordon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without li...
1,131
23
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/eq.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
15,372
460
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/readme.txt
The main documentation is in doc/quickjs.pdf or doc/quickjs.html.
66
2
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/TODO
Bugs: - modules: better error handling with cyclic module references Misc ideas: - use custom printf to avoid compatibility issues with floating point numbers - consistent naming for preprocessor defines - unify coding style and naming conventions - use names from the ECMA spec in library implementation - use byte cod...
3,088
71
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/test262o.conf
[config] # general settings for test262 ES5 version # framework style: old, new style=old # handle tests tagged as @noStrict: yes, no, skip nostrict=yes # handle tests tagged as @strictOnly: yes, no, skip strict=yes # test mode: default, default-nostrict, default-strict, strict, nostrict, both, all mode=default # ...
21,757
411
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/array.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
64,120
1,954
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/dbuf.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
4,706
178
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/repl.js
/* * QuickJS Read Eval Print Loop * * Copyright (c) 2017-2020 Fabrice Bellard * Copyright (c) 2017-2020 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restr...
49,495
1,574
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/float.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
37,188
1,162
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/internal.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_INTERNAL_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_INTERNAL_H_ #include "third_party/quickjs/cutils.h" #include "third_party/quickjs/libbf.h" #include "third_party/quickjs/list.h" #include "third_party/quickjs/quickjs.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_STA...
83,249
2,215
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/math.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
9,606
305
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/test262_errors.txt
test262/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js:20: Test262Error: Expected a ReferenceError but got a ReferenceError test262/test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js:20: strict mode: Test262Error: Expected a ReferenceError but got a Referenc...
6,539
36
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/cutils.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_CUTILS_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_CUTILS_H_ #include "libc/intrin/bswap.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ /* set if CPU is big endian */ #undef WORDS_BIGENDIAN #define __maybe_unused __attribute__((__unused__...
5,407
263
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/README.cosmo
Source: - https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz Local Changes: - Replace snprintf with xasprintf in find_unique_cname - Squash uninitialized read of harnessbuf in run-test262.c - Change run-test262.c to not rebase configured paths
248
8
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs-libc.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBC_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBC_H_ #include "third_party/quickjs/quickjs.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name); JSModuleDef *js_init_mo...
1,466
31
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/gc.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
15,819
497
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/qjs.c
/* * QuickJS stand alone interpreter * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without res...
17,199
580
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/cutils.c
/* * C utilities * * Copyright (c) 2017 Fabrice Bellard * Copyright (c) 2018 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without li...
14,944
518
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/atomics.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
16,496
522
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/test262.conf
[config] # general settings for test262 ES6 version # framework style: old, new style=new # handle tests tagged as [noStrict]: yes, no, skip nostrict=yes # handle tests tagged as [strictOnly]: yes, no, skip strict=yes # test mode: default, default-nostrict, default-strict, strict, nostrict, both, all mode=default ...
4,285
203
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/promise.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
59,042
1,570
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/strbuf.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
9,519
333
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/regexp.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
48,011
1,411
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs.mk
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ #───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ PKGS += THIRD_PARTY_QUICKJS THIRD_PARTY_QUICKJS_ARTIFACTS += THIRD_PARTY_QUICKJS_A THIRD_PARTY_QUICKJS_BINS = $(THIRD_...
7,346
218
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/shape.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
14,109
451
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/list.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIST_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIST_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ struct list_head { struct list_head *prev; struct list_head *next; }; #define LIST_HEAD_INIT(el) { &(el), &(el) } /* return the ...
2,196
80
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libregexp-opcode.inc
/* * Regular Expression Engine * * Copyright (c) 2017-2018 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the right...
2,259
61
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs-atom.inc
/* * QuickJS atom definitions * * Copyright (c) 2017-2018 Fabrice Bellard * Copyright (c) 2017-2018 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
7,914
274
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/bigdecimal.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
21,494
726
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/iter.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
2,034
49
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/run-test262.c
/* * ECMA Test 262 Runner for QuickJS * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without re...
63,157
2,119
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libunicode-table.inc
/* clang-format off */ /* Compressed unicode tables */ /* Automatically generated file - do not edit */ static const uint32_t case_conv_table1[361] = { 0x00209a30, 0x00309a00, 0x005a8173, 0x00601730, 0x006c0730, 0x006f81b3, 0x00701700, 0x007c0700, 0x007f8100, 0x00803040, 0x009801c3, 0x00988190, 0x00990...
211,897
4,368
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/json.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
32,228
994
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/call.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
144,354
4,109
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libunicode.c
/* * Unicode utilities * * Copyright (c) 2017-2018 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to ...
47,180
1,566
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
510,187
14,979
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/parse.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
224,365
6,151
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libregexp.c
/* * Regular Expression Engine * * Copyright (c) 2017-2018 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the right...
84,553
2,621
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/err.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
13,349
419
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/unicode_gen_def.inc
#ifdef UNICODE_GENERAL_CATEGORY DEF(Cn, "Unassigned") /* must be zero */ DEF(Lu, "Uppercase_Letter") DEF(Ll, "Lowercase_Letter") DEF(Lt, "Titlecase_Letter") DEF(Lm, "Modifier_Letter") DEF(Lo, "Other_Letter") DEF(Mn, "Nonspacing_Mark") DEF(Mc, "Spacing_Mark") DEF(Me, "Enclosing_Mark") DEF(Nd, "Decimal_Number,digit") DEF...
6,840
285
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/unicode_download.sh
#!/bin/sh set -e url="ftp://ftp.unicode.org/Public/13.0.0/ucd" emoji_url="${url}/emoji/emoji-data.txt" files="CaseFolding.txt DerivedNormalizationProps.txt PropList.txt \ SpecialCasing.txt CompositionExclusions.txt ScriptExtensions.txt \ UnicodeData.txt DerivedCoreProperties.txt NormalizationTest.txt Scripts.txt \ Pr...
485
20
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/mem.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
5,742
190
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/bigint.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
26,088
852
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_QUICKJS_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_QUICKJS_H_ #include "libc/intrin/likely.h" #include "libc/math.h" #include "libc/stdio/stdio.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ #if (defined(__GNUC__) || defined(__clang__)) &...
40,171
1,015
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/diglet.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,087
31
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/gen.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
19,741
511
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libbf.c
/* * Tiny arbitrary precision floating point library * * Copyright (c) 2017-2021 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including withou...
241,142
8,502
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/typedarray.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
80,007
2,383
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/map.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
24,655
749
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/prim.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
3,955
111
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tok.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
21,736
697
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/atof.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
9,792
324
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/leb128.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
2,153
66
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/date.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
32,835
1,035
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/qjscalc.js
/* * QuickJS Javascript Calculator * * Copyright (c) 2017-2020 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the ...
73,076
2,658
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/test262o_errors.txt
0
1
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/str.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
71,857
2,321
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libbf.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBBF_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBBF_H_ #include "libc/limits.h" #include "libc/literal.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ #if INTPTR_MAX >= INT64_MAX #define LIMB_LOG2_BITS 6 #else #define LIMB_LOG2_BITS 5 #...
16,951
518
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/diglet.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ int to_digit(int); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_ */
306
11
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/usage.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
22,496
518
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/object.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
41,154
1,223
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/libregexp.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBREGEXP_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBREGEXP_H_ #include "third_party/quickjs/libunicode.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ /* clang-format off */ #define LRE_BOOL int /* for documentation purposes */ #define LRE_FLAG_GLOBA...
2,298
73
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/uri.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
8,948
281
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/leb128.h
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LEB128_H_ #define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LEB128_H_ #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ int get_leb128(uint32_t *, const uint8_t *, const uint8_t *); int get_sleb128(int32_t *, const uint8_t *, const uint8_t *); COSMOPOLITAN_C_END_ #endif /* !(...
411
12
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/unicode_gen.c
/* * Generation of Unicode tables * * Copyright (c) 2017-2018 Fabrice Bellard * Copyright (c) 2017-2018 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restri...
83,698
3,064
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/atom.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
7,496
246
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/byte.c
/* * QuickJS Javascript Engine * * Copyright (c) 2017-2021 Fabrice Bellard * Copyright (c) 2017-2021 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
66,626
2,241
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/quickjs-opcode.inc
/* * QuickJS opcode definitions * * Copyright (c) 2017-2018 Fabrice Bellard * Copyright (c) 2017-2018 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrict...
15,270
368
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/Changelog
2021-03-27: - faster Array.prototype.push and Array.prototype.unshift - added JS_UpdateStackTop() - fixed Windows console - misc bug fixes 2020-11-08: - improved function parameter initializers - added std.setenv(), std.unsetenv() and std.getenviron() - added JS_EvalThis() - misc bug fixes 2020-09-06: - added logi...
3,763
149
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/doc/quickjs.texi
\input texinfo @iftex @afourpaper @headings double @end iftex @titlepage @afourpaper @sp 7 @center @titlefont{QuickJS Javascript Engine} @sp 3 @end titlepage @setfilename spec.info @settitle QuickJS Javascript Engine @contents @chapter Introduction QuickJS is a small and embeddable Javascript engine. It supports ...
34,609
1,098
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/doc/jsbignum.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ --> <head> <title>Javascript Bignum Extensions</title> <meta name="description" content="Javascript Bignum Extensions"> <meta name="keyword...
30,296
735
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/doc/quickjs.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ --> <head> <title>QuickJS Javascript Engine</title> <meta name="description" content="QuickJS Javascript Engine"> <meta name="keywords" con...
51,451
1,384
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/doc/jsbignum.texi
\input texinfo @iftex @afourpaper @headings double @end iftex @titlepage @afourpaper @sp 7 @center @titlefont{Javascript Bignum Extensions} @sp 3 @center Version 2020-01-11 @sp 3 @center Author: Fabrice Bellard @end titlepage @setfilename jsbignum.info @settitle Javascript Bignum Extensions @contents @chapter Intr...
20,719
590
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/hello.js
console.log("Hello World");
28
2
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/test_point.js
/* example of JS module importing a C module */ import { Point } from "./point.so"; function assert(b, str) { if (b) { return; } else { throw Error("assertion failed: " + str); } } class ColorPoint extends Point { constructor(x, y, color) { super(x, y); this.color = col...
718
41
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/hello_module.js
/* example of JS module */ import { fib } from "./fib_module.js"; console.log("Hello World"); console.log("fib(10)=", fib(10));
130
7
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/pi_bigint.js
/* * PI computation in Javascript using the BigInt type */ "use strict"; /* return floor(log2(a)) for a > 0 and 0 for a = 0 */ function floor_log2(a) { var k_max, a1, k, i; k_max = 0n; while ((a >> (2n ** k_max)) != 0n) { k_max++; } k = 0n; a1 = a; for(i = k_max - 1n; i >= 0n; i--...
2,834
119
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/fib.c
/* * QuickJS: Example of C module * * Copyright (c) 2017-2018 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the r...
2,291
73
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/point.c
/* * QuickJS: Example of C module with a class * * Copyright (c) 2019 Fabrice Bellard * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitati...
4,817
152
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/pi_bigfloat.js
/* * PI computation in Javascript using the QuickJS bigfloat type * (binary floating point) */ "use strict"; /* compute PI with a precision of 'prec' bits */ function calc_pi() { const CHUD_A = 13591409n; const CHUD_B = 545140134n; const CHUD_C = 640320n; const CHUD_C3 = 10939058860032000n; /* C^3/2...
1,977
67
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/fib_module.js
/* fib module */ export function fib(n) { if (n <= 0) return 0; else if (n == 1) return 1; else return fib(n - 1) + fib(n - 2); }
166
11
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/pi_bigdecimal.js
/* * PI computation in Javascript using the QuickJS bigdecimal type * (decimal floating point) */ "use strict"; /* compute PI with a precision of 'prec' digits */ function calc_pi(prec) { const CHUD_A = 13591409m; const CHUD_B = 545140134m; const CHUD_C = 640320m; const CHUD_C3 = 10939058860032000m;...
2,128
69
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/examples/test_fib.js
/* example of JS module importing a C module */ import { fib } from "./fib.so"; console.log("Hello World"); console.log("fib(10)=", fib(10));
144
7
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_bjson.js
import * as bjson from "./bjson.so"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString(...
5,224
192
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_builtin.js
"use strict"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expected.toString...
17,236
686
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_worker.js
/* os.Worker API test */ import * as std from "std"; import * as os from "os"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof exp...
1,610
63
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_loop.js
function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expected.toString()) ret...
6,286
369
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/microbench.js
/* * Javascript Micro benchmark * * Copyright (c) 2017-2019 Fabrice Bellard * Copyright (c) 2017-2019 Charlie Gordon * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrict...
23,224
1,066
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test262.patch
diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js index 9c1217351e..3c24755558 100644 --- a/harness/atomicsHelper.js +++ b/harness/atomicsHelper.js @@ -227,10 +227,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) { * } */ $262.agent.timeouts = { - yield: 100, - small: 200, - l...
2,203
72
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_bignum.js
"use strict"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expected.toString...
10,143
327
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_op_overloading.js
"use strict"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expected.toString...
4,581
208
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_closure.js
function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expected.toString()) ret...
4,359
222
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_std.js
import * as std from "std"; import * as os from "os"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && ...
6,776
282
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_worker_module.js
/* Worker code for test_worker.js */ import * as std from "std"; import * as os from "os"; var parent = os.Worker.parent; function handle_msg(e) { var ev = e.data; // print("child_recv", JSON.stringify(ev)); switch(ev.type) { case "abort": parent.postMessage({ type: "done" }); ...
682
32
jart/cosmopolitan
false
cosmopolitan/third_party/quickjs/tests/test_qjscalc.js
"use math"; "use strict"; function assert(actual, expected, message) { if (arguments.length == 1) expected = true; if (actual === expected) return; if (actual !== null && expected !== null && typeof actual == 'object' && typeof expected == 'object' && actual.toString() === expec...
5,876
257
jart/cosmopolitan
false