mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	Use one tag type true and false
We moved the literals true and false into one tag type, so we an extra tag for raw pointer types (light userdata). These can be used from the C API via janet_wrap_pointer and janet_unwrap_pointer.
This commit is contained in:
		| @@ -78,11 +78,9 @@ static void janetc_loadconst(JanetCompiler *c, Janet k, int32_t reg) { | ||||
|         case JANET_NIL: | ||||
|             janetc_emit(c, (reg << 8) | JOP_LOAD_NIL); | ||||
|             break; | ||||
|         case JANET_TRUE: | ||||
|             janetc_emit(c, (reg << 8) | JOP_LOAD_TRUE); | ||||
|             break; | ||||
|         case JANET_FALSE: | ||||
|             janetc_emit(c, (reg << 8) | JOP_LOAD_FALSE); | ||||
|         case JANET_BOOLEAN: | ||||
|             janetc_emit(c, (reg << 8) | | ||||
|                         (janet_unwrap_boolean(k) ? JOP_LOAD_TRUE : JOP_LOAD_FALSE)); | ||||
|             break; | ||||
|         case JANET_NUMBER: { | ||||
|             double dval = janet_unwrap_number(k); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose