-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbug_20170921.txt
43 lines (35 loc) · 1.1 KB
/
bug_20170921.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(1) for performance
see https://gitee.com/weimingtom/lua-5.1.4_profile/blob/master/Lua/src/lcode.cs
public static InstructionPtr Assign(InstructionPtr ptr)
{
if (ptr == null) return null;
return new InstructionPtr(ptr.codes, ptr.pc);
}
-->
public static void Assign(InstructionPtr ptr, ref InstructionPtr target)
{
if (ptr == null) {target = null; return;}
if (target == null) {target = new InstructionPtr(ptr.codes, ptr.pc); return;}
target.codes = ptr.codes; target.pc = ptr.pc;
}
----------------------
(y) lua-5.1.4
(y) lua-5.1.5
(y) lua-5.2.0-2007 <---------------only 5 changes (from here below)
(y) lua-5.2.0-20071029
(y) lua-5.2.0-2008
(y) lua-5.2.0-2009
(y) lua-5.2.0-20090702 <---------------no changes (???no use InstructionPtr.Assign())
(y) lua-5.2.0-20100206
(y) lua-5.2.0-alpha
(y) lua-5.2.0-beta
(y) lua-5.2.0
----------------------
L.savedpc = InstructionPtr.Assign(pc);
->
InstructionPtr.Assign(pc, ref L.savedpc);
-------------
hidden bug:(maybe not fixed)
from lua-5.2.0-20090702, not used InstructionPtr.Assign()
for example:
oci.u.l.savedpc = nci.u.l.savedpc;