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

Side by Side Diff: src/mips/lithium-codegen-mips.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: Fix assert 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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 int length = deoptimizations_.length(); 854 int length = deoptimizations_.length();
855 if (length == 0) return; 855 if (length == 0) return;
856 Handle<DeoptimizationInputData> data = 856 Handle<DeoptimizationInputData> data =
857 factory()->NewDeoptimizationInputData(length, TENURED); 857 factory()->NewDeoptimizationInputData(length, TENURED);
858 858
859 Handle<ByteArray> translations = 859 Handle<ByteArray> translations =
860 translations_.CreateByteArray(isolate()->factory()); 860 translations_.CreateByteArray(isolate()->factory());
861 data->SetTranslationByteArray(*translations); 861 data->SetTranslationByteArray(*translations);
862 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 862 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
863 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); 863 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
864 if (info_->IsOptimizing()) {
865 // Reference to shared function info does not change between phases.
866 AllowDeferredHandleDereference allow_handle_dereference;
867 data->SetSharedFunctionInfo(*info_->shared_info());
868 } else {
869 data->SetSharedFunctionInfo(Smi::FromInt(0));
870 }
864 871
865 Handle<FixedArray> literals = 872 Handle<FixedArray> literals =
866 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 873 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
867 { AllowDeferredHandleDereference copy_handles; 874 { AllowDeferredHandleDereference copy_handles;
868 for (int i = 0; i < deoptimization_literals_.length(); i++) { 875 for (int i = 0; i < deoptimization_literals_.length(); i++) {
869 literals->set(i, *deoptimization_literals_[i]); 876 literals->set(i, *deoptimization_literals_[i]);
870 } 877 }
871 data->SetLiteralArray(*literals); 878 data->SetLiteralArray(*literals);
872 } 879 }
873 880
(...skipping 4872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5746 __ Subu(scratch, result, scratch); 5753 __ Subu(scratch, result, scratch);
5747 __ lw(result, FieldMemOperand(scratch, 5754 __ lw(result, FieldMemOperand(scratch,
5748 FixedArray::kHeaderSize - kPointerSize)); 5755 FixedArray::kHeaderSize - kPointerSize));
5749 __ bind(&done); 5756 __ bind(&done);
5750 } 5757 }
5751 5758
5752 5759
5753 #undef __ 5760 #undef __
5754 5761
5755 } } // namespace v8::internal 5762 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/deoptimizer-mips.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698