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

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

Issue 1493393002: Revert "Use WeakCells in the optimized code map rather than traversing in pause." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/contexts.h » ('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 9d6a72cad923d4348e2ca7b890e8f835fd7a7a09..793034c1e2232b4b364c4ee16f86c56fd5903084 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -1867,29 +1867,19 @@ void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode(
HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt());
HValue* context_slot = LoadFromOptimizedCodeMap(
optimized_map, map_index, SharedFunctionInfo::kContextOffset);
- context_slot = Add<HLoadNamedField>(context_slot, nullptr,
- HObjectAccess::ForWeakCellValue());
HValue* osr_ast_slot = LoadFromOptimizedCodeMap(
optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset);
HValue* code_object = LoadFromOptimizedCodeMap(
optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset);
- code_object = Add<HLoadNamedField>(code_object, nullptr,
- HObjectAccess::ForWeakCellValue());
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()->GetConstant0());
+ graph()->GetConstantUndefined());
builder->Then();
HValue* literals = LoadFromOptimizedCodeMap(optimized_map,
map_index, SharedFunctionInfo::kLiteralsOffset);
- literals = Add<HLoadNamedField>(literals, nullptr,
- HObjectAccess::ForWeakCellValue());
- IfBuilder maybe_deopt(this);
- maybe_deopt.If<HCompareObjectEqAndBranch>(literals, graph()->GetConstant0());
- maybe_deopt.ThenDeopt(Deoptimizer::kLiteralsWereDisposed);
- maybe_deopt.End();
BuildInstallOptimizedCode(js_function, native_context, code_object, literals);
@@ -2013,10 +2003,8 @@ void CodeStubGraphBuilderBase::BuildInstallFromOptimizedCodeMap(
HValue* shared_code =
Add<HLoadNamedField>(optimized_map, nullptr,
HObjectAccess::ForOptimizedCodeMapSharedCode());
- shared_code = Add<HLoadNamedField>(shared_code, nullptr,
- HObjectAccess::ForWeakCellValue());
shared_code_check.IfNot<HCompareObjectEqAndBranch>(
- shared_code, graph()->GetConstant0());
+ shared_code, graph()->GetConstantUndefined());
shared_code_check.Then();
{
// Store the context-independent optimized code.
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698