https://www.reddit.com/comments/63hth/ask_reddit_which_oss_codebases_out_there_are_so/c02pxbp

Online Lua 5.3 source code browser

Recommended reading order:

  • lmathlib.c, lstrlib.c: get familiar with the external C API. Don't bother with the pattern matcher though. Just the easy functions.
  • lapi.c: Check how the API is implemented internally. Only skim this to get a feeling for the code. Cross-reference to lua.h and luaconf.h as needed.
  • lobject.h: tagged values and object representation. skim through this first. you'll want to keep a window with this file open all the time.
  • lstate.h: state objects. ditto.
  • lopcodes.h: bytecode instruction format and opcode definitions. easy.
  • lvm.c: scroll down to luaV_execute, the main interpreter loop. see how all of the instructions are implemented. skip the details for now. reread later.
  • ldo.c: calls, stacks, exceptions, coroutines. tough read.
  • lstring.c: string interning. cute, huh?
  • ltable.c: hash tables and arrays. tricky code.
  • ltm.c: metamethod handling, reread all of lvm.c now.
  • You may want to reread lapi.c now.
  • ldebug.c: surprise waiting for you. abstract interpretation is used to find object names for tracebacks. does bytecode verification, too.
  • lparser.c, lcode.c: recursive descent parser, targetting a register-based VM. start from chunk() and work your way through. read the expression parser and the code generator parts last.
  • lgc.c: incremental garbage collector. take your time.
  • Read all the other files as you see references to them. Don't let your stack get too deep though.

If you're done before X-Mas and understood all of it, you're good. The information density of the code is rather high.

lua 源码阅读顺序的更多相关文章

  1. lua 源码阅读 5.3.5 笔记

    记录下吧,断断续续读了几周,收益还是很多的. 推荐阅读顺序: 1) 基础数据类型 lstring.c ltable.c lobject.c lfunc.c lstate.c 2)  标准库(这个相对简 ...

  2. Java源码阅读顺序

    阅读顺序参考链接:https://blog.csdn.net/qq_21033663/article/details/79571506 阅读源码:JDK 8 计划阅读的package: 1.java. ...

  3. JDK源码阅读顺序

      很多java开发的小伙伴都会阅读jdk源码,然而确不知道应该从哪读起.以下为小编整理的通常所需阅读的源码范围. 标题为包名,后面序号为优先级1-4,优先级递减 1.java.lang 1) Obj ...

  4. lua 源码阅读 1.1 -> 2.1

    lua 1.1 阅读1. hash.c 中 a) 对建立的 Hash *array 用 listhead 链式结构来管理,新增lua_hashcollector,用来做 Hash 的回收处理. ps: ...

  5. Dubbo源码阅读顺序

    转载: https://blog.csdn.net/heroqiang/article/details/85340958 Dubbo源码解析之配置解析篇,主要内容是<dubbo:service/ ...

  6. cpython和lua源码阅读

    cpython代码很多,不太容易看出来. lua代码真的短小精悍,不得不佩服.

  7. spark源码阅读

    根据spark2.2的编译顺序来确定源码阅读顺序,只阅读核心的基本部分. 1.common目录 ①Tags②Sketch③Networking④Shuffle Streaming Service⑤Un ...

  8. redis 5.0.7 源码阅读——整数集合intset

    redis中整数集合intset相关的文件为:intset.h与intset.c intset的所有操作与操作一个排序整形数组 int a[N]类似,只是根据类型做了内存上的优化. 一.数据结构 ty ...

  9. redis 5.0.7 源码阅读——跳跃表skiplist

    redis中并没有专门给跳跃表两个文件.在5.0.7的版本中,结构体的声明与定义.接口的声明在server.h中,接口的定义在t_zset.c中,所有开头为zsl的函数. 一.数据结构 单个节点: t ...

随机推荐

  1. [C#.Net]判断文件是否被占用的两种方法

    今天开发产线测试Tool时发现日志文件会几率性的被占用,上网浏览找到最简单的代码(API或者FileStream),在这里抛砖引玉下. 第一种方法:API using System.IO; using ...

  2. c#的装箱和拆箱及值类型和引用类型

    装箱:它允许根据值类型创建一个对象,然后使用对这新对象的一个引用. int i = 5; object o = i; int j = (int)o; 装箱:运行时将在堆上创建一个包含值5的对象(它是一 ...

  3. list集合去除重复对象的实现

    下面小编就为大家带来一篇list集合去除重复对象的实现.小编觉得挺不错的,现在就分享给大家,也给大家做个参考.一起跟随小编过来看看吧 对象重复是指对象里面的变量的值都相等,并不定是地址.list集合存 ...

  4. Explain结果解读与实践

    MySQL的EXPLAIN命令用于SQL语句的查询执行计划(QEP).这条命令的输出结果能够让我们了解MySQL 优化器是如何执行SQL 语句的.这条命令并没有提供任何调整建议,但它能够提供重要的信息 ...

  5. 2019.01.13 bzoj4137: [FJOI2015]火星商店问题(线段树分治+可持久化01trie)

    传送门 题意:序列上有nnn个商店,有两种事件会发生: sss商店上进购标价为vvv的一个物品 求编号为[l,r][l,r][l,r]之间的位置买ddd天内新进购的所有物品与一个数xxx异或值的最大值 ...

  6. PHP array

    一.数组操作的基本函数 数组的键名和值 array_values($arr);获得数组的值 array_keys($arr);获得数组的键名 array_flip($arr);数组中的值与键名互换(如 ...

  7. C语言程序设计50例(三)(经典收藏)

    [程序31]题目:请输入星期几的第一个字母来判断一下是星期几,如果第一个字母一样,则继续 判断第二个字母.1.程序分析:用情况语句比较好,如果第一个字母一样,则判断用情况语句或if语句判断第二个字母. ...

  8. IntelliJ IDEA 启动 自动进入项目列表,IDE启动不进入项目,IDE启动不进入上一次的项目

    1.希望IDE启动后,不进入上次使用的项目,而进入如图 2.项目很多,想着切换不方便,还得在启动打开前,点击取消,而且拖慢IDE启动的速度,所以进入这个项目列表页还是很好的. 3.设置方法 首先,任意 ...

  9. svn 提交代码 自动过滤技巧

    操作 在用svn管理版本时,有时希望在提交到服务器时,能过滤掉指定后缀名的所有文件,或指定名称的文件夹.文件名. 常见的文件夹名称和文件名如下: bin obj debug temppe *.suo ...

  10. form表单序列化为json格式数据

    在web开发过程中,经常遇到将form序列化不能格式的字符串提交到后台,下面就介绍怎样将form表单序列化为json字符串. 首先,是扩展的jquery序列化插件,依赖jquery.经测试,这段代码可 ...