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

Side by Side Diff: src/deoptimizer.cc

Issue 184443002: Evict from optimized code map in sync with removing from optimized functions list. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « no previous file | src/objects.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 public: 335 public:
336 virtual void EnterContext(Context* context) { } // Don't care. 336 virtual void EnterContext(Context* context) { } // Don't care.
337 virtual void LeaveContext(Context* context) { } // Don't care. 337 virtual void LeaveContext(Context* context) { } // Don't care.
338 virtual void VisitFunction(JSFunction* function) { 338 virtual void VisitFunction(JSFunction* function) {
339 Code* code = function->code(); 339 Code* code = function->code();
340 if (!code->marked_for_deoptimization()) return; 340 if (!code->marked_for_deoptimization()) return;
341 341
342 // Unlink this function and evict from optimized code map. 342 // Unlink this function and evict from optimized code map.
343 SharedFunctionInfo* shared = function->shared(); 343 SharedFunctionInfo* shared = function->shared();
344 function->set_code(shared->code()); 344 function->set_code(shared->code());
345 shared->EvictFromOptimizedCodeMap(code, "deoptimized function"); 345 shared->EvictFromOptimizedCodeMap(function->context()->native_context(),
346 "deoptimized function");
346 347
347 if (FLAG_trace_deopt) { 348 if (FLAG_trace_deopt) {
348 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); 349 CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer());
349 PrintF(scope.file(), "[deoptimizer unlinked: "); 350 PrintF(scope.file(), "[deoptimizer unlinked: ");
350 function->PrintName(scope.file()); 351 function->PrintName(scope.file());
351 PrintF(scope.file(), 352 PrintF(scope.file(),
352 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function)); 353 " / %" V8PRIxPTR "]\n", reinterpret_cast<intptr_t>(function));
353 } 354 }
354 } 355 }
355 }; 356 };
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3472 3473
3473 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3474 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3474 v->VisitPointer(BitCast<Object**>(&function_)); 3475 v->VisitPointer(BitCast<Object**>(&function_));
3475 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3476 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3476 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3477 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3477 } 3478 }
3478 3479
3479 #endif // ENABLE_DEBUGGER_SUPPORT 3480 #endif // ENABLE_DEBUGGER_SUPPORT
3480 3481
3481 } } // namespace v8::internal 3482 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698