Skip to content

Commit

Permalink
Remove support for unboxed doubles
Browse files Browse the repository at this point in the history
As of the mentioned upstream commit, the hack we use to detect the
possibility of unboxed doubles no longer works. Rather than trying to
create another hack, simply hardcode it to false. This requires us to
also remove support for EOL versions of Node.js which may still have
unboxed doubles.
  • Loading branch information
kvakil authored and No9 committed Sep 14, 2022
1 parent c1125a2 commit 0b78f54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
fail-fast: false
matrix:
node:
- version: 10.x
- version: 12.x
- version: 14.x
- version: 16.x
- version: 18.x
Expand Down
14 changes: 4 additions & 10 deletions src/llv8-constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,10 @@ void Map::Load() {


bool Map::HasUnboxedDoubleFields() {
// LayoutDescriptor is used by V8 to define which fields are not tagged
// (unboxed). In preparation for pointer compressions, V8 disabled unboxed
// doubles everywhere, which means Map doesn't have a layout_descriptor
// field, but because of how gen-postmortem-metadata works and how Torque
// generates the offsets file, we get a constant for it anyway. In the future
// unboxing will be enabled again, in which case this field will be used.
// Until then, we use the presence of this field as version (if the field is
// present, it's safe to assume we're on V8 8.1+, at least on supported
// release lines).
return !kLayoutDescriptor.Loaded();
// V8 has now disabled unboxed doubles in all supported Node.js branches. Per
// the V8 authors (v8/v8@42409a2e) it seems unlikely this support will ever
// return, so we could probably just remove it entirely.
return false;
}

void JSObject::Load() {
Expand Down

0 comments on commit 0b78f54

Please sign in to comment.