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

Unified Diff: src/gdb-jit.cc

Issue 17827005: Get rid of ZoneScope completely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Suggestions from danno Created 7 years, 6 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/deoptimizer.cc ('k') | src/hydrogen-environment-liveness.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gdb-jit.cc
diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc
index 5717a960793b2506b4e51b8c4e2b1b35c8956fa6..b6920f6231c5b6be6ab9125d3f7b72d03617224a 100644
--- a/src/gdb-jit.cc
+++ b/src/gdb-jit.cc
@@ -1916,8 +1916,7 @@ static void UnregisterCodeEntry(JITCodeEntry* entry) {
}
-static JITCodeEntry* CreateELFObject(CodeDescription* desc, Zone* zone) {
- ZoneScope zone_scope(zone, DELETE_ON_EXIT);
+static JITCodeEntry* CreateELFObject(CodeDescription* desc, Isolate* isolate) {
#ifdef __MACH_O
MachO mach_o;
Writer w(&mach_o);
@@ -1930,11 +1929,12 @@ static JITCodeEntry* CreateELFObject(CodeDescription* desc, Zone* zone) {
mach_o.Write(&w, desc->CodeStart(), desc->CodeSize());
#else
- ELF elf(zone);
+ Zone zone(isolate);
+ ELF elf(&zone);
Writer w(&elf);
int text_section_index = elf.AddSection(
- new(zone) FullHeaderELFSection(
+ new(&zone) FullHeaderELFSection(
".text",
ELFSection::TYPE_NOBITS,
kCodeAlignment,
@@ -1942,11 +1942,11 @@ static JITCodeEntry* CreateELFObject(CodeDescription* desc, Zone* zone) {
0,
desc->CodeSize(),
ELFSection::FLAG_ALLOC | ELFSection::FLAG_EXEC),
- zone);
+ &zone);
- CreateSymbolsTable(desc, zone, &elf, text_section_index);
+ CreateSymbolsTable(desc, &zone, &elf, text_section_index);
- CreateDWARFSections(desc, zone, &elf);
+ CreateDWARFSections(desc, &zone, &elf);
elf.Write(&w);
#endif
@@ -2083,8 +2083,9 @@ void GDBJITInterface::AddCode(const char* name,
}
AddUnwindInfo(&code_desc);
+ Isolate* isolate = code->GetIsolate();
Zone* zone = code->GetIsolate()->runtime_zone();
- JITCodeEntry* entry = CreateELFObject(&code_desc, zone);
+ JITCodeEntry* entry = CreateELFObject(&code_desc, isolate);
ASSERT(!IsLineInfoTagged(entry));
delete lineinfo;
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen-environment-liveness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698