Commit a8ac40c3 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Inline boxBool more

parent d9709d1d
......@@ -31,18 +31,6 @@ extern "C" inline Box* boxComplex(double r, double i) {
return new BoxedComplex(r, i);
}
extern "C" inline Box* boxBool(bool b) __attribute__((visibility("default")));
extern "C" inline Box* boxBool(bool b) {
Box* rtn = b ? True : False;
return rtn;
}
extern "C" inline Box* boxBoolNegated(bool b) __attribute__((visibility("default")));
extern "C" inline Box* boxBoolNegated(bool b) {
Box* rtn = b ? False : True;
return rtn;
}
extern "C" inline bool unboxBool(Box* b) __attribute__((visibility("default")));
extern "C" inline bool unboxBool(Box* b) {
assert(b->cls == bool_cls);
......
......@@ -134,8 +134,14 @@ extern "C" {
extern BoxedModule* sys_module, *builtins_module, *math_module, *time_module, *thread_module;
}
extern "C" Box* boxBool(bool);
extern "C" Box* boxBoolNegated(bool);
extern "C" inline Box* boxBool(bool b) __attribute__((visibility("default")));
extern "C" inline Box* boxBool(bool b) {
return b ? True : False;
}
extern "C" inline Box* boxBoolNegated(bool b) __attribute__((visibility("default")));
extern "C" inline Box* boxBoolNegated(bool b) {
return b ? False : True;
}
extern "C" Box* boxInt(i64) __attribute__((visibility("default")));
extern "C" i64 unboxInt(Box*);
extern "C" Box* boxFloat(double d);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment