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/ia32/lithium-codegen-ia32.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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 int length = deoptimizations_.length(); 1173 int length = deoptimizations_.length();
1174 if (length == 0) return; 1174 if (length == 0) return;
1175 Handle<DeoptimizationInputData> data = 1175 Handle<DeoptimizationInputData> data =
1176 factory()->NewDeoptimizationInputData(length, TENURED); 1176 factory()->NewDeoptimizationInputData(length, TENURED);
1177 1177
1178 Handle<ByteArray> translations = 1178 Handle<ByteArray> translations =
1179 translations_.CreateByteArray(isolate()->factory()); 1179 translations_.CreateByteArray(isolate()->factory());
1180 data->SetTranslationByteArray(*translations); 1180 data->SetTranslationByteArray(*translations);
1181 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 1181 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
1182 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); 1182 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
1183 if (info_->IsOptimizing()) {
1184 // Reference to shared function info does not change between phases.
1185 AllowDeferredHandleDereference allow_handle_dereference;
1186 data->SetSharedFunctionInfo(*info_->shared_info());
1187 } else {
1188 data->SetSharedFunctionInfo(Smi::FromInt(0));
1189 }
1183 1190
1184 Handle<FixedArray> literals = 1191 Handle<FixedArray> literals =
1185 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 1192 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
1186 { AllowDeferredHandleDereference copy_handles; 1193 { AllowDeferredHandleDereference copy_handles;
1187 for (int i = 0; i < deoptimization_literals_.length(); i++) { 1194 for (int i = 0; i < deoptimization_literals_.length(); i++) {
1188 literals->set(i, *deoptimization_literals_[i]); 1195 literals->set(i, *deoptimization_literals_[i]);
1189 } 1196 }
1190 data->SetLiteralArray(*literals); 1197 data->SetLiteralArray(*literals);
1191 } 1198 }
1192 1199
(...skipping 5081 matching lines...) Expand 10 before | Expand all | Expand 10 after
6274 FixedArray::kHeaderSize - kPointerSize)); 6281 FixedArray::kHeaderSize - kPointerSize));
6275 __ bind(&done); 6282 __ bind(&done);
6276 } 6283 }
6277 6284
6278 6285
6279 #undef __ 6286 #undef __
6280 6287
6281 } } // namespace v8::internal 6288 } } // namespace v8::internal
6282 6289
6283 #endif // V8_TARGET_ARCH_IA32 6290 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/mips/deoptimizer-mips.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698