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

Unified Diff: src/code-stubs.cc

Issue 188783003: Make maps in monomorphic IC stubs weak. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase, address comments Created 6 years, 8 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/code-stubs.h ('k') | src/flag-definitions.h » ('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 06203629ae15cf8153d7b92c32c77b637849b0cf..0840f6c21f4dd966a66ed94f65075be37a8814eb 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -72,10 +72,11 @@ SmartArrayPointer<const char> CodeStub::GetName() {
}
-void CodeStub::RecordCodeGeneration(Code* code, Isolate* isolate) {
+void CodeStub::RecordCodeGeneration(Handle<Code> code, Isolate* isolate) {
+ IC::RegisterWeakMapDependency(code);
SmartArrayPointer<const char> name = GetName();
- PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, name.get()));
- GDBJIT(AddCode(GDBJITInterface::STUB, name.get(), code));
+ PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, *code, name.get()));
+ GDBJIT(AddCode(GDBJITInterface::STUB, name.get(), *code));
Counters* counters = isolate->counters();
counters->total_stubs_code_size()->Increment(code->instruction_size());
}
@@ -91,7 +92,7 @@ Handle<Code> CodeStub::GetCodeCopy(Isolate* isolate,
Handle<Code> ic = GetCode(isolate);
ic = isolate->factory()->CopyCode(ic);
ic->FindAndReplace(pattern);
- RecordCodeGeneration(*ic, isolate);
+ RecordCodeGeneration(ic, isolate);
return ic;
}
@@ -154,7 +155,7 @@ Handle<Code> CodeStub::GetCode(Isolate* isolate) {
Handle<Code> new_object = GenerateCode(isolate);
new_object->set_major_key(MajorKey());
FinishCode(new_object);
- RecordCodeGeneration(*new_object, isolate);
+ RecordCodeGeneration(new_object, isolate);
#ifdef ENABLE_DISASSEMBLER
if (FLAG_print_code_stubs) {
« no previous file with comments | « src/code-stubs.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698