aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-09 02:28:14 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-09 02:28:14 -0800
commitf0475e89c5065d91e58bcb3e512fa972fd7874e5 (patch)
tree461c51d1f463ce5930546b8f249cb0dc231cbc4a /src
parentcb75b4799fbb0bf71da062f5d285b8c8ca31ae00 (diff)
downloadbun-f0475e89c5065d91e58bcb3e512fa972fd7874e5.tar.gz
bun-f0475e89c5065d91e58bcb3e512fa972fd7874e5.tar.zst
bun-f0475e89c5065d91e58bcb3e512fa972fd7874e5.zip
Handle 0 in isCell
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/bindings/bindings.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig
index 415c48612..1afb5a588 100644
--- a/src/bun.js/bindings/bindings.zig
+++ b/src/bun.js/bindings/bindings.zig
@@ -3139,7 +3139,10 @@ pub const JSValue = enum(JSValueReprInt) {
}
pub inline fn isCell(this: JSValue) bool {
- return (@bitCast(u64, @enumToInt(this)) & FFI.NotCellMask) == 0;
+ return switch (this) {
+ .zero, .undefined, .null, .true, .false => false,
+ else => (@bitCast(u64, @enumToInt(this)) & FFI.NotCellMask) == 0,
+ };
}
pub fn asCell(this: JSValue) *JSCell {
nsg191/bun/commit/src/bundler/bundle_v2.zig?h=jarred/export-star-flat&id=c764543af54352b7d09352f47f9edafe71fbb1b3&follow=1'>Fix sortGravatar Jarred Sumner 1-6/+3 2023-04-07Workaround crashGravatar Jarred Sumner 1-3/+5 2023-04-07Bun gets a new bundler (#2312)Gravatar Jarred Sumner 113-15962/+48745 2023-04-07Fix trailing slash bug in upload scriptGravatar Ashcon Partovi 1-1/+1 2023-04-07Fix environment variables in workflowGravatar Ashcon Partovi 2-4/+4 2023-04-07Upload releases to S3Gravatar Ashcon Partovi 5-1/+171 2023-04-07Add TSConfig object type to TranspilerOptions interface (#2545)Gravatar Jake Boone 1-1/+21 2023-04-07chore: simplify prettier command and cache (#2589)Gravatar hiroki osame 1-1/+1 2023-04-07`FileBlob` -> `BunFile`, add `BunFile.lastModified` (#2581)Gravatar Colin McDonnell 4-77/+119 2023-04-07feat(tls.Server) basic support (cert, key, rejectUnauthorized, requestCert, c...Gravatar Ciro Spaciari 23-10346/+13923 2023-04-06Proactively add these to the listGravatar Jarred Sumner 1-0/+2 2023-04-06BumpGravatar Jarred Sumner 1-1/+1 2023-04-06fix: export `constants` from `fs/promises` (#2567)Gravatar dave caruso 6-6/+14 2023-04-06docs: add a section on uninstalling bun (#2560)Gravatar dave caruso 1-0/+8 2023-04-06docs(cli/bunx): add notice (#2574)Gravatar Jozef Steinhübl 1-0/+4 2023-04-06Fix `toEqual` when the second array has extra array holes (#2580)Gravatar Dylan Conway 3-18/+76 2023-04-06Add last modify field "mtime" for FileBlob (#1431) (#2491)Gravatar Zhongwei Yao 6-33/+128 2023-04-06bun-types: infer strict `Subprocess` from `Bun.spawn()` options, part 2 (#2573)Gravatar dave caruso 9-67/+165 2023-04-06cache needs to update, move to another process (#2578)Gravatar Dylan Conway 2-156/+171 2023-04-06fix(ws): export Server (#2575)Gravatar hiroki osame 1-13/+30 2023-04-06docs(CONTRIBUTING): referece development guide (#2576)Gravatar hiroki osame 1-1/+5 2023-04-05rebase (#1501)Gravatar dave caruso 2-144/+305 2023-04-05Update `typecheck` (#2572)Gravatar Colin McDonnell 3-4/+8 2023-04-05prependGravatar Jarred Sumner 1-7/+3 2023-04-05Add tests for `bun test` with preload scripts (#2566)Gravatar Jake Boone 2-1/+107 2023-04-05Disable buffering when we clear terminalGravatar Jarred Sumner 1-0/+2 2023-04-05PrettierGravatar Jarred Sumner 3-4/+4 2023-04-05fix(fetch.proxy) fix proxy authentication (#2554)Gravatar Ciro Spaciari 3-31/+186 2023-04-05fix: build warnings (#2562)Gravatar hiroki osame 4-4/+1 2023-04-05In Documentation, move --watch before the script name (#2569)Gravatar Lawlzer 1-4/+5 2023-04-05fix `deepEquals` with array holes and accessors (#2557)Gravatar Dylan Conway 2-10/+249 2023-04-05fix: modules to have null prototype (#2561)Gravatar hiroki osame 2-2/+9 2023-04-04:clock1: :clock2: :clock3:Gravatar Jarred Sumner 1-1/+1 2023-04-04Implement `import.meta.main` (#2556)Gravatar Jarred Sumner 10-8/+89 2023-04-04Dylan/fix some failing tests (#2544)Gravatar Jarred Sumner 10-29/+72 2023-04-04Add npm benchmark (#2555)Gravatar Colin McDonnell 13-1/+271 2023-04-03Use absolute paths morebun-v0.5.9Gravatar Jarred Sumner 2-6/+11 2023-04-03Fix test failureGravatar Jarred Sumner 1-15/+18