文档章节

Online Lua 5.1 source code browser

小熊猫大暴走
 小熊猫大暴走
发布于 2016/09/20 15:29
字数 252
阅读 24
收藏 0
Lua

###Online Lua 5.1 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.

本文转载自:https://www.reddit.com/comments/63hth/ask_reddit_which_oss_codebases_out_there_are_so/c02pxbp

上一篇: windows links
下一篇: cocos2dx action
小熊猫大暴走

小熊猫大暴走

粉丝 42
博文 276
码字总数 267492
作品 0
海淀
程序员
私信 提问
5大在线IDE让你畅享云端编程

五个在线IDE,很强大,吃惊了! A number of companies are making a push to move traditional desktop applications into the cloud. You can now write documents, spreadsheets and pre......

曾赛
2010/04/12
1
0
Openresty中使用LuaJit

今天在使用Openresty的时候,遇到了一个问题: local resty_sha1 = require "resty.sha1" 想使用resy.sha1的时候,出现了error,log如下: 2013/09/25 09:00:40 [error] 19620#0: *3 lua en......

timingbob
2013/09/25
2.7K
0
Why statement return error in current Lua(Codea)?

Why statement "table.insert(touches, touch.id, touch)" return error in current Lua(Codea)? Introduction When I tried to run some Codea code on the new version, I found that some......

FreeBlues
2016/05/27
20
0
Lua-5.3.2 安装 luasocket 的正确姿势

Lua-5.3.2 安装 luasocket 的正确姿势 打算在我的 里使用一下 , 也就是通过下面这样来加载: 于是搜索了下, 关键字用了, 发现官方的那个站点 里放着的是 , 按照这篇文档lua 5.2.2编译安装 Lu...

FreeBlues
2016/05/23
3.2K
0
Fsu0413/QSanguosha-For-Hegemony

Open Source Sanguosha Lisense ###Code This game is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the ......

Fsu0413
2015/02/17
0
0

没有更多内容

加载失败,请刷新页面

加载更多

JDBC+C3P0+DBCP 基本使用

1.概述 这篇文章主要说了JDBC的基本使用,包括Statement,PreparedStatement,JDBC的连接,Mysql创建用户创建数据表,C3P0的连接与配置,DBCP的连接与配置. 2.mysql的处理 这里的JDBC使用Mysql作为...

Blueeeeeee
今天
5
0
MVC Linux下开发及部署

linux使用的是 Ubuntu 64 位 18.04.2 LTS 首先复制C:\Program Files (x86)\Embarcadero\Studio\20.0\PAServer 下 LinuxPAServer20.0.tar.gz 到 linux 目录下 运行链接编译程序 delphi环境配置......

苏兴迎
今天
9
0
3.控件及其属性

1.文本 2.按钮

横着走的螃蟹
今天
7
0
安装Genymotion模拟器慢的解决方案

第一步点击下载, C:\Users\Administrator\AppData\Local\Genymobile\genymotion.log 中搜索 ova 会发现这个文件 使用迅雷下载即可. 在 虚拟机中导入这个.ova 文件 即可安装...

chenhongjiang
今天
5
0
4. 彤哥说netty系列之Java NIO实现群聊(自己跟自己聊上瘾了)

你好,我是彤哥,本篇是netty系列的第四篇。 欢迎来我的公从号彤哥读源码系统地学习源码&架构的知识。 简介 上一章我们一起学习了Java中的BIO/NIO/AIO的故事,本章将带着大家一起使用纯纯的N...

彤哥读源码
今天
7
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部