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

Side by Side 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, 3 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 // free as much as possible, since some code expects the old shared function 1385 // free as much as possible, since some code expects the old shared function
1386 // infos to stick around. 1386 // infos to stick around.
1387 script->set_shared_function_infos(*old_function_infos); 1387 script->set_shared_function_infos(*old_function_infos);
1388 1388
1389 return infos; 1389 return infos;
1390 } 1390 }
1391 1391
1392 bool Compiler::EnsureBytecode(CompilationInfo* info) { 1392 bool Compiler::EnsureBytecode(CompilationInfo* info) {
1393 DCHECK(ShouldUseIgnition(info)); 1393 DCHECK(ShouldUseIgnition(info));
1394 if (!info->shared_info()->HasBytecodeArray()) { 1394 if (!info->shared_info()->HasBytecodeArray()) {
1395 DCHECK(!info->shared_info()->is_compiled()); 1395 Handle<Code> original_code(info->shared_info()->code());
1396 if (GetUnoptimizedCode(info).is_null()) return false; 1396 if (GetUnoptimizedCode(info).is_null()) return false;
1397 DCHECK(info->shared_info()->is_compiled());
1398 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.
1399 info->shared_info()->ReplaceCode(*original_code);
1400 }
1397 } 1401 }
1398 DCHECK(info->shared_info()->HasBytecodeArray()); 1402 DCHECK(info->shared_info()->HasBytecodeArray());
1399 return true; 1403 return true;
1400 } 1404 }
1401 1405
1402 // TODO(turbofan): In the future, unoptimized code with deopt support could 1406 // TODO(turbofan): In the future, unoptimized code with deopt support could
1403 // be generated lazily once deopt is triggered. 1407 // be generated lazily once deopt is triggered.
1404 bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) { 1408 bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
1405 DCHECK_NOT_NULL(info->literal()); 1409 DCHECK_NOT_NULL(info->literal());
1406 DCHECK_NOT_NULL(info->scope()); 1410 DCHECK_NOT_NULL(info->scope());
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 DCHECK(shared->is_compiled()); 1974 DCHECK(shared->is_compiled());
1971 function->set_literals(cached.literals); 1975 function->set_literals(cached.literals);
1972 } else if (shared->is_compiled()) { 1976 } else if (shared->is_compiled()) {
1973 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1977 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1974 JSFunction::EnsureLiterals(function); 1978 JSFunction::EnsureLiterals(function);
1975 } 1979 }
1976 } 1980 }
1977 1981
1978 } // namespace internal 1982 } // namespace internal
1979 } // namespace v8 1983 } // namespace v8
OLDNEW
« 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
This is Rietveld 408576698