Author: leo
Date: Thu Mar 9 14:14:32 2006
New Revision: 11841
Modified:
trunk/src/ops/object.ops
Log:
OO - simplify classname opcode
* with have vtable's don't we? just call it, and it works
Modified: trunk/src/ops/object.ops
==============================================================================
--- trunk/src/ops/object.ops (original)
+++ trunk/src/ops/object.ops Thu Mar 9 14:14:32 2006
@@ -319,22 +319,8 @@
=cut
inline op classname(out STR, in PMC) :object_base {
- PMC* classname_pmc;
- opcode_t *next = expr NEXT();
-
- if (!(PObj_get_FLAGS($2) & (PObj_is_class_FLAG|PObj_is_object_FLAG))) {
$1 = VTABLE_name(interpreter, $2);
- }
- else {
- classname_pmc = get_attrib_num((Buffer *)PMC_data($2), PCD_CLASS_NAME);
- if (classname_pmc) {
- $1 = VTABLE_get_string(interpreter, classname_pmc);
- }
- else {
- real_exception(interpreter, next, NO_CLASS, "Class doesn't exist");
- }
- }
- goto ADDRESS(next);
+ goto NEXT();
}