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

Unified Diff: src/deoptimizer.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/compiler.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 0a933dfd3eda581ff065880e4e23e187e6d38557..c6c098ea9787daa4af0a1d6be7852dd1d48d8641 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -284,7 +284,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
void Deoptimizer::VisitAllOptimizedFunctionsForContext(
Context* context, OptimizedFunctionVisitor* visitor) {
Isolate* isolate = context->GetIsolate();
- ZoneScope zone_scope(isolate->runtime_zone(), DELETE_ON_EXIT);
+ Zone zone(isolate);
DisallowHeapAllocation no_allocation;
ASSERT(context->IsNativeContext());
@@ -293,11 +293,11 @@ void Deoptimizer::VisitAllOptimizedFunctionsForContext(
// Create a snapshot of the optimized functions list. This is needed because
// visitors might remove more than one link from the list at once.
- ZoneList<JSFunction*> snapshot(1, isolate->runtime_zone());
+ ZoneList<JSFunction*> snapshot(1, &zone);
Object* element = context->OptimizedFunctionsListHead();
while (!element->IsUndefined()) {
JSFunction* element_function = JSFunction::cast(element);
- snapshot.Add(element_function, isolate->runtime_zone());
+ snapshot.Add(element_function, &zone);
element = element_function->next_function_link();
}
@@ -420,11 +420,10 @@ void Deoptimizer::DeoptimizeFunction(JSFunction* function) {
Context* context = function->context()->native_context();
Isolate* isolate = context->GetIsolate();
Object* undefined = isolate->heap()->undefined_value();
- Zone* zone = isolate->runtime_zone();
- ZoneScope zone_scope(zone, DELETE_ON_EXIT);
- ZoneList<Code*> codes(1, zone);
+ Zone zone(isolate);
+ ZoneList<Code*> codes(1, &zone);
DeoptimizeWithMatchingCodeFilter filter(code);
- PartitionOptimizedFunctions(context, &filter, &codes, zone, undefined);
+ PartitionOptimizedFunctions(context, &filter, &codes, &zone, undefined);
ASSERT_EQ(1, codes.length());
DeoptimizeFunctionWithPreparedFunctionList(
JSFunction::cast(codes.at(0)->deoptimizing_functions()));
@@ -437,10 +436,9 @@ void Deoptimizer::DeoptimizeAllFunctionsForContext(
ASSERT(context->IsNativeContext());
Isolate* isolate = context->GetIsolate();
Object* undefined = isolate->heap()->undefined_value();
- Zone* zone = isolate->runtime_zone();
- ZoneScope zone_scope(zone, DELETE_ON_EXIT);
- ZoneList<Code*> codes(1, zone);
- PartitionOptimizedFunctions(context, filter, &codes, zone, undefined);
+ Zone zone(isolate);
+ ZoneList<Code*> codes(1, &zone);
+ PartitionOptimizedFunctions(context, filter, &codes, &zone, undefined);
for (int i = 0; i < codes.length(); ++i) {
DeoptimizeFunctionWithPreparedFunctionList(
JSFunction::cast(codes.at(i)->deoptimizing_functions()));
« no previous file with comments | « src/compiler.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698