V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
freewizard
V2EX  ›  iDev

LLVM is new JVM

  •  
  •   freewizard ·
    freewizard · 2015-06-09 13:31:36 +08:00 · 3509 次点击
    这是一个创建于 3257 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.

    Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
    6 条回复    2015-06-10 10:18:36 +08:00
    bdbai
        1
    bdbai  
       2015-06-09 13:44:38 +08:00 via iPhone
    以及CLR
    ether
        2
    ether  
       2015-06-09 16:31:00 +08:00
    swift那边不清楚。Clang那边得到的llvm bitcode (其实就是llvm IR的二进制形式)是平台相关的。首先clang那边就生成了平台相关的abi,其次llvm ir里面的Data Layout就包含了目标平台的东西。而且llvm 的那些优化会根据data layout做平台相关优化。

    llvm IR 更多是一种用来represent我们程序,供llvm不同的transformation和analysis pass共享的一种编译器内部数据结构。
    mozartgho
        3
    mozartgho  
       2015-06-09 16:35:02 +08:00
    LLVM本来就是一个编译器后端,用来把中间代码编译成机器码。它的中间代码是语言无关的,和JVM有根本的不同。你说的bitcode应该是指LLVM的中间代码。另外请贴出完整的文章链接。不知道文章是什么意思,是说以后ObjC和Swift都编译成LLVM中间码吗?
    typcn
        4
    typcn  
       2015-06-09 16:46:12 +08:00
    JVM = SHITVIRUALMACHINE
    LLVM = COMPLIER BACKEND
    forcecharlie
        6
    forcecharlie  
       2015-06-10 10:18:36 +08:00
    @ether 最终还是会用llc 编译成机器码的。很jvm是不同的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1272 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:06 · PVG 02:06 · LAX 11:06 · JFK 14:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.