51 Star 216 Fork 1.1K

OpenHarmony/arkcompiler_ets_runtime

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

方舟eTS运行时部件

简介

方舟eTS运行时是OpenHarmony上默认的ArkTS语言运行时。支持Ecmascript规范定义的标准库和高效container容器库,提供完备的C++交互ArkTS NAPI和各种高性能的垃圾回收器,驱动着万物互联时代的OpenHarmony应用程序。

更多信息请参考:方舟运行时子系统

图1 方舟eTS运行时部件架构图:

目录

/arkcompiler/ets_runtime
├─ ecmascript             # 方舟ArkTS运行时实现,包括ECMAScript标准库、解释器、内存管理等
│   ├─ base               # 基础帮助类
│   ├─ builtins           # ECMAScript标准库
│   ├─ checkpoint         # 虚拟机安全点
│   ├─ compiler           # 编译器
│   ├─ containers         # 非ECMAScript标准容器类库
│   ├─ daemon             # Shared GC并发线程名
│   ├─ debugger           # 调试器
│   ├─ deoptimizer        # 编译器逆优化
│   ├─ dfx                # 内存与性能分析工具
│   ├─ extractortool      # sourcemap解析
│   ├─ ic                 # 内联缓存模块
│   ├─ interpreter        # 解释器
│   ├─ intl               # 国际化
│   ├─ jit                # jit编译器
│   ├─ jobs               # 微任务队列
│   ├─ js_api             # 非ECMA标准对象模型
│   ├─ js_type_metadata   # 对象布局文件
│   ├─ js_vm              # 命令行工具
│   ├─ jspandafile        # abc文件管理模块
│   ├─ mem                # 内存管理模块
│   ├─ module             # ECMAScript module模块
│   ├─ napi               # C++接口模块
│   ├─ ohos               # 系统相关逻辑
│   ├─ patch              # 冷、热补丁
│   ├─ pgo_profiler       # 基于 Profile-Guided Optimization (PGO) 的性能分析器,用于性能分析与优化
│   ├─ platform           # 跨平台处理
│   ├─ quick_fix          # 快速修复命令行工具
│   ├─ regexp             # 正则引擎模块
│   ├─ require            # CommonJS规范module模块
│   ├─ sdk                # sdk工具集成
│   ├─ serializer         # 序列化
│   ├─ shared_mm          # 共享内存管理模块
│   ├─ shared_objects     # 共享对象实现
│   ├─ snapshot           # 快照模块
│   ├─ stackmap           # 活跃变量的位置信息
│   ├─ stubs              # runtime桩函数
│   ├─ taskpool           # 任务池
│   ├─ tests              # 单元测试用例
│   ├─ ts_types           # TS类型管理模块
└─ test                   # 模块测试用例

约束

  • 仅支持运行方舟eTS编译器(ts2abc或es2abc)生成的方舟字节码文件
  • 只支持ES2021标准和严格模式(use strict)
  • 不支持通过字符串动态创建函数(比如new Function("console.log(1);"))

编译构建

$./build.sh --product-name hispark_taurus_standard --build-target ark_js_host_linux_tools_packages

接口说明

NAPI接口说明参考NAPI部件

使用说明

ArkTS生成字节码参考方舟eTS编译器

字节码执行:

LD_LIBRARY_PATH=out/hispark_taurus/clang_x64/arkcompiler/ets_runtime:out/hispark_taurus/clang_x64/thirdparty/icu:prebuilts/clang/ohos/linux-x86_64/llvm/lib ./out/hispark_taurus/clang_x64/arkcompiler/ets_runtime/ark_js_vm helloworld.abc

更多使用说明请参考:方舟运行时使用指南

相关仓

arkcompiler_runtime_core

arkcompiler_ets_runtime

arkcompiler_ets_frontend

空文件

简介

暂无描述 展开 收起
README
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/arkcompiler_ets_runtime.git
git@gitee.com:openharmony/arkcompiler_ets_runtime.git
openharmony
arkcompiler_ets_runtime
arkcompiler_ets_runtime
master

搜索帮助