mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Remove ==, not==, and order[<,<=,>,>=].
This unifies equality and comparison checking. Before, we had separate functions and vm opcodes for comparing general values vs. for comparing numbers, where the numberic functions were polymorphic and had special cases for handling NaNs. By unfiying them, abstract types can now better integrate with other number types and behave as keys. For now, the old functions are aliased but will eventually be removed.
This commit is contained in:
		| @@ -77,14 +77,12 @@ static const JanetInstructionDef janet_ops[] = { | ||||
|     {"divim", JOP_DIVIDE_IMMEDIATE}, | ||||
|     {"eq", JOP_EQUALS}, | ||||
|     {"eqim", JOP_EQUALS_IMMEDIATE}, | ||||
|     {"eqn", JOP_NUMERIC_EQUAL}, | ||||
|     {"err", JOP_ERROR}, | ||||
|     {"get", JOP_GET}, | ||||
|     {"geti", JOP_GET_INDEX}, | ||||
|     {"gt", JOP_GREATER_THAN}, | ||||
|     {"gten", JOP_NUMERIC_GREATER_THAN_EQUAL}, | ||||
|     {"gte", JOP_GREATER_THAN_EQUAL}, | ||||
|     {"gtim", JOP_GREATER_THAN_IMMEDIATE}, | ||||
|     {"gtn", JOP_NUMERIC_GREATER_THAN}, | ||||
|     {"in", JOP_IN}, | ||||
|     {"jmp", JOP_JUMP}, | ||||
|     {"jmpif", JOP_JUMP_IF}, | ||||
| @@ -98,9 +96,8 @@ static const JanetInstructionDef janet_ops[] = { | ||||
|     {"ldu", JOP_LOAD_UPVALUE}, | ||||
|     {"len", JOP_LENGTH}, | ||||
|     {"lt", JOP_LESS_THAN}, | ||||
|     {"lten", JOP_NUMERIC_LESS_THAN_EQUAL}, | ||||
|     {"lte", JOP_LESS_THAN_EQUAL}, | ||||
|     {"ltim", JOP_LESS_THAN_IMMEDIATE}, | ||||
|     {"ltn", JOP_NUMERIC_LESS_THAN}, | ||||
|     {"mkarr", JOP_MAKE_ARRAY}, | ||||
|     {"mkbtp", JOP_MAKE_BRACKET_TUPLE}, | ||||
|     {"mkbuf", JOP_MAKE_BUFFER}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose