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

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

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 10 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 | « include/v8.h ('k') | 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 bccce299bddcd80a161b8771b7cccc7e51871642..798453128836e8546024bb96c43e6252638afa25 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -536,7 +536,7 @@ HValue* CodeStubGraphBuilder<CreateWeakCellStub>::BuildCodeStub() {
HInstruction* object =
Add<HAllocate>(size, HType::JSObject(), TENURED, JS_OBJECT_TYPE);
- Handle<Map> weak_cell_map = isolate()->factory()->weak_cell_map();
+ Handle<Map> weak_cell_map = isolate()->factory()->used_weak_cell_map();
AddStoreMapConstant(object, weak_cell_map);
HInstruction* value = GetParameter(CreateWeakCellDescriptor::kValueIndex);
@@ -1340,8 +1340,8 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
Add<HLoadNamedField>(proxy_map, nullptr, HObjectAccess::ForPrototype());
Handle<Map> placeholder_map = isolate()->factory()->meta_map();
HValue* cell = Add<HConstant>(Map::WeakCellForMap(placeholder_map));
- HValue* expected_map =
- Add<HLoadNamedField>(cell, nullptr, HObjectAccess::ForWeakCellValue());
+ HValue* expected_map = Add<HLoadNamedField>(
+ cell, nullptr, HObjectAccess::ForWeakCellValueComparison());
HValue* map =
Add<HLoadNamedField>(global, nullptr, HObjectAccess::ForMap());
IfBuilder map_check(this);
@@ -2088,8 +2088,8 @@ void CodeStubGraphBuilderBase::HandleArrayCases(HValue* array, HValue* receiver,
Add<HLoadKeyed>(array, start, nullptr, FAST_ELEMENTS, ALLOW_RETURN_HOLE);
// Load the weak cell value. It may be Smi(0), or a map. Compare nonetheless
// against the receiver_map.
- HValue* array_map = Add<HLoadNamedField>(weak_cell, nullptr,
- HObjectAccess::ForWeakCellValue());
+ HValue* array_map = Add<HLoadNamedField>(
+ weak_cell, nullptr, HObjectAccess::ForWeakCellValueComparison());
IfBuilder if_correct_map(this);
if_correct_map.If<HCompareObjectEqAndBranch>(receiver_map, array_map);
@@ -2108,7 +2108,7 @@ void CodeStubGraphBuilderBase::HandleArrayCases(HValue* array, HValue* receiver,
HValue* weak_cell = Add<HLoadKeyed>(array, key, nullptr, FAST_ELEMENTS,
ALLOW_RETURN_HOLE);
HValue* array_map = Add<HLoadNamedField>(
- weak_cell, nullptr, HObjectAccess::ForWeakCellValue());
+ weak_cell, nullptr, HObjectAccess::ForWeakCellValueComparison());
IfBuilder if_correct_poly_map(this);
if_correct_poly_map.If<HCompareObjectEqAndBranch>(receiver_map,
array_map);
« no previous file with comments | « include/v8.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698