Daniele Bartolini 7 лет назад
Родитель
Сommit
03aec94f8d
2 измененных файлов с 0 добавлено и 29 удалено
  1. 0 23
      src/resource/expression_language.cpp
  2. 0 6
      src/resource/expression_language.h

+ 0 - 23
src/resource/expression_language.cpp

@@ -29,9 +29,6 @@ namespace expression_language
 	/// Returns the id part of the byte code word.
 	/// Returns the id part of the byte code word.
 	static inline unsigned id_mask(unsigned i) {return i & 0x000fffff;}
 	static inline unsigned id_mask(unsigned i) {return i & 0x000fffff;}
 
 
-	/// Returns true if the byte code word is a BC_PUSH_FLOAT operation.
-	static inline bool is_bc_push_float(unsigned i) {return (i & 0x7f80000) != 0x7f8;}
-
 	/// Opcodes for functions
 	/// Opcodes for functions
 	enum OpCode
 	enum OpCode
 	{
 	{
@@ -457,26 +454,6 @@ namespace expression_language
 
 
 	#endif // CAN_COMPILE
 	#endif // CAN_COMPILE
 
 
-	bool is_constant(const unsigned *byte_code)
-	{
-		unsigned bc = *byte_code++;
-		if (!is_bc_push_float(bc))
-			return false;
-		bc = *byte_code;
-		return bc_mask(bc) == BC_END;
-	}
-
-	float constant_value(const unsigned *byte_code)
-	{
-		unsigned bc = *byte_code;
-		if (is_bc_push_float(bc))
-			return unsigned_to_float(bc);
-		else {
-			CE_FATAL("Not a static expression");
-			return 0;
-		}
-	}
-
 	bool run(const unsigned *byte_code, const float *variables, Stack &stack)
 	bool run(const unsigned *byte_code, const float *variables, Stack &stack)
 	{
 	{
 		const unsigned *p = byte_code;
 		const unsigned *p = byte_code;

+ 0 - 6
src/resource/expression_language.h

@@ -58,12 +58,6 @@ namespace expression_language
 			);
 			);
 #endif
 #endif
 
 
-	/// Returns true if the byte code is constant. I. e., it always produces the same float value.
-	bool is_constant(const unsigned *byte_code);
-
-	/// Returns the constant value produced by the byte code.
-	float constant_value(const unsigned *byte_code);
-
 	/// Represents the working stack.
 	/// Represents the working stack.
 	struct Stack
 	struct Stack
 	{
 	{