タグ

ブックマーク / v8.dev (109)

  • WebAssembly JSPI has a new API · V8

    WebAssembly’s JavaScript Promise Integration (JSPI) API has a new API, available in Chrome release M126. We talk about what has changed, how to use it with Emscripten, and what is the roadmap for JSPI. JSPI is an API that allows WebAssembly applications that use sequential APIs to access Web APIs that are asynchronous. Many Web APIs are crafted in terms of JavaScript Promise objects: instead of im

    efcl
    efcl 2024/06/12
    WebAssemblyのJavaScript Promise Integrationについて
  • The V8 Sandbox · V8

    After almost three years since the initial design document and hundreds of CLs in the meantime, the V8 Sandbox — a lightweight, in-process sandbox for V8 — has now progressed to the point where it is no longer considered an experimental security feature. Starting today, the V8 Sandbox is included in Chrome's Vulnerability Reward Program (VRP). While there are still a number of issues to resolve be

    efcl
    efcl 2024/04/07
    V8のSandboxについて。 HeapのSandboxの考え方
  • Iterator helpers · V8

    Iterator helpers are a collection of new methods on Iterator prototype that help in general use of iterators. Since these helper methods are on the iterator prototype, any object that has Iterator.prototype on its prototype chain (e.g. array iterators) will get the methods. In the following subsections, we explain iterator helpers. All the provided examples are working in a blog archive page that

    efcl
    efcl 2024/03/31
    Chrome 122でサポートされたES Proposal Stage 3のIterator Helpersについて。 map/filter/take/drop/flatMap/reduce/toArray/forEach/some/every/findなどの使い方について
  • Import attributes · V8

    Previously #V8 shipped the import assertions feature in v9.1. This feature allowed module import statements to include additional information by using the assert keyword. This additional information is currently used to import JSON and CSS modules inside JavaScript modules. Import attributes #Since then, import assertions has evolved into import attributes. The point of the feature remains the sam

    efcl
    efcl 2024/02/05
    ECMAScript Proposal Stage 3のImport attributesについて。 `import ... from .... assert { type } `はセマンティクス的に問題があったため、`import ... from .... with { type }`へと変更された。
  • V8 is Faster and Safer than Ever! · V8

    Welcome to the thrilling world of V8, where speed is not just a feature but a way of life. As we bid farewell to 2023, it's time to celebrate the impressive accomplishments V8 has achieved this year. Through innovative performance optimizations, V8 continues to push the boundaries of what's possible in the ever-evolving landscape of the Web. We introduced a new mid-tier compiler and implemented se

    efcl
    efcl 2023/12/23
    V8のMaglev
  • A new way to bring garbage collected programming languages efficiently to WebAssembly · V8

    A recent article on WebAssembly Garbage Collection (WasmGC) explains at a high level how the Garbage Collection (GC) proposal aims to better support GC languages in Wasm, which is very important given their popularity. In this article, we will get into the technical details of how GC languages such as Java, Kotlin, Dart, Python, and C# can be ported to Wasm. There are in fact two main approaches:

    efcl
    efcl 2023/11/16
    WasmGCの解説
  • Control-flow Integrity in V8 · V8

    Control-flow integrity (CFI) is a security feature aiming to prevent exploits from hijacking control-flow. The idea is that even if an attacker manages to corrupt the memory of a process, additional integrity checks can prevent them from executing arbitrary code. In this blog post, we want to discuss our work to enable CFI in V8. Background # The popularity of Chrome makes it a valuable target for

    efcl
    efcl 2023/10/10
    V8 JITコンパイラーのメモリ破壊への対策について。 ジャンプ先、リターンアドレスの保護をするLanding PadsやPointer Authentication。 JITはマシンコードを実行可能なメモリに書き込むため、memory protection keys (pkeys)を使った書き込み
  • Speeding up V8 heap snapshots · V8

    This blog post has been authored by José Dapena Paz (Igalia), with contributions from Jason Williams (Bloomberg), Ashley Claymore (Bloomberg), Rob Palmer (Bloomberg), Joyee Cheung (Igalia), and Shu-yu Guo (Google). In this post about V8 heap snapshots, I will talk about some performance problems found by Bloomberg engineers, and how we fixed them to make JavaScript memory analysis faster than ever

    efcl
    efcl 2023/07/28
    V8のヒープスナップショットのパフォーマンス改善について。 `--max-old-space-size=100`でヒープサイズを小さくして、OOMをおきやすくしてメモリリークを調査する手法、その際のヒープスナップショットの作成時間がかかってい
  • V8 Torque user manual · V8

    V8 Torque is a language that allows developers contributing to the V8 project to express changes in the VM by focusing on the intent of their changes to the VM, rather than preoccupying themselves with unrelated implementation details. The language was designed to be simple enough to make it easy to directly translate the ECMAScript specification into an implementation in V8, but powerful enough t

    efcl
    efcl 2023/03/27
    V8内の言語であるtqについて
  • Introducing the WebAssembly JavaScript Promise Integration API · V8

    The JavaScript Promise Integration (JSPI) API allows WebAssembly applications that were written assuming synchronous access to external functionality to operate smoothly in an environment where the functionality is actually asynchronous. This note outlines what the core capabilities of the JSPI API are, how to access it, how to develop software for it and offers some examples to try out. What is ‘

    efcl
    efcl 2023/01/21
    WebAssemblyのPromise API
  • Pointer compression in Oilpan · V8

    Show navigation It is absolutely idiotic to have 64-bit pointers when I compile a program that uses less than 4 gigabytes of RAM. When such pointer values appear inside a struct, they not only waste half the memory, they effectively throw away half of the cache. – Donald Knuth (2008) Truer words have (almost) never been spoken. We also see CPU vendors not actually shipping 64-bit CPUs and Android

    efcl
    efcl 2022/11/28
    V8 Oilpanでのポインター圧縮でメモリ削減。
  • Faster initialization of instances with new class features · V8

    Show navigation Class fields have been shipped in V8 since v7.2 and private class methods have been shipped since v8.4. After the proposals reached stage 4 in 2021, work had begun to improve the support of the new class features in V8 - until then, there had been two main issues affecting their adoption: The initialization of class fields and private methods was much slower than the assignment of

    efcl
    efcl 2022/04/24
    V8でPublic/Private Class Fieldが通常のプロパティと同等のパフォーマンスとなった。 仕様ではインスタンスに紐づけられるが、V8の実装ではクラスに紐づいたContextへ保存されている。
  • V8 release v9.9 · V8

    Every four weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git main immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.9, which is in beta until its release in coordination with Chrome 99 Stable in several weeks. V8 v9.9 is filled with all sorts of developer-facing goodies. This post pro

    efcl
    efcl 2022/02/01
    V8 v9.9リリース。 Intl.Locale APIにプロパティ追加、`Intl.supportedValuesOf`の追加など
  • V8 release v9.7 · V8

    Every four weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git main immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.7, which is in beta until its release in coordination with Chrome 97 Stable in several weeks. V8 v9.7 is filled with all sorts of developer-facing goodies. This post pro

    efcl
    efcl 2021/11/06
    V8 v9.7リリース。 ArrayとTypedArrayに`findLast`と`findLastIndex`の実装。
  • V8 release v9.3 · V8

    Every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s main Git branch immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.3, which is in beta until its release in coordination with Chrome 93 Stable in several weeks. V8 v9.3 is filled with all sorts of developer-facing goodies. This po

    efcl
    efcl 2021/08/09
    V8 9.3リリース。 JITコンパイラのSparkplugにBatch Compilationを導入してコンパイル速度の改善。 `Object.hasOwn`、Error Causeのサポートなど
  • V8 release v9.2 · V8

    Every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.2, which is in beta until its release in coordination with Chrome 92 Stable in several weeks. V8 v9.2 is filled with all sorts of developer-facing goodies. This post pr

    efcl
    efcl 2021/07/16
    V8 9.2リリース。 Array/TypedArra/Stringの`at()`メソッドの実装、64bitプラットフォームでの共有ポインタの圧縮の仕組みがデフォルトで有効に
  • Sparkplug — a non-optimizing JavaScript compiler · V8

    Show navigation Writing a high-performance JavaScript engine takes more than just having a highly optimising compiler like TurboFan. Particularly for short-lived sessions, like loading websites or command line tools, there’s a lot of work that happens before the optimising compiler even has a chance to start optimising, let alone having time to generate the optimised code. This is the reason why,

    efcl
    efcl 2021/05/30
    V8のコンパイラパイプラインにsparkplugという、IgnitionバイトコードからCPUバイトコードへトランスパイルして実行するinterpreterを追加した話。 Ignition(interpreter) -> sparkplug(interpreter/native) → TurboFan(JIT Compiler)
  • Built-in functions · V8

    Built-in functions in V8 come in different flavors w.r.t. implementation, depending on their functionality, performance requirements, and sometimes plain historical development. Some are implemented in JavaScript directly, and are compiled into executable code at runtime just like any user JavaScript. Some of them resort to so-called runtime functions for part of their functionality. Runtime funct

    efcl
    efcl 2021/05/17
    V8の組み込み関数。 `%` から始まるnative構文のこと。
  • V8 release v9.1 · V8

    Every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.1, which is in beta until its release in coordination with Chrome 91 Stable in several weeks. V8 v9.1 is filled with all sorts of developer-facing goodies. This post pr

    efcl
    efcl 2021/05/17
    V8 v9.1リリース。 Top-level awaitのデフォルトサポート、`#foo in obj`のPrivate brand checksのサポートなど
  • V8 release v9.0 · V8

    Every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 9.0, which is in beta until its release in coordination with Chrome 90 Stable in several weeks. V8 v9.0 is filled with all sorts of developer-facing goodies. This post pr

    efcl
    efcl 2021/03/18
    V8 v9.0リリース。 `RegExp#insices`の実装、`super`のプロパティアクセスのパフォーマンス改善、JavaScriptからWasmの関数を呼ぶときのパフォーマンスを改善など