Skip to content

Commit

Permalink
Merge from LuaJIT upstream up to commit 5aa0201.
Browse files Browse the repository at this point in the history
  • Loading branch information
akopytov committed Feb 19, 2017
1 parent ffcc808 commit b0fcdf5
Show file tree
Hide file tree
Showing 199 changed files with 299 additions and 239 deletions.
2 changes: 1 addition & 1 deletion third_party/luajit/luajit/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
===============================================================================
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/

Copyright (C) 2005-2016 Mike Pall. All rights reserved.
Copyright (C) 2005-2017 Mike Pall. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion third_party/luajit/luajit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# For MSVC, please follow the instructions given in src/msvcbuild.bat.
# For MinGW and Cygwin, cd to src and run make with the Makefile there.
#
# Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
# Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
##############################################################################

MAJVER= 2
Expand Down
2 changes: 1 addition & 1 deletion third_party/luajit/luajit/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.

Project Homepage: http://luajit.org/

LuaJIT is Copyright (C) 2005-2016 Mike Pall.
LuaJIT is Copyright (C) 2005-2017 Mike Pall.
LuaJIT is free software, released under the MIT license.
See full Copyright Notice in the COPYRIGHT file or in luajit.h.

Expand Down
2 changes: 1 addition & 1 deletion third_party/luajit/luajit/doc/bluequad-print.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2004-2016 Mike Pall.
/* Copyright (C) 2004-2017 Mike Pall.
*
* You are welcome to use the general ideas of this design for your own sites.
* But please do not steal the stylesheet, the layout or the color scheme.
Expand Down
2 changes: 1 addition & 1 deletion third_party/luajit/luajit/doc/bluequad.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2004-2016 Mike Pall.
/* Copyright (C) 2004-2017 Mike Pall.
*
* You are welcome to use the general ideas of this design for your own sites.
* But please do not steal the stylesheet, the layout or the color scheme.
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>LuaJIT Change History</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -807,7 +807,7 @@ <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 &mdash; 2009-10-31</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
6 changes: 3 additions & 3 deletions third_party/luajit/luajit/doc/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Contact</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -93,15 +93,15 @@ <h1>Contact</h1>
<h2>Copyright</h2>
<p>
All documentation is
Copyright &copy; 2005-2016 Mike Pall.
Copyright &copy; 2005-2017 Mike Pall.
</p>


<br class="flush">
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_c_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Lua/C API Extensions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -179,7 +179,7 @@ <h3 id="mode_wrapcfunc"><tt>luaJIT_setmode(L, idx, LUAJIT_MODE_WRAPCFUNC|flag)</
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_ffi.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>FFI Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -322,7 +322,7 @@ <h2 id="cdata">Motivating Example: Using C Data Structures</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_ffi_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>ffi.* API Functions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -560,7 +560,7 @@ <h2 id="literals">Extensions to the Lua Parser</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_ffi_semantics.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>FFI Semantics</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -1253,7 +1253,7 @@ <h2 id="status">Current Status</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_ffi_tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>FFI Tutorial</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -593,7 +593,7 @@ <h2 id="cache">To Cache or Not to Cache</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_jit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>jit.* Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -191,7 +191,7 @@ <h2 id="jit_util"><tt>jit.util.*</tt> &mdash; JIT compiler introspection</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/ext_profiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Profiler</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -355,7 +355,7 @@ <h3 id="luaJIT_profile_dumpstack"><tt>p = luaJIT_profile_dumpstack(L, fmt, depth
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
17 changes: 11 additions & 6 deletions third_party/luajit/luajit/doc/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Extensions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -210,7 +210,8 @@ <h3 id="string_dump"><tt>string.dump(f [,strip])</tt> generates portable bytecod
<p>
Note: <tt>LJ_GC64</tt> mode requires a different frame layout, which implies
a different, incompatible bytecode format for ports that use this mode (e.g.
ARM64). This may be rectified in the future.
ARM64 or MIPS64) or when explicitly enabled for x64. This may be rectified
in the future.
</p>

<h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3>
Expand Down Expand Up @@ -291,8 +292,8 @@ <h2 id="lua52">Extensions from Lua 5.2</h2>
<li><tt>load(string|reader [, chunkname [,mode [,env]]])</tt>.</li>
<li><tt>loadstring()</tt> is an alias for <tt>load()</tt>.</li>
<li><tt>loadfile(filename [,mode [,env]])</tt>.</li>
<li><tt>math.log(x [,base])</tt>.
<li><tt>string.rep(s, n [,sep])</tt>.
<li><tt>math.log(x [,base])</tt>.</li>
<li><tt>string.rep(s, n [,sep])</tt>.</li>
<li><tt>string.format()</tt>: <tt>%q</tt> reversible.
<tt>%s</tt> checks <tt>__tostring</tt>.
<tt>%a</tt> and <tt>"%A</tt> added.</li>
Expand Down Expand Up @@ -335,7 +336,8 @@ <h2 id="lua52">Extensions from Lua 5.2</h2>
exit status.</li>
<li><tt>debug.setmetatable()</tt> returns object.</li>
<li><tt>debug.getuservalue()</tt> and <tt>debug.setuservalue()</tt>.</li>
<li>Remove <tt>math.mod()</tt>, <tt>string.gfind()</tt>.
<li>Remove <tt>math.mod()</tt>, <tt>string.gfind()</tt>.</li>
<li><tt>package.searchers</tt>.</li>
</ul>
<p>
Note: this provides only partial compatibility with Lua 5.2 at the
Expand All @@ -350,6 +352,9 @@ <h2 id="lua53">Extensions from Lua 5.3</h2>
<ul>
<li>Unicode escape <tt>'\u{XX...}'</tt> embeds the UTF-8 encoding in string literals.</li>
<li>The argument table <tt>arg</tt> can be read (and modified) by <tt>LUA_INIT</tt> and <tt>-e</tt> chunks.</li>
<li><tt>io.read()</tt> and <tt>file:read()</tt> accept formats with or without a leading <tt>*</tt>.</li>
<li><tt>table.move(a1, f, e, t [,a2])</tt>.</li>
<li><tt>coroutine.isyieldable()</tt>.</li>
</ul>

<h2 id="exceptions">C++ Exception Interoperability</h2>
Expand Down Expand Up @@ -443,7 +448,7 @@ <h2 id="exceptions">C++ Exception Interoperability</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Frequently Asked Questions (FAQ)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -176,7 +176,7 @@ <h1>Frequently Asked Questions (FAQ)</h1>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
19 changes: 12 additions & 7 deletions third_party/luajit/luajit/doc/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Installation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -175,6 +175,14 @@ <h2>Configuring LuaJIT</h2>
Please read the instructions given in these files, before changing
any settings.
</p>
<p>
LuaJIT on x64 currently uses 32 bit GC objects by default.
<tt>LJ_GC64</tt> mode may be explicitly enabled:
add <tt>XCFLAGS=-DLUAJIT_ENABLE_GC64</tt> to the make command or run
<tt>msvcbuild gc64</tt> for MSVC/WinSDK. Please check the note
about the <a href="extensions.html#string_dump">bytecode format</a>
differences, too.
</p>

<h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2>
<h3>Prerequisites</h3>
Expand Down Expand Up @@ -584,14 +592,11 @@ <h2 id="embed">Embedding LuaJIT</h2>
</li>
<li>
If you're building a 64 bit application on OSX which links directly or
indirectly against LuaJIT, you need to link your main executable
with these flags:
indirectly against LuaJIT which is not built for <tt>LJ_GC64</tt> mode,
you need to link your main executable with these flags:
<pre class="code">
-pagezero_size 10000 -image_base 100000000
</pre>
Also, it's recommended to <tt>rebase</tt> all (self-compiled) shared libraries
which are loaded at runtime on OSX/x64 (e.g. C extension modules for Lua).
See: <tt>man rebase</tt>
</li>
</ul>
<p>Additional hints for initializing LuaJIT using the C API functions:</p>
Expand Down Expand Up @@ -677,7 +682,7 @@ <h2 id="distro">Hints for Distribution Maintainers</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
6 changes: 3 additions & 3 deletions third_party/luajit/luajit/doc/luajit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>LuaJIT</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -152,7 +152,7 @@ <h1>LuaJIT</h1>
It may be embedded or used as a general-purpose, stand-alone language.
</p>
<p>
LuaJIT is Copyright &copy; 2005-2016 Mike Pall, released under the
LuaJIT is Copyright &copy; 2005-2017 Mike Pall, released under the
<a href="http://www.opensource.org/licenses/mit-license.php"><span class="ext">&raquo;</span>&nbsp;MIT open source license</a>.
</p>
<p>
Expand Down Expand Up @@ -226,7 +226,7 @@ <h2>More ...</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/running.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Running LuaJIT</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -299,7 +299,7 @@ <h3 id="opt_O"><tt>-O[level]</tt><br>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
4 changes: 2 additions & 2 deletions third_party/luajit/luajit/doc/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2016, Mike Pall">
<meta name="Copyright" content="Copyright (C) 2005-2017, Mike Pall">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
Expand Down Expand Up @@ -113,7 +113,7 @@ <h2>Current Status</h2>
</div>
<div id="foot">
<hr class="hide">
Copyright &copy; 2005-2016 Mike Pall
Copyright &copy; 2005-2017 Mike Pall
<span class="noprint">
&middot;
<a href="contact.html">Contact</a>
Expand Down
Loading

0 comments on commit b0fcdf5

Please sign in to comment.