Jeong Yunwon
52cce3f048
get_unchecked when compiler cannot guess boundary-safety
2022-05-18 10:38:47 +09:00
Jeong Yunwon
855ab4b4e9
DictInner::indices: Vec<i64> => Vec<IndexEntry>
2022-05-18 10:38:47 +09:00
Jeong Yunwon
0652485436
Remove DictInner::next_new_entry_idx
2022-05-18 10:38:47 +09:00
Jeong Yunwon
15a8f6fd1a
remove last in loop in DictInner::pop_back
2022-05-18 10:38:47 +09:00
Jeong Yunwon
a927814d6b
assertion for Option<DictEntry> size
2022-05-18 10:38:47 +09:00
Jeong YunWon
aa100841a7
Merge pull request #3711 from youknowone/pyexact
...
PyExact as counterpart of PyRefExact
2022-05-18 10:22:10 +09:00
Jeong YunWon
c6a66be55d
Merge pull request #3716 from youknowone/to-pyexc
...
PyResult<T, E> instead of PyResult<T>
2022-05-18 06:55:31 +09:00
Jeong Yunwon
f15c51bb8d
clean up socket based on ToPyException
2022-05-18 06:03:03 +09:00
Jeong Yunwon
c2dd4877b0
PyResult<T, E>
2022-05-18 04:54:12 +09:00
dennis zhuang
6343332e27
Fixed int.real, int.numerator etc. returns wrong value when it's int type. ( #3715 )
2022-05-17 21:20:37 +09:00
Jeong YunWon
b4b1e26e5b
Merge pull request #3714 from youknowone/cut_attr
...
cut get_attr not to inline its bloated body but allow optionally
2022-05-17 11:04:42 +09:00
Jeong Yunwon
9763d8bdf7
cut get_attr not to inline its bloated body but allow optionally
2022-05-17 09:18:18 +09:00
Jeong YunWon
bf7d376215
Merge pull request #3712 from youknowone/pyfunctionref
...
Remove PyFunctionRef
2022-05-17 09:03:03 +09:00
Jeong Yunwon
cce206c41f
adapt PyExact
2022-05-17 08:28:00 +09:00
Jeong Yunwon
6d3589d245
adapt PyExact To DictKey
2022-05-17 08:28:00 +09:00
Jeong Yunwon
be81dd0923
PyExact as counterpart of PyExactRef
2022-05-17 08:28:00 +09:00
Jeong Yunwon
239f92f9af
Remove PyFunctionRef
2022-05-17 08:24:15 +09:00
Jeong YunWon
e809158e83
Merge pull request #3709 from youknowone/pystr-interned
...
introduce PyStrInterned
2022-05-17 06:53:01 +09:00
Jeong YunWon
44ccc4015f
Merge pull request #3710 from youknowone/fix-hash
...
Fix lcg_random overflow
2022-05-17 06:19:04 +09:00
Jeong Yunwon
6e571946a0
introduce PyStrInterned
2022-05-17 06:16:35 +09:00
Jeong Yunwon
cbeeb51cee
Fix lcg_random overflow
2022-05-17 05:53:42 +09:00
Jeong YunWon
9fd4f7bab9
Merge pull request #3708 from youknowone/dictkey
...
Refactor dictkey
2022-05-16 18:58:04 +09:00
Jeong Yunwon
c6b33aab02
Refactor DictKey - remove PyStrRef
2022-05-16 18:14:19 +09:00
Jeong Yunwon
8a2cd2ba08
Refactor DictKey - Remove &PyObject / PyObjectRef
2022-05-16 18:14:19 +09:00
Jeong Yunwon
f335d60657
add Py<PyStr>
2022-05-16 18:14:19 +09:00
Jeong Yunwon
709a2c8698
fix intern
2022-05-16 18:14:19 +09:00
Jeong YunWon
3bc8895efb
Merge pull request #3705 from Snowapril/fix-3704
...
Add missing emits for empty statement body in `compile_program_single`
2022-05-16 18:13:03 +09:00
snowapril
689c0b6c5b
Add missing codes for empty statement body
...
Fix #3704
Compared to previous version of `compile_program_single`, below two
codes are skipped when an empty body is given.
```rust
self.emit_constant(ConstantData::None);
self.emit(Instruction::ReturnValue);
```
Signed-off-by: snowapril <sinjihng@gmail.com >
2022-05-16 11:51:49 +09:00
Jeong YunWon
2e1ed81d8e
Merge pull request #3707 from youknowone/frozen-lazy
...
Clean up CodeObject, Constant and PyCode
2022-05-16 07:10:04 +09:00
Jeong Yunwon
e67662d9e7
PyConstant -> Literal
2022-05-16 05:45:49 +09:00
Jeong Yunwon
b0e65d1a65
ToObject for CodeObject(s) & Replace PyRef::new_ref with ctx.new_code
2022-05-16 05:37:53 +09:00
Jeong Yunwon
a2a18f25b8
Fix make_frozen to return PyRef<PyCode>
2022-05-16 05:36:42 +09:00
Jeong Yunwon
75f606abfc
reduce Location size to practical small one
2022-05-16 05:15:56 +09:00
Jeong Yunwon
d446a5ad18
Bag as Copy
2022-05-16 05:08:45 +09:00
Jeong Yunwon
00a1af9e15
Remove Constant::make_name
2022-05-16 05:00:34 +09:00
Jeong Yunwon
b2c9b3ce90
Remove Constant::map_constant
2022-05-16 04:50:54 +09:00
Jeong Yunwon
abe644bd72
remove make_constant_borrowed
2022-05-16 04:46:37 +09:00
Jeong Yunwon
ec7a709bf2
Remove Constant::into_data
2022-05-16 04:46:35 +09:00
Jeong Yunwon
f6218bb9e5
No generic FrozenModule. Map names lazy
2022-05-16 04:45:14 +09:00
Jeong Yunwon
93d1438345
PyObjBag refers Context instead of vm
2022-05-16 04:45:13 +09:00
Jeong YunWon
d80e64db18
Merge pull request #3706 from youknowone/strtools
...
more str AsRef<str>
2022-05-16 04:01:25 +09:00
Jeong Yunwon
ad7c966310
more str tools
2022-05-16 02:03:22 +09:00
Jeong YunWon
95cd2f926b
Merge pull request #3703 from killme2008/feat/issue-3702
...
PyStr::mul optimization for i=0 or str=''
2022-05-15 16:15:45 +09:00
Dennis Zhuang
7cb391e140
Repalce all PyStr::from().into_ref(vm) with vm.ctx.empty_str
2022-05-14 21:45:55 +08:00
Dennis Zhuang
eba6833096
PyStr::mul optimization for i=0 or str=''
2022-05-14 21:38:23 +08:00
Jeong YunWon
b5b07385a7
Merge pull request #3699 from youknowone/slot-del-cold
...
call_slot_del is cold
2022-05-12 18:38:20 +09:00
Jeong YunWon
543360da57
Merge pull request #3698 from youknowone/cmp
...
Improve comparison ops performance
2022-05-12 18:36:02 +09:00
Noa
cb86d357c4
Merge pull request #3697 from youknowone/drain
...
drain with open range
2022-05-12 02:12:56 -05:00
Jeong Yunwon
e76d79e725
call_slot_del is cold
2022-05-12 04:39:07 +09:00
Jeong Yunwon
40bc8f0016
move microbenchmark strings.py to proper directory
2022-05-12 04:21:40 +09:00