Commit Graph
77 Commits
Author SHA1 Message Date
Noa 85ca28094e Apply clippy suggestions to switch to let chains (#6126) 2025-09-04 15:34:10 +09:00
Jeong, YunWon 776cabb883 New Instruction ToBool,PopJumpIfFalse (#6112)
* New Instruction ToBool

* Rename JustIf{True,False} => PopJumpIf{...}
2025-08-26 16:12:14 +09:00
Jeong, YunWon 392f9c26c5 Instruction::Resume (#5944)
* ImportStar

* Instruction::Resume
2025-07-11 17:25:57 +09:00
Jeong, YunWon d40cbbb451 Fix cspell warning (#5890)
* Fix cspell warning

* cspell: -> spell-checker:
2025-07-03 12:04:43 +09:00
Noa 2c02e2776b Fix warnings for rust 1.87 2025-05-16 18:52:14 +09:00
Ashwin Naren 5c0f70c361 add instructions 2025-05-12 14:24:10 +09:00
Ashwin NarenandJeong YunWon 8063148598 Fix clippy lints from rust 1.86 update (#5665)
* handle rust 1.86 update

* fix windows clippy lint

* disable cspell under jit/instruction

---------

Co-authored-by: Jeong YunWon <jeong@youknowone.org>
2025-04-04 14:04:13 +09:00
+1 45c0fa0e77 Floating Point Power and While Loop JIT (#5614)
* Initial commit for power function

* Float power jit developed

* Addded support for Floats and Ints

* Integration Testing for JITPower implementation.

* Update instructions.rs

* Update int_tests.rs

* Update float_tests.rs

* Updated cranelift and power function to use magic bs

* Updated the compile_fpow accuracy

* updating while loop test

* Update instructions.rs

cranelift more like painlift

* Update instructions.rs

* Update instructions.rs

* initial commit for making stable PR ready features

* fixed final edge case for compile_ipow

* fixed final edge case for compile_ipow

* commenting out compile_ipow

* fixed spelling errors

* removed unused tests

* forgot to run clippy

* Cleaned the branch

* While loop implementation for Cranelift 0.116.1

* Floating Point

* Removed testing print statement

* Resolved some formatting

* Fixed cargo fmt warning

* Fixed int div and int exp issues

* Fixed formatting

---------

Co-authored-by: Nick <nick@Samanthas-MBP.wi.rr.com>
Co-authored-by: JoeLoparco <loparcojoseph@gmail.com>
Co-authored-by: Daniel O'Hear <149127239+dohear@users.noreply.github.com>
Co-authored-by: Joseph Loparco <149088810+JoeLoparco@users.noreply.github.com>
Co-authored-by: Nick <nick@pcp090057pcs.mu.edu>
Co-authored-by: dohear <daniel.ohear@marquette.edu>
Co-authored-by: Nathan Rusch <nathan.rusch@icloud.com>
Co-authored-by: Nick <nick@pcp093574pcs.mu.edu>
Co-authored-by: Joseph Loparco <--global loparcoJoseph@gmail.com>
Co-authored-by: Nick <nick@Samanthas-MacBook-Pro.local>
2025-03-19 13:50:42 -05:00
58ebf04bac Add JIT compilation support for integer multiplication, division, and exponents (#5561)
* Initial commit for power function

* Float power jit developed

* Addded support for Floats and Ints

* Integration Testing for JITPower implementation.

* Update instructions.rs

cranelift more like painlift

* Update instructions.rs

* Update instructions.rs

* initial commit for making stable PR ready features

* fixed final edge case for compile_ipow

* fixed final edge case for compile_ipow

* commenting out compile_ipow

* fixed spelling errors

* removed unused tests

* forgot to run clippy

---------

Co-authored-by: Nicholas Paulick <paulicknicholas@gmail.com>
Co-authored-by: Nick <nick@Samanthas-MBP.wi.rr.com>
Co-authored-by: JoeLoparco <loparcojoseph@gmail.com>
Co-authored-by: Nathan Rusch <nathan.rusch@icloud.com>
Co-authored-by: dohear <daniel.ohear@marquette.edu>
2025-03-05 14:41:45 -06:00
Noa 6daee1b00e Warn on elided_lifetimes_in_paths 2025-03-01 13:49:33 +09:00
Noa 864e8598f8 Enable rust2024-incompatible pat and keyword-ident lints 2025-02-25 00:32:02 -06:00
Noa 1c3b198a17 Enable unsafe_op_in_unsafe_fn lint 2025-02-24 21:25:23 -06:00
Shubham Patil 53db70e784 Support recursion in JIT-ed functions (#5473) 2025-01-13 14:55:27 +09:00
Myeongseon Choi ebde8546c9 remove elided lifetime 2024-11-29 11:05:44 +09:00
Jeong YunWon 019496e3a8 Instruction::ReturnConst 2024-05-09 15:26:16 +09:00
Jeong, YunWon 2c3dbb5eed Merge pull request #5081 from MannarAmuthan/bool-compare
Implemented compare operation for boolean types in JIT engine
2023-10-07 22:03:50 +09:00
Amuthan Mannar eb83b729b2 Formatted code files 2023-10-07 21:05:27 +09:00
Amuthan Mannar b9ee0b6b7a Implemented compare operation for boolean and int types 2023-10-07 21:05:27 +09:00
Amuthan Mannar f8365ca6c3 Implemented compare operation for boolean types in JIT engine 2023-10-07 21:05:27 +09:00
Amuthan Mannar c2f159b24a Formatted code files 2023-10-07 12:34:32 +05:30
Amuthan Mannar 54d5869457 Implement binary operations for integers and floating-point numbers, allowing mixed type calculations 2023-10-07 12:02:18 +05:30
Jeong YunWon dc569e9921 Refactoring 2023-05-10 19:35:27 +09:00
Noa 2861c874ed Switch from 64-bit instruction enum to out-of-line arg values 2023-01-12 23:05:17 -06:00
Tom Schuster 85233920e5 Support variable exchange (aka basic tuple support) 2022-12-18 17:56:40 +01:00
Tom Schuster 9e3f864410 JIT: add internal support for None 2022-11-17 11:02:16 +01:00
Tom Schuster 8f5ae4bd00 Use boolean_val helper for unary not. 2022-11-13 21:41:17 +01:00
Tom Schuster 634aca05a0 Make JitValue an enum
The duplication with JitType is a bit unfortunate, but this is a big
ergonomics improvement when working on the compiler itself.

This will also allows us to define types that are internal to the
compiler and shouldn't leak to other code via the JitType
2022-11-08 14:17:32 +01:00
Afonso Bordado 5705ff7a86 Implement a few more ops in the JIT 2022-11-06 10:31:01 +00:00
Afonso Bordado ab8faf39a7 Implement float comparisions in JIT 2022-11-05 10:08:43 +00:00
Afonso Bordado a91e15aaf4 Update JIT Cranelift version 2022-09-24 18:36:42 +01:00
Jeong YunWon fc6d614bf4 rustpython-bytecode -> rustpython-compiler-core 2022-08-22 08:42:20 +09:00
Jeong Yunwon 8c0be4b48f Fix nightly clippy warnings 2022-06-24 01:13:32 +09:00
Jeong Yunwon 7df0acd6b6 share comparisonop between bytecode and vm 2022-05-12 04:02:14 +09:00
Jeong Yunwon 53d835faa7 split comapre and richcompare instruction 2022-05-12 04:02:14 +09:00
Jeong Yunwon 6357a1acbe clean up imports and useless allow attributes 2022-04-15 23:58:20 +09:00
Jeong YunWon 9377134161 add #[non_exhaustive] 2022-01-22 20:22:58 +09:00
Noa 1188369956 Fix clippy warnings with 1.58 & convert some format strings to capture-args 2022-01-13 23:53:25 -06:00
Noa 358ce09b5c Run cargo upgrade 2021-10-30 19:42:35 -05:00
Noa 09e9ea91e7 TryFrom, TryInto, FromIterator are in prelude now 2021-10-21 17:04:19 -05:00
Jeong YunWon ff4efd0f60 Fix unnessessary borrow 2021-07-30 02:32:16 +09:00
jfh 0e33be9ce8 Please clippy 2021-06-18 21:24:46 +03:00
fanninpm cc6baeddd6 Allow clippy::unnecessary_wraps lint, and rename "to_js" to "into_js" (#2452)
* Allow clippy::unnecessary_wraps lint

* Change PyResultExt to_js signature

* Change "to_js" to "into_js"

* Refactor "to_js" to "into_js"

* Continue refactoring "to_js" to "into_js"

* Move clippy::unnecessary_wraps to lib.rs

* Add allowed lint to jit/lib.rs

* Add allowed lint to vm/src/lib.rs
2021-02-13 19:07:07 -06:00
Noah cbd229c754 Update cranelift deps 2021-01-08 18:47:54 -06:00
Noah a5d45124fd Update other stuff to use the root of rustpython_bytecode 2020-12-19 14:59:07 -06:00
Noah 5a56dd1a77 repr() functions with their names 2020-12-17 16:29:44 -06:00
Noah 090720ab34 Fix jit 2020-12-14 16:33:05 -06:00
Noah 057b5e8eda Fix jit 2020-12-14 14:25:20 -06:00
Noah 0fddb046dd Update cranelift dependencies 2020-12-05 16:36:37 -06:00
Noah 6c52c5c6d4 Update jit to use new instructions 2020-12-05 16:36:37 -06:00
Noah 8b0e806e39 Fix rustpython-jit to not use label_map 2020-11-23 20:10:46 -06:00