replace none with undef

This commit is contained in:
Yuichi Nishiwaki
2015-06-09 16:34:45 +09:00
parent 0cafbfdb0c
commit 5185a73cd2
21 changed files with 65 additions and 81 deletions
-7
View File
@@ -17,9 +17,6 @@
/** no dependency on libc */
/* #define PIC_ENABLE_LIBC 1 */
/** treat false value as none */
/* #define PIC_NONE_IS_FALSE 1 */
/** custom setjmp/longjmp */
/* #define PIC_JMPBUF jmp_buf */
/* #define PIC_SETJMP(pic, buf) setjmp(buf) */
@@ -96,10 +93,6 @@
# error cannot disable float support when nan boxing is on
#endif
#ifndef PIC_NONE_IS_FALSE
# define PIC_NONE_IS_FALSE 1
#endif
#ifndef PIC_JMPBUF
# include <setjmp.h>
# define PIC_JMPBUF jmp_buf
+4
View File
@@ -12,6 +12,7 @@ extern "C" {
enum pic_opcode {
OP_NOP,
OP_POP,
OP_PUSHUNDEF,
OP_PUSHNIL,
OP_PUSHTRUE,
OP_PUSHFALSE,
@@ -93,6 +94,9 @@ pic_dump_code(pic_code c)
case OP_POP:
puts("OP_POP");
break;
case OP_PUSHUNDEF:
puts("OP_PUSHUNDEF");
break;
case OP_PUSHNIL:
puts("OP_PUSHNIL");
break;
-11
View File
@@ -242,7 +242,6 @@ PIC_INLINE pic_value pic_float_value(double);
PIC_INLINE pic_value pic_int_value(int);
PIC_INLINE pic_value pic_size_value(size_t);
PIC_INLINE pic_value pic_char_value(char c);
PIC_INLINE pic_value pic_none_value();
PIC_INLINE bool pic_eq_p(pic_value, pic_value);
PIC_INLINE bool pic_eqv_p(pic_value, pic_value);
@@ -517,16 +516,6 @@ pic_invalid_value()
return v;
}
PIC_INLINE pic_value
pic_none_value()
{
#if PIC_NONE_IS_FALSE
return pic_false_value();
#else
# error enable PIC_NONE_IS_FALSE
#endif
}
#if PIC_NAN_BOXING || PIC_WORD_BOXING
PIC_INLINE bool