Skip to content

Commit

Permalink
Move operators into obj namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jianlingzhong committed Nov 30, 2024
1 parent 57e6ed5 commit 3dc71dd
Show file tree
Hide file tree
Showing 3 changed files with 440 additions and 436 deletions.
168 changes: 84 additions & 84 deletions compiler+runtime/include/cpp/jank/runtime/obj/ratio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,89 +51,89 @@ namespace jank::runtime
{
using ratio = static_object<object_type::ratio>;
using ratio_ptr = native_box<ratio>;
}

object_ptr operator+(obj::ratio_data l, obj::ratio_data r);
obj::ratio_ptr operator+(obj::integer_ptr l, obj::ratio_data r);
obj::ratio_ptr operator+(obj::ratio_data l, obj::integer_ptr r);
native_real operator+(obj::real_ptr l, obj::ratio_data r);
native_real operator+(obj::ratio_data l, obj::real_ptr r);
native_real operator+(obj::ratio_data l, native_real r);
native_real operator+(native_real l, obj::ratio_data r);
obj::ratio_ptr operator+(obj::ratio_data l, native_integer r);
obj::ratio_ptr operator+(native_integer l, obj::ratio_data r);
object_ptr operator-(obj::ratio_data l, obj::ratio_data r);
obj::ratio_ptr operator-(obj::integer_ptr l, obj::ratio_data r);
obj::ratio_ptr operator-(obj::ratio_data l, obj::integer_ptr r);
native_real operator-(obj::real_ptr l, obj::ratio_data r);
native_real operator-(obj::ratio_data l, obj::real_ptr r);
native_real operator-(obj::ratio_data l, native_real r);
native_real operator-(native_real l, obj::ratio_data r);
obj::ratio_ptr operator-(obj::ratio_data l, native_integer r);
obj::ratio_ptr operator-(native_integer l, obj::ratio_data r);
object_ptr operator*(obj::ratio_data l, obj::ratio_data r);
object_ptr operator*(obj::integer_ptr l, obj::ratio_data r);
object_ptr operator*(obj::ratio_data l, obj::integer_ptr r);
native_real operator*(obj::real_ptr l, obj::ratio_data r);
native_real operator*(obj::ratio_data l, obj::real_ptr r);
native_real operator*(obj::ratio_data l, native_real r);
native_real operator*(native_real l, obj::ratio_data r);
object_ptr operator*(obj::ratio_data l, native_integer r);
object_ptr operator*(native_integer l, obj::ratio_data r);
object_ptr operator/(obj::ratio_data l, obj::ratio_data r);
object_ptr operator/(obj::integer_ptr l, obj::ratio_data r);
obj::ratio_ptr operator/(obj::ratio_data l, obj::integer_ptr r);
native_real operator/(obj::real_ptr l, obj::ratio_data r);
native_real operator/(obj::ratio_data l, obj::real_ptr r);
native_real operator/(obj::ratio_data l, native_real r);
native_real operator/(native_real l, obj::ratio_data r);
obj::ratio_ptr operator/(obj::ratio_data l, native_integer r);
object_ptr operator/(native_integer l, obj::ratio_data r);
native_bool operator==(obj::ratio_data l, obj::ratio_data r);
native_bool operator==(obj::integer_ptr l, obj::ratio_data r);
native_bool operator==(obj::ratio_data l, obj::integer_ptr r);
native_bool operator==(obj::real_ptr l, obj::ratio_data r);
native_bool operator==(obj::ratio_data l, obj::real_ptr r);
native_bool operator==(obj::ratio_data l, native_real r);
native_bool operator==(native_real l, obj::ratio_data r);
native_bool operator==(obj::ratio_data l, native_integer r);
native_bool operator==(native_integer l, obj::ratio_data r);
native_bool operator<(obj::ratio_data l, obj::ratio_data r);
native_bool operator<(obj::integer_ptr l, obj::ratio_data r);
native_bool operator<(obj::ratio_data l, obj::integer_ptr r);
native_bool operator<(obj::real_ptr l, obj::ratio_data r);
native_bool operator<(obj::ratio_data l, obj::real_ptr r);
native_bool operator<(obj::ratio_data l, native_real r);
native_bool operator<(native_real l, obj::ratio_data r);
native_bool operator<(obj::ratio_data l, native_integer r);
native_bool operator<(native_integer l, obj::ratio_data r);
native_bool operator<(native_bool l, obj::ratio_data r);
native_bool operator<=(obj::ratio_data l, obj::ratio_data r);
native_bool operator<=(obj::integer_ptr l, obj::ratio_data r);
native_bool operator<=(obj::ratio_data l, obj::integer_ptr r);
native_bool operator<=(obj::real_ptr l, obj::ratio_data r);
native_bool operator<=(obj::ratio_data l, obj::real_ptr r);
native_bool operator<=(obj::ratio_data l, native_real r);
native_bool operator<=(native_real l, obj::ratio_data r);
native_bool operator<=(obj::ratio_data l, native_integer r);
native_bool operator<=(native_integer l, obj::ratio_data r);
native_bool operator>(obj::ratio_data l, obj::ratio_data r);
native_bool operator>(obj::integer_ptr l, obj::ratio_data r);
native_bool operator>(obj::ratio_data l, obj::integer_ptr r);
native_bool operator>(obj::real_ptr l, obj::ratio_data r);
native_bool operator>(obj::ratio_data l, obj::real_ptr r);
native_bool operator>(obj::ratio_data l, native_real r);
native_bool operator>(native_real l, obj::ratio_data r);
native_bool operator>(obj::ratio_data l, native_integer r);
native_bool operator>(native_integer l, obj::ratio_data r);
native_bool operator>(native_bool l, obj::ratio_data r);
native_bool operator>=(obj::ratio_data l, obj::ratio_data r);
native_bool operator>=(obj::integer_ptr l, obj::ratio_data r);
native_bool operator>=(obj::ratio_data l, obj::integer_ptr r);
native_bool operator>=(obj::real_ptr l, obj::ratio_data r);
native_bool operator>=(obj::ratio_data l, obj::real_ptr r);
native_bool operator>=(obj::ratio_data l, native_real r);
native_bool operator>=(native_real l, obj::ratio_data r);
native_bool operator>=(obj::ratio_data l, native_integer r);
native_bool operator>=(native_integer l, obj::ratio_data r);
object_ptr operator+(obj::ratio_data const &l, obj::ratio_data const &r);
obj::ratio_ptr operator+(obj::integer_ptr l, obj::ratio_data const &r);
obj::ratio_ptr operator+(obj::ratio_data const &l, obj::integer_ptr r);
native_real operator+(obj::real_ptr l, obj::ratio_data const &r);
native_real operator+(obj::ratio_data const &l, obj::real_ptr r);
native_real operator+(obj::ratio_data const &l, native_real r);
native_real operator+(native_real l, obj::ratio_data const &r);
obj::ratio_ptr operator+(obj::ratio_data const &l, native_integer r);
obj::ratio_ptr operator+(native_integer l, obj::ratio_data const &r);
object_ptr operator-(obj::ratio_data const &l, obj::ratio_data const &r);
obj::ratio_ptr operator-(obj::integer_ptr l, obj::ratio_data const &r);
obj::ratio_ptr operator-(obj::ratio_data const &l, obj::integer_ptr r);
native_real operator-(obj::real_ptr l, obj::ratio_data const &r);
native_real operator-(obj::ratio_data const &l, obj::real_ptr r);
native_real operator-(obj::ratio_data const &l, native_real r);
native_real operator-(native_real l, obj::ratio_data const &r);
obj::ratio_ptr operator-(obj::ratio_data const &l, native_integer r);
obj::ratio_ptr operator-(native_integer l, obj::ratio_data const &r);
object_ptr operator*(obj::ratio_data const &l, obj::ratio_data const &r);
object_ptr operator*(obj::integer_ptr l, obj::ratio_data const &r);
object_ptr operator*(obj::ratio_data const &l, obj::integer_ptr r);
native_real operator*(obj::real_ptr l, obj::ratio_data const &r);
native_real operator*(obj::ratio_data const &l, obj::real_ptr r);
native_real operator*(obj::ratio_data const &l, native_real r);
native_real operator*(native_real l, obj::ratio_data const &r);
object_ptr operator*(obj::ratio_data const &l, native_integer r);
object_ptr operator*(native_integer l, obj::ratio_data const &r);
object_ptr operator/(obj::ratio_data const &l, obj::ratio_data const &r);
object_ptr operator/(obj::integer_ptr l, obj::ratio_data const &r);
obj::ratio_ptr operator/(obj::ratio_data const &l, obj::integer_ptr r);
native_real operator/(obj::real_ptr l, obj::ratio_data const &r);
native_real operator/(obj::ratio_data const &l, obj::real_ptr r);
native_real operator/(obj::ratio_data const &l, native_real r);
native_real operator/(native_real l, obj::ratio_data const &r);
obj::ratio_ptr operator/(obj::ratio_data const &l, native_integer r);
object_ptr operator/(native_integer l, obj::ratio_data const &r);
native_bool operator==(obj::ratio_data const &l, obj::ratio_data const &r);
native_bool operator==(obj::integer_ptr l, obj::ratio_data const &r);
native_bool operator==(obj::ratio_data const &l, obj::integer_ptr r);
native_bool operator==(obj::real_ptr l, obj::ratio_data const &r);
native_bool operator==(obj::ratio_data const &l, obj::real_ptr r);
native_bool operator==(obj::ratio_data const &l, native_real r);
native_bool operator==(native_real l, obj::ratio_data const &r);
native_bool operator==(obj::ratio_data const &l, native_integer r);
native_bool operator==(native_integer l, obj::ratio_data const &r);
native_bool operator<(obj::ratio_data const &l, obj::ratio_data const &r);
native_bool operator<(obj::integer_ptr l, obj::ratio_data const &r);
native_bool operator<(obj::ratio_data const &l, obj::integer_ptr r);
native_bool operator<(obj::real_ptr l, obj::ratio_data const &r);
native_bool operator<(obj::ratio_data const &l, obj::real_ptr r);
native_bool operator<(obj::ratio_data const &l, native_real r);
native_bool operator<(native_real l, obj::ratio_data const &r);
native_bool operator<(obj::ratio_data const &l, native_integer r);
native_bool operator<(native_integer l, obj::ratio_data const &r);
native_bool operator<(native_bool l, obj::ratio_data const &r);
native_bool operator<=(obj::ratio_data const &l, obj::ratio_data const &r);
native_bool operator<=(obj::integer_ptr l, obj::ratio_data const &r);
native_bool operator<=(obj::ratio_data const &l, obj::integer_ptr r);
native_bool operator<=(obj::real_ptr l, obj::ratio_data const &r);
native_bool operator<=(obj::ratio_data const &l, obj::real_ptr r);
native_bool operator<=(obj::ratio_data const &l, native_real r);
native_bool operator<=(native_real l, obj::ratio_data const &r);
native_bool operator<=(obj::ratio_data const &l, native_integer r);
native_bool operator<=(native_integer l, obj::ratio_data const &r);
native_bool operator>(obj::ratio_data const &l, obj::ratio_data const &r);
native_bool operator>(obj::integer_ptr l, obj::ratio_data const &r);
native_bool operator>(obj::ratio_data const &l, obj::integer_ptr r);
native_bool operator>(obj::real_ptr l, obj::ratio_data const &r);
native_bool operator>(obj::ratio_data const &l, obj::real_ptr r);
native_bool operator>(obj::ratio_data const &l, native_real r);
native_bool operator>(native_real l, obj::ratio_data const &r);
native_bool operator>(obj::ratio_data const &l, native_integer r);
native_bool operator>(native_integer l, obj::ratio_data const &r);
native_bool operator>(native_bool l, obj::ratio_data const &r);
native_bool operator>=(obj::ratio_data const &l, obj::ratio_data const &r);
native_bool operator>=(obj::integer_ptr l, obj::ratio_data const &r);
native_bool operator>=(obj::ratio_data const &l, obj::integer_ptr r);
native_bool operator>=(obj::real_ptr l, obj::ratio_data const &r);
native_bool operator>=(obj::ratio_data const &l, obj::real_ptr r);
native_bool operator>=(obj::ratio_data const &l, native_real r);
native_bool operator>=(native_real l, obj::ratio_data const &r);
native_bool operator>=(obj::ratio_data const &l, native_integer r);
native_bool operator>=(native_integer l, obj::ratio_data const &r);
}
}
Loading

0 comments on commit 3dc71dd

Please sign in to comment.