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

Unified Diff: src/heap.cc

Issue 132623005: A64: Synchronize with r18642. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | « src/heap.h ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 1b91e689dd976440e17a6f3fc0b907e56981695b..d413950ca84aed4d1eb00dc76b28ce1be5cf3851 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -521,6 +521,7 @@ void Heap::ProcessPretenuringFeedback() {
int i = 0;
Object* list_element = allocation_sites_list();
+ bool trigger_deoptimization = false;
while (use_scratchpad ?
i < allocation_sites_scratchpad_length :
list_element->IsAllocationSite()) {
@@ -530,12 +531,11 @@ void Heap::ProcessPretenuringFeedback() {
if (site->memento_found_count() > 0) {
active_allocation_sites++;
}
- if (site->DigestPretenuringFeedback()) {
- if (site->GetPretenureMode() == TENURED) {
- tenure_decisions++;
- } else {
- dont_tenure_decisions++;
- }
+ if (site->DigestPretenuringFeedback()) trigger_deoptimization = true;
+ if (site->GetPretenureMode() == TENURED) {
+ tenure_decisions++;
+ } else {
+ dont_tenure_decisions++;
}
allocation_sites++;
if (use_scratchpad) {
@@ -544,6 +544,9 @@ void Heap::ProcessPretenuringFeedback() {
list_element = site->weak_next();
}
}
+
+ if (trigger_deoptimization) isolate_->stack_guard()->DeoptMarkedCode();
+
allocation_sites_scratchpad_length = 0;
// TODO(mvstanton): Pretenure decisions are only made once for an allocation
@@ -1983,14 +1986,22 @@ void Heap::ProcessAllocationSites(WeakObjectRetainer* retainer,
void Heap::ResetAllAllocationSitesDependentCode(PretenureFlag flag) {
+ ASSERT(AllowCodeDependencyChange::IsAllowed());
+ DisallowHeapAllocation no_allocation_scope;
Object* cur = allocation_sites_list();
+ bool marked = false;
while (cur->IsAllocationSite()) {
AllocationSite* casted = AllocationSite::cast(cur);
if (casted->GetPretenureMode() == flag) {
casted->ResetPretenureDecision();
+ bool got_marked = casted->dependent_code()->MarkCodeForDeoptimization(
+ isolate_,
+ DependentCode::kAllocationSiteTenuringChangedGroup);
+ if (got_marked) marked = true;
}
cur = casted->weak_next();
}
+ if (marked) isolate_->stack_guard()->DeoptMarkedCode();
}
@@ -3404,6 +3415,11 @@ bool Heap::CreateInitialObjects() {
}
set_natives_source_cache(FixedArray::cast(obj));
+ { MaybeObject* maybe_obj = AllocateCell(undefined_value());
+ if (!maybe_obj->ToObject(&obj)) return false;
+ }
+ set_undefined_cell(Cell::cast(obj));
+
// Allocate object to hold object observation state.
{ MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
if (!maybe_obj->ToObject(&obj)) return false;
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698