zoukankan      html  css  js  c++  java
  • Dart编译技术与平台

    Flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:

    • Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
    • Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).

    Dart platform

    Dart Native (VM JIT and AOT)

    Dart Native enables running Dart code compiled to native ARM or X64 machine code for mobile, desktop, and server apps.

    The Flutter framework is a popular multi-platform UI toolkit that’s powered by Dart Native when targeting mobile or desktop devices.

    Lightning fast developer workflow (Dart VM JIT)

    Having a fast developer cycle is critical for iteration.

    The Dart VM has a just-in-time compiler (JIT) that supports both pure interpretation (as required on iOS devices, for example) and runtime optimization.

    More information: dart VM tool

    Optimized production code (Dart AOT)

    When apps are ready to be deployed to production — whether you’re publishing to an app store or deploying to a production backend — you can use the Dart AOT compiler to ahead-of-time compile your app to native ARM or X64 code machine code. Your AOT-compiled app starts instantly and runs smoothly.

    The AOT-compiled code runs inside an efficient Dart runtime that enforces the sound Dart type system and manages memory using fast object allocation and a generational garbage collector.

    More information: dart2aot tool

    Dart Web (JavaScript)

    Dart Web enables running Dart code on web platforms powered by JavaScript. With Dart Web, you compile Dart code to JavaScript code, which in turn runs in a browser — for example, V8 inside Chrome.

    The Flutter framework, a popular multi-platform UI toolkit, is powered by Dart Web when targeting web apps. The AngularDart framework, a popular web app toolkit, is also powered by Dart Web.

    More information: Get started: web apps

    Lightning fast developer workflow (Dart dev compiler)

    The Dart dev compiler (dartdevc) is a Dart-to-JavaScript compiler that’s optimized for quick turnaround. Instead of using dartdevc directly, you use it with webdev, a tool that supports core developer tasks such as running, debugging, and building.

    More information:

    Optimized production code (Dart JS compiler)

    The dart2js tool compiles Dart code to fast, compact, deployable JavaScript. It employs techniques such as dead-code elimination

    More information:

    https://dart.dev/platforms

  • 相关阅读:
    1242 斐波那契数列的第N项
    1256 乘法逆元
    1264 线段相交
    1265 四点共面
    Uva10881 Piotr's Ants
    hdu 5438 Ponds 长春网赛1002
    CodeForces 540D Bad Luck Island 概率dp
    hdu 1281 二分图残量增广
    hdu 2444判定二分图+最大匹配
    hdu 3416 Marriage Match IV
  • 原文地址:https://www.cnblogs.com/feng9exe/p/11050267.html
Copyright © 2011-2022 走看看