Tagged articles
7 articles
Page 1 of 1
JD Cloud Developers
JD Cloud Developers
Sep 19, 2024 · Fundamentals

How to Port the V8 JavaScript Engine to HarmonyOS – A Complete Guide

This article explains why the Roma framework needs a JavaScript engine on HarmonyOS, compares mainstream JS engines, details V8's architecture and JIT pipeline, and provides a step‑by‑step process for cross‑compiling V8 with CMake, GN, Ninja and the HarmonyOS SDK, including code examples and tooling tips.

CMakeHarmonyOSJavaScript Engine
0 likes · 40 min read
How to Port the V8 JavaScript Engine to HarmonyOS – A Complete Guide
JD Tech Talk
JD Tech Talk
Sep 19, 2024 · Fundamentals

Porting the V8 JavaScript Engine to HarmonyOS: Background, Architecture, Tool Selection, and Cross‑Compilation Process

This article explains the need to adapt the Roma framework for HarmonyOS by selecting and analyzing the V8 JavaScript engine, describes its internal components such as the parser, Ignition interpreter, TurboFan JIT compiler and Orinoco garbage collector, and provides a step‑by‑step guide for cross‑compiling V8 with CMake, GN, Ninja and tool‑chain files to produce a usable library for HarmonyOS native projects.

CMakeHarmonyOSJavaScript
0 likes · 36 min read
Porting the V8 JavaScript Engine to HarmonyOS: Background, Architecture, Tool Selection, and Cross‑Compilation Process
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Feb 5, 2024 · Fundamentals

How V8 Implements JavaScript Closures

V8 creates JavaScript closures by lazily parsing functions, using a pre‑parser to detect and record outer‑variable references, copying captured values to the heap, then generating bytecode that builds a function context and closure, ensuring efficient execution while avoiding memory‑leak pitfalls.

JavaScriptLazy ParsingV8
0 likes · 16 min read
How V8 Implements JavaScript Closures
ELab Team
ELab Team
Aug 4, 2022 · Fundamentals

Understanding V8’s Memory Management and Garbage Collection Strategies

This article explains how the V8 JavaScript engine manages memory through stack and heap allocation, describes its generational garbage‑collection architecture—including New Space, Old Space, and various GC algorithms—and offers practical optimization techniques to reduce pause times and improve performance.

Garbage CollectionJavaScriptMemory Management
0 likes · 21 min read
Understanding V8’s Memory Management and Garbage Collection Strategies
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Nov 26, 2021 · Fundamentals

Understanding V8 Engine Memory Allocation and Garbage Collection

This article explains how the V8 JavaScript engine allocates memory, why garbage collection is necessary, describes the memory layout of new and old generations, reviews common GC algorithms such as reference counting, mark‑sweep, mark‑compact and incremental marking, and offers practical tips for writing high‑performance JavaScript code.

Garbage CollectionJavaScriptMemory Management
0 likes · 22 min read
Understanding V8 Engine Memory Allocation and Garbage Collection
ByteDance Terminal Technology
ByteDance Terminal Technology
Sep 9, 2021 · Mobile Development

Resolving Thread Merging Issues in Flutter Multi‑Engine PlatformView Scenarios

This article explains the thread‑merging problem that arises when using PlatformView in Flutter’s multi‑engine setups, analyzes the root causes in both independent and lightweight engines, and presents a comprehensive solution that modifies the engine’s task‑runner merging logic to support one‑to‑many merges.

FlutterPlatformViewThread Merging
0 likes · 27 min read
Resolving Thread Merging Issues in Flutter Multi‑Engine PlatformView Scenarios
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Mar 15, 2021 · Frontend Development

Why Object.keys() Doesn’t Preserve Insertion Order: A Deep Dive into JavaScript Engine Sorting

This article investigates why JavaScript's Object.keys() may return keys in an unexpected order, explains the specification‑defined sorting rules for integer and string properties, demonstrates the issue with timestamp tags on iOS and Android, and explores the actual implementations in QuickJS and V8 engines.

JavaScriptObject.keysQuickJS
0 likes · 16 min read
Why Object.keys() Doesn’t Preserve Insertion Order: A Deep Dive into JavaScript Engine Sorting