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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 1353363002: Share literals arrays per <NativeContext, SharedFunctionInfo> pair. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 9f9b14e309d975f15c77020d72a6e38b8e3e0a28..e9b72ff9cbfdd5c3926feff39cced9a51d245ebe 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -1667,13 +1667,15 @@ void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode(
optimized_map, map_index, SharedFunctionInfo::kContextOffset);
HValue* osr_ast_slot = LoadFromOptimizedCodeMap(
optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset);
+ HValue* code_object = LoadFromOptimizedCodeMap(
+ optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset);
builder->If<HCompareObjectEqAndBranch>(native_context,
context_slot);
builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none);
+ builder->And();
+ builder->IfNot<HCompareObjectEqAndBranch>(code_object,
+ graph()->GetConstantUndefined());
builder->Then();
- HValue* code_object = LoadFromOptimizedCodeMap(optimized_map,
- map_index, SharedFunctionInfo::kCachedCodeOffset);
- // and the literals
HValue* literals = LoadFromOptimizedCodeMap(optimized_map,
map_index, SharedFunctionInfo::kLiteralsOffset);
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698