diff options
Diffstat (limited to 'ext/node/polyfills/v8.ts')
-rw-r--r-- | ext/node/polyfills/v8.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/node/polyfills/v8.ts b/ext/node/polyfills/v8.ts index 251cead62..4c01bc9ad 100644 --- a/ext/node/polyfills/v8.ts +++ b/ext/node/polyfills/v8.ts @@ -4,12 +4,16 @@ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials -import { notImplemented } from "ext:deno_node/_utils.ts"; +import { core } from "ext:core/mod.js"; +const { + op_v8_cached_data_version_tag, + op_v8_get_heap_statistics, +} = core.ensureFastOps(); -const { ops } = globalThis.__bootstrap.core; +import { notImplemented } from "ext:deno_node/_utils.ts"; export function cachedDataVersionTag() { - return ops.op_v8_cached_data_version_tag(); + return op_v8_cached_data_version_tag(); } export function getHeapCodeStatistics() { notImplemented("v8.getHeapCodeStatistics"); @@ -24,7 +28,7 @@ export function getHeapSpaceStatistics() { const buffer = new Float64Array(14); export function getHeapStatistics() { - ops.op_v8_get_heap_statistics(buffer); + op_v8_get_heap_statistics(buffer); return { total_heap_size: buffer[0], |