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

Side by Side Diff: src/arm/lithium-codegen-arm.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. 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 int length = deoptimizations_.length(); 901 int length = deoptimizations_.length();
902 if (length == 0) return; 902 if (length == 0) return;
903 Handle<DeoptimizationInputData> data = 903 Handle<DeoptimizationInputData> data =
904 factory()->NewDeoptimizationInputData(length, TENURED); 904 factory()->NewDeoptimizationInputData(length, TENURED);
905 905
906 Handle<ByteArray> translations = 906 Handle<ByteArray> translations =
907 translations_.CreateByteArray(isolate()->factory()); 907 translations_.CreateByteArray(isolate()->factory());
908 data->SetTranslationByteArray(*translations); 908 data->SetTranslationByteArray(*translations);
909 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 909 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
910 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); 910 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
911 if (info_->IsOptimizing()) {
912 // Reference to shared function info does not change between phases.
913 AllowDeferredHandleDereference allow_handle_dereference;
914 data->SetSharedFunctionInfo(*info_->shared_info());
915 } else {
916 data->SetSharedFunctionInfo(Smi::FromInt(0));
917 }
911 918
912 Handle<FixedArray> literals = 919 Handle<FixedArray> literals =
913 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 920 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
914 { AllowDeferredHandleDereference copy_handles; 921 { AllowDeferredHandleDereference copy_handles;
915 for (int i = 0; i < deoptimization_literals_.length(); i++) { 922 for (int i = 0; i < deoptimization_literals_.length(); i++) {
916 literals->set(i, *deoptimization_literals_[i]); 923 literals->set(i, *deoptimization_literals_[i]);
917 } 924 }
918 data->SetLiteralArray(*literals); 925 data->SetLiteralArray(*literals);
919 } 926 }
920 927
(...skipping 4825 matching lines...) Expand 10 before | Expand all | Expand 10 after
5746 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5753 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5747 __ ldr(result, FieldMemOperand(scratch, 5754 __ ldr(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/arm/deoptimizer-arm.cc ('k') | src/compiler.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698