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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 184923002: Clear optimized code cache in shared function info when code gets deoptimized (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
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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 int length = deoptimizations_.length(); 786 int length = deoptimizations_.length();
787 if (length == 0) return; 787 if (length == 0) return;
788 Handle<DeoptimizationInputData> data = 788 Handle<DeoptimizationInputData> data =
789 factory()->NewDeoptimizationInputData(length, TENURED); 789 factory()->NewDeoptimizationInputData(length, TENURED);
790 790
791 Handle<ByteArray> translations = 791 Handle<ByteArray> translations =
792 translations_.CreateByteArray(isolate()->factory()); 792 translations_.CreateByteArray(isolate()->factory());
793 data->SetTranslationByteArray(*translations); 793 data->SetTranslationByteArray(*translations);
794 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 794 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
795 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); 795 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
796 if (info_->IsOptimizing()) {
797 data->SetSharedFunctionInfo(*info_->shared_info());
798 } else {
799 data->SetSharedFunctionInfo(Smi::FromInt(0));
800 }
796 801
797 Handle<FixedArray> literals = 802 Handle<FixedArray> literals =
798 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 803 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
799 { AllowDeferredHandleDereference copy_handles; 804 { AllowDeferredHandleDereference copy_handles;
800 for (int i = 0; i < deoptimization_literals_.length(); i++) { 805 for (int i = 0; i < deoptimization_literals_.length(); i++) {
801 literals->set(i, *deoptimization_literals_[i]); 806 literals->set(i, *deoptimization_literals_[i]);
802 } 807 }
803 data->SetLiteralArray(*literals); 808 data->SetLiteralArray(*literals);
804 } 809 }
805 810
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
5582 FixedArray::kHeaderSize - kPointerSize)); 5587 FixedArray::kHeaderSize - kPointerSize));
5583 __ bind(&done); 5588 __ bind(&done);
5584 } 5589 }
5585 5590
5586 5591
5587 #undef __ 5592 #undef __
5588 5593
5589 } } // namespace v8::internal 5594 } } // namespace v8::internal
5590 5595
5591 #endif // V8_TARGET_ARCH_X64 5596 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects-inl.h ('K') | « src/x64/deoptimizer-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698