K. Lange
72b59b7972
Use stable loop power calculation
2024-03-19 10:02:14 +09:00
K. Lange
179b4e456a
Fix passing keyword args to sorted()
2024-03-13 16:34:07 +09:00
K. Lange
bd2e22ddcc
time.h include missing after callgrind removal
2024-03-12 07:38:51 +09:00
K. Lange
9f370f0bc6
Cleanups for callgrind tool
2024-03-07 22:16:00 +09:00
K. Lange
2ed41a0fb0
Immortalize '__main__'
2024-03-07 17:15:56 +09:00
K. Lange
5345006580
Add help text and -q options
2024-03-07 07:23:21 +09:00
K. Lange
3e6632807a
New callgrind and watchdog tools
2024-03-06 20:16:48 +09:00
K. Lange
0eaa455fbe
Remove callgrind generation from VM
2024-03-06 16:38:23 +09:00
K. Lange
6b134d11ff
Ignore leading and trailing whitespace when parsing floats
2024-03-06 09:50:43 +09:00
K. Lange
c865e0dc78
Fix oops in str.__repr__, how did tests not catch that
2024-03-06 09:47:07 +09:00
K. Lange
66d81336ad
Accept NO_COLOR to disable graying repl response values
...
Closes #44
2024-03-05 22:08:56 +09:00
K. Lange
ef2b18f1bf
Allow themes to be disabled in rline
...
This still outputs ANSI color escapes, they're just always for color 9,
which is the default color for the foreground or background. rline will
always output escapes, as it's fundamentally part of how it works. If
you don't want ANSI escapes, disable rline.
2024-03-05 22:07:37 +09:00
K. Lange
7acf2cd528
Clean up str.__repr__ for small generated code
2024-03-05 18:40:36 +09:00
K. Lange
2b5df70d5a
Fix up linger direct use of hasKw in long_to_bytes
2024-03-05 18:40:21 +09:00
K. Lange
dcd1fafc85
Add tool to generate huge source with overlong jumps
2024-03-05 14:45:42 +09:00
K. Lange
84203501a5
Add simple reverse sort test
2024-03-05 14:43:57 +09:00
K. Lange
34f8515d44
Add sort stability test
2024-03-05 14:39:23 +09:00
K. Lange
d9398f1eff
Use string builder for repl results
2024-03-05 14:38:33 +09:00
K. Lange
9d5c9200e8
Simplify some container __repr__ implementations with %R
2024-03-05 14:38:12 +09:00
K. Lange
3e8bb098ff
Raise exception if __repr__ returns non-str in pushStringBuilderFormat
2024-03-05 14:21:49 +09:00
K. Lange
6c41c32949
Implement naive powersort
2024-03-05 12:44:01 +09:00
K. Lange
62822051a9
Account for overlongjump tables in size of codeobject
2024-03-05 08:36:35 +09:00
K. Lange
4bd5988e31
Rearrange class compilation for cleaner line number mappings
2024-03-04 21:40:43 +09:00
K. Lange
5949a4998e
Add PUSH_BUILD_CLASS opcode
2024-03-04 12:55:15 +09:00
K. Lange
dae53fadc4
Remove extraneous jump from tail of if without else
2024-03-04 09:58:16 +09:00
K. Lange
b1d3b7e697
Handle jump targets of over-long jumps
2024-03-04 09:51:54 +09:00
K. Lange
0bd12bdf0a
Support overly-long jumps with new instruction
2024-03-03 22:18:15 +09:00
K. Lange
272d503055
Use scratch space while swapping instead of push/pop
2024-03-03 22:17:21 +09:00
K. Lange
f33cc7cac2
Has this always been wrong?
2024-03-03 22:16:03 +09:00
K. Lange
864cda1bed
Cache jump targets in a hash/set
2024-03-03 22:10:07 +09:00
K. Lange
1928fa6b0c
Compute line numbers through binary search, not linear scan
2024-03-03 12:11:42 +09:00
K. Lange
e801ca642e
Implement list.sort with a 3-way quicksort
...
This is a temporary measure until a better (stable) sort is implemented,
like Timsort or powersort.
2024-03-02 21:31:49 +09:00
K. Lange
edbf322a6f
Clean up sorted(), reversed(); pass kwargs to list.sort for sorted()
2024-03-02 21:30:09 +09:00
K. Lange
ea55152aac
Fix two instances of OBJECT_VAL called on non-object
2024-03-02 12:37:33 +09:00
K. Lange
158f660695
Fix a few uses of legacy hasKw checks
2024-03-02 12:30:55 +09:00
K. Lange
294bd0376b
Move some special method names to the special method name table
2024-03-02 12:20:58 +09:00
K. Lange
0918776d00
Don't use FLUSH when switching modes in rline
2024-03-01 20:36:37 +09:00
K. Lange
47500c833f
Add rudimentary locale module
2024-03-01 10:12:54 +09:00
K. Lange
837e389b4c
Bump alpha number
2024-03-01 07:48:10 +09:00
K. Lange
1fadea3027
Implement float.as_integer_ratio
2024-02-29 13:19:08 +09:00
K. Lange
b9332b2578
Implement long.__pow__ for negative exponents
2024-02-29 13:00:19 +09:00
K. Lange
f6c1bfac59
Add some test cases for printing and parsing floats
2024-02-29 10:42:35 +09:00
K. Lange
ed34101ba3
Finish up overflow handling and expand comments
2024-02-29 10:35:12 +09:00
K. Lange
21f0828424
Fix bug in krk_long_medium for negative widths
2024-02-29 10:08:03 +09:00
K. Lange
191515bbc3
Support exponential notation in lexer
2024-02-29 00:29:59 +09:00
K. Lange
34a6e30769
Use new float parser instead of strtod
2024-02-29 00:29:22 +09:00
K. Lange
ce6ddec02d
Add simple float parser
2024-02-29 00:26:44 +09:00
K. Lange
cfe34614da
Hopefully more correct rounding in long.__truediv__?
2024-02-28 20:56:26 +09:00
K. Lange
55debe7570
Fast long shifts
2024-02-28 19:13:12 +09:00
K. Lange
a36f6e00eb
Remove unused 'exact' parameter.
2024-02-28 18:01:57 +09:00