Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: src/ic.cc

Issue 170203003: Use ComputeHandlerFlags to find handlers, rather than manually encoding. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Move type handling into lookup Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698