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

Unified Diff: src/code-stubs.cc

Issue 2551353003: [stubs] Ensure that the stubs are recompiled in respective tests. (Closed)
Patch Set: Created 4 years 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/code-stubs.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 54d5f775acc5926426801a9c2e223ec2d494aff2..43d88edbbc551c5075302f861b337adeff0088b7 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -112,6 +112,12 @@ Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) {
return ic;
}
+void CodeStub::DeleteStubFromCacheForTesting() {
+ Heap* heap = isolate_->heap();
+ Handle<UnseededNumberDictionary> dict(heap->code_stubs());
+ dict = UnseededNumberDictionary::DeleteKey(dict, GetKey());
+ heap->SetRootCodeStubs(*dict);
+}
Handle<Code> PlatformCodeStub::GenerateCode() {
Factory* factory = isolate()->factory();
« no previous file with comments | « src/code-stubs.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698