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

Unified Diff: src/compiler.cc

Issue 1879973005: [compiler] Fix optimized code lookup in GetLazyCode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add assertion. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 9cec9f3aadd82dd39697485e9997827d7e230108..9c04b9f052dba9d528552fe33e192b8cd770471e 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -895,11 +895,16 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy());
if (FLAG_turbo_cache_shared_code) {
- CodeAndLiterals result;
- result = function->shared()->SearchOptimizedCodeMap(
- *isolate->native_context(), BailoutId::None());
- if (result.code != nullptr) {
- return Handle<Code>(result.code);
+ Handle<Code> cached_code;
+ if (GetCodeFromOptimizedCodeMap(function, BailoutId::None())
+ .ToHandle(&cached_code)) {
+ if (FLAG_trace_opt) {
+ PrintF("[found optimized code for ");
+ function->ShortPrint();
+ PrintF(" during unoptimized compile]\n");
+ }
+ DCHECK(function->shared()->is_compiled());
+ return cached_code;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698