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

Unified Diff: src/compiler.cc

Issue 17895004: Add DependentCode to PropertyCells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moar review feedback Created 7 years, 6 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/compiler.h ('k') | src/heap.cc » ('j') | 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 87028bda35406f673b37cebda80d4a0a2bb7cf89..d513ba247247e911f0b19d653ae893788e260e26 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -118,7 +118,7 @@ void CompilationInfo::Initialize(Isolate* isolate,
no_frame_ranges_ = isolate->cpu_profiler()->is_profiling()
? new List<OffsetRange>(2) : NULL;
for (int i = 0; i < DependentCode::kGroupCount; i++) {
- dependent_maps_[i] = NULL;
+ dependencies_[i] = NULL;
}
if (mode == STUB) {
mode_ = STUB;
@@ -143,36 +143,42 @@ CompilationInfo::~CompilationInfo() {
// Check that no dependent maps have been added or added dependent maps have
// been rolled back or committed.
for (int i = 0; i < DependentCode::kGroupCount; i++) {
- ASSERT_EQ(NULL, dependent_maps_[i]);
+ ASSERT_EQ(NULL, dependencies_[i]);
}
#endif // DEBUG
}
-void CompilationInfo::CommitDependentMaps(Handle<Code> code) {
+void CompilationInfo::CommitDependencies(Handle<Code> code) {
for (int i = 0; i < DependentCode::kGroupCount; i++) {
- ZoneList<Handle<Map> >* group_maps = dependent_maps_[i];
- if (group_maps == NULL) continue;
+ ZoneList<Handle<HeapObject> >* group_objects = dependencies_[i];
+ if (group_objects == NULL) continue;
ASSERT(!object_wrapper_.is_null());
- for (int j = 0; j < group_maps->length(); j++) {
- group_maps->at(j)->dependent_code()->UpdateToFinishedCode(
- static_cast<DependentCode::DependencyGroup>(i), this, *code);
+ for (int j = 0; j < group_objects->length(); j++) {
+ DependentCode::DependencyGroup group =
+ static_cast<DependentCode::DependencyGroup>(i);
+ DependentCode* dependent_code =
+ DependentCode::ForObject(group_objects->at(j), group);
+ dependent_code->UpdateToFinishedCode(group, this, *code);
}
- dependent_maps_[i] = NULL; // Zone-allocated, no need to delete.
+ dependencies_[i] = NULL; // Zone-allocated, no need to delete.
}
}
-void CompilationInfo::RollbackDependentMaps() {
+void CompilationInfo::RollbackDependencies() {
// Unregister from all dependent maps if not yet committed.
for (int i = 0; i < DependentCode::kGroupCount; i++) {
- ZoneList<Handle<Map> >* group_maps = dependent_maps_[i];
- if (group_maps == NULL) continue;
- for (int j = 0; j < group_maps->length(); j++) {
- group_maps->at(j)->dependent_code()->RemoveCompilationInfo(
- static_cast<DependentCode::DependencyGroup>(i), this);
+ ZoneList<Handle<HeapObject> >* group_objects = dependencies_[i];
+ if (group_objects == NULL) continue;
+ for (int j = 0; j < group_objects->length(); j++) {
+ DependentCode::DependencyGroup group =
+ static_cast<DependentCode::DependencyGroup>(i);
+ DependentCode* dependent_code =
+ DependentCode::ForObject(group_objects->at(j), group);
+ dependent_code->RemoveCompilationInfo(group, this);
}
- dependent_maps_[i] = NULL; // Zone-allocated, no need to delete.
+ dependencies_[i] = NULL; // Zone-allocated, no need to delete.
}
}
@@ -1055,7 +1061,7 @@ void Compiler::InstallOptimizedCode(OptimizingCompiler* optimizing_compiler) {
// If crankshaft succeeded, install the optimized code else install
// the unoptimized code.
OptimizingCompiler::Status status = optimizing_compiler->last_status();
- if (info->HasAbortedDueToDependentMap()) {
+ if (info->HasAbortedDueToDependencyChange()) {
info->set_bailout_reason("bailed out due to dependent map");
status = optimizing_compiler->AbortOptimization();
} else if (status != OptimizingCompiler::SUCCEEDED) {
« no previous file with comments | « src/compiler.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698