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

Unified Diff: src/objects.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 | « src/ic.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9ecbe6a157c560f15ec91d1ae1a14e50aecd0574..7360172e5b5d6a1036cd5af55e016b2dbb8a6567 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7511,9 +7511,11 @@ MaybeObject* CodeCache::UpdateNormalTypeCache(Name* name, Code* code) {
Object* CodeCache::Lookup(Name* name, Code::Flags flags) {
- flags = Code::RemoveTypeFromFlags(flags);
- Object* result = LookupDefaultCache(name, flags);
- if (result->IsCode()) return result;
+ Object* result = LookupDefaultCache(name, Code::RemoveTypeFromFlags(flags));
+ if (result->IsCode()) {
+ if (Code::cast(result)->flags() == flags) return result;
+ return GetHeap()->undefined_value();
+ }
return LookupNormalTypeCache(name, flags);
}
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698