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

Side by Side Diff: src/deoptimizer.cc

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename CompilationInfoZone to ZoneWithCompilationInfo Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/debug.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 AssertNoAllocation no_allocation; 262 AssertNoAllocation no_allocation;
263 263
264 DeoptimizingVisitor visitor; 264 DeoptimizingVisitor visitor;
265 VisitAllOptimizedFunctionsForGlobalObject(object, &visitor); 265 VisitAllOptimizedFunctionsForGlobalObject(object, &visitor);
266 } 266 }
267 267
268 268
269 void Deoptimizer::VisitAllOptimizedFunctionsForContext( 269 void Deoptimizer::VisitAllOptimizedFunctionsForContext(
270 Context* context, OptimizedFunctionVisitor* visitor) { 270 Context* context, OptimizedFunctionVisitor* visitor) {
271 Isolate* isolate = context->GetIsolate(); 271 Isolate* isolate = context->GetIsolate();
272 ZoneScope zone_scope(isolate, DELETE_ON_EXIT); 272 ZoneScope zone_scope(isolate->runtime_zone(), DELETE_ON_EXIT);
273 AssertNoAllocation no_allocation; 273 AssertNoAllocation no_allocation;
274 274
275 ASSERT(context->IsGlobalContext()); 275 ASSERT(context->IsGlobalContext());
276 276
277 visitor->EnterContext(context); 277 visitor->EnterContext(context);
278 278
279 // Create a snapshot of the optimized functions list. This is needed because 279 // Create a snapshot of the optimized functions list. This is needed because
280 // visitors might remove more than one link from the list at once. 280 // visitors might remove more than one link from the list at once.
281 ZoneList<JSFunction*> snapshot(1, isolate->zone()); 281 ZoneList<JSFunction*> snapshot(1, isolate->runtime_zone());
282 Object* element = context->OptimizedFunctionsListHead(); 282 Object* element = context->OptimizedFunctionsListHead();
283 while (!element->IsUndefined()) { 283 while (!element->IsUndefined()) {
284 JSFunction* element_function = JSFunction::cast(element); 284 JSFunction* element_function = JSFunction::cast(element);
285 snapshot.Add(element_function, isolate->zone()); 285 snapshot.Add(element_function, isolate->runtime_zone());
286 element = element_function->next_function_link(); 286 element = element_function->next_function_link();
287 } 287 }
288 288
289 // Run through the snapshot of optimized functions and visit them. 289 // Run through the snapshot of optimized functions and visit them.
290 for (int i = 0; i < snapshot.length(); ++i) { 290 for (int i = 0; i < snapshot.length(); ++i) {
291 visitor->VisitFunction(snapshot.at(i)); 291 visitor->VisitFunction(snapshot.at(i));
292 } 292 }
293 293
294 visitor->LeaveContext(context); 294 visitor->LeaveContext(context);
295 } 295 }
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 1672
1673 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1673 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1674 v->VisitPointer(BitCast<Object**>(&function_)); 1674 v->VisitPointer(BitCast<Object**>(&function_));
1675 v->VisitPointers(parameters_, parameters_ + parameters_count_); 1675 v->VisitPointers(parameters_, parameters_ + parameters_count_);
1676 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1676 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1677 } 1677 }
1678 1678
1679 #endif // ENABLE_DEBUGGER_SUPPORT 1679 #endif // ENABLE_DEBUGGER_SUPPORT
1680 1680
1681 } } // namespace v8::internal 1681 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698