Browse Source

Emit the check for null only if the value to check is nint constant != 0 in


			
			
				cache-refactoring
			
			
		
Klaus Treichel 17 years ago
parent
commit
1e274b6593
  1. 3
      ChangeLog
  2. 5
      jit/jit-insn.c

3
ChangeLog

@ -4,6 +4,9 @@
register inhibited regardless if the value was already in the
register or not.
* jit/jit-insn.c (jit_insn_check_null): Emit the check only if the
value to check is no nint constant != 0.
2008-04-22 Aleksey Demakov <ademakov@gmail.com>
* configure.in: update to modern autoconf, rename to configure.ac.

5
jit/jit-insn.c

@ -1850,6 +1850,11 @@ int jit_insn_check_null(jit_function_t func, jit_value_t value)
{
return 0;
}
/* Do the check only if the value is no not Null constant */
if(value->is_nint_constant && (value->address != 0))
{
return 1;
}
func->builder->may_throw = 1;
return create_unary_note(func, JIT_OP_CHECK_NULL, value);
}

Loading…
Cancel
Save