JSPatch 实现原理详解

(转)https://github.com/bang590/JSPatch/wiki/JSPatch-%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3

大纲

基础原理

方法调用
  1.require
  2.JS接口
    i.封装 JS 对象
    ii.`__c()`元函数
  3.消息传递
  4.对象持有/转换
  5.类型转换

方法替换
  1.基础原理
  2.va_list实现(32位)
  3.ForwardInvocation实现(64位)
  4.新增方法
    i.方案
    ii.Protocol
  5.Property实现
  6.self关键字
  7.super关键字
扩展
  1.Struct 支持
  2.C 函数支持

细节
  1.Special Struct
  2.内存问题
    i.Double Release
    ii.内存泄露
  3.‘_’的处理
  4.JPBoxing
  5.nil 的处理
    i.区分NSNull/nil
    ii.链式调用

总结
posted @ 2016-09-01 10:37  i大林  阅读(125)  评论(0)    收藏  举报