summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def19
1 files changed, 15 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index f7716bfe15..48d1275b35 100644
--- a/insns.def
+++ b/insns.def
@@ -1237,10 +1237,7 @@ opt_case_dispatch
(..., VALUE key)
() // inc += -1;
{
- if (0) {
- /* TODO: if some === method is overrided */
- }
- else {
+ if (BASIC_OP_UNREDEFINED_P(BOP_EQQ)) {
VALUE val;
if (st_lookup(RHASH_TBL(hash), key, &val)) {
JUMP(FIX2INT(val));
@@ -1249,6 +1246,20 @@ opt_case_dispatch
JUMP(else_offset);
}
}
+ else {
+ struct opt_case_dispatch_i_arg arg = {
+ key, -1
+ };
+
+ st_foreach(RHASH_TBL(hash), opt_case_dispatch_i, &arg);
+
+ if (arg.label != -1) {
+ JUMP(arg.label);
+ }
+ else {
+ JUMP(else_offset);
+ }
+ }
}
/**