Chromium Code Reviews

Unified Diff: src/compiler.cc

Issue 2278543002: [compiler] Make Compiler::EnsureBytecode not switch tiers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 9a5afe99dae54bb6a9afc2373bad51b165161acc..b2c56bc615e04240aee982a33304efcf2faf17ef 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1392,8 +1392,12 @@ MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) {
bool Compiler::EnsureBytecode(CompilationInfo* info) {
DCHECK(ShouldUseIgnition(info));
if (!info->shared_info()->HasBytecodeArray()) {
- DCHECK(!info->shared_info()->is_compiled());
+ Handle<Code> original_code(info->shared_info()->code());
if (GetUnoptimizedCode(info).is_null()) return false;
+ DCHECK(info->shared_info()->is_compiled());
+ if (original_code->kind() == Code::FUNCTION) {
rmcilroy 2016/08/24 13:31:34 A comment might be good here.
Michael Starzinger 2016/08/24 13:42:35 Done.
+ info->shared_info()->ReplaceCode(*original_code);
+ }
}
DCHECK(info->shared_info()->HasBytecodeArray());
return true;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-635923.js » ('j') | test/mjsunit/regress/regress-crbug-635923.js » ('J')

Powered by Google App Engine