Author: jrieks
Date: Fri Apr 15 04:58:19 2005
New Revision: 7842
Modified:
trunk/ops/object.ops
trunk/src/objects.c
Log:
fail early, fail loud
Modified: trunk/ops/object.ops
==============================================================================
--- trunk/ops/object.ops (original)
+++ trunk/ops/object.ops Fri Apr 15 04:58:19 2005
@@ -108,6 +108,8 @@
REG_PMC(1) = new_ret_continuation_pmc(interpreter, next);
interpreter->ctx.current_object = object = REG_PMC(2);
interpreter->ctx.current_method = meth;
+ assert(!PMC_IS_NULL(object));
+ assert(meth!=0);
method_pmc = VTABLE_find_method(interpreter, object, meth);
if (!method_pmc) {
real_exception(interpreter, next, METH_NOT_FOUND,
Modified: trunk/src/objects.c
==============================================================================
--- trunk/src/objects.c (original)
+++ trunk/src/objects.c Fri Apr 15 04:58:19 2005
@@ -1046,6 +1046,8 @@
UINTVAL bits, i;
Meth_cache_entry *e, *old;
+ assert(method_name != 0);
+
#if DISABLE_METH_CACHE
return find_method_direct(interpreter, class, method_name);
#endif