Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index bd06cb6f9617d5bcf435673cbf507ae91eeedc97..37fda27779e705b0af831dd1ba3578ec0831018e 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -839,8 +839,17 @@ Handle<Code> IC::ComputeHandler(LookupResult* lookup, |
isolate(), *object, cache_holder)); |
Handle<Code> code = isolate()->stub_cache()->FindHandler( |
- name, handle(stub_holder->map()), kind(), cache_holder); |
- if (!code.is_null()) return code; |
+ name, handle(stub_holder->map()), kind(), cache_holder, |
+ lookup->IsNormal() ? Code::NORMAL : Code::FAST); |
+ if (!code.is_null()) { |
+#ifdef DEBUG |
+ Handle<Code> compiled = CompileHandler( |
+ lookup, object, name, value, cache_holder); |
+ ASSERT(compiled->major_key() == code->major_key()); |
+ ASSERT(compiled->flags() == code->flags()); |
+#endif |
+ return code; |
+ } |
code = CompileHandler(lookup, object, name, value, cache_holder); |
ASSERT(code->is_handler()); |