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

Unified Diff: src/ic.h

Issue 188783003: Make maps in monomorphic IC stubs weak. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/flag-definitions.h ('k') | src/ic.cc » ('j') | src/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index 41882e66890809936332c66762d85094bd4756c4..b4169873f85f54b8d11350cbf7b2a8d70682ab8e 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -106,6 +106,18 @@ class IC {
return false;
}
+ // If the stub contains weak maps then this function adds the stub to
+ // the dependent code array of each weak map.
+ static void RegisterWeakMapDependency(Handle<Code> stub);
+
+ // Returns the miss builtin for given stub's kind.
+ static Code* MissBuiltin(Isolate* isolate, Code* stub);
+
+ // This function is called when a weak map in the stub is dying,
+ // invalidates the stub by setting maps in it to undefined and
+ // setting code targets to the miss builtin.
+ static void InvalidateMapsAndHandlers(Code* stub);
+
// Clear the inline cache to initial state.
static void Clear(Isolate* isolate,
Address address,
@@ -173,6 +185,9 @@ class IC {
// Set the call-site target.
void set_target(Code* code) {
+#ifdef VERIFY_HEAP
+ code->VerifyEmbeddedObjectsDependency();
+#endif
SetTargetAtAddress(address(), code, constant_pool());
target_set_ = true;
}
« no previous file with comments | « src/flag-definitions.h ('k') | src/ic.cc » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698