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

Side by Side Diff: src/objects.cc

Issue 1153483002: [turbofan] Enable deoptimization for non-asm.js TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Michis comment. REBASE Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/frames.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 12487 matching lines...) Expand 10 before | Expand all | Expand 10 after
12498 12498
12499 // Mark all the code that needs to be deoptimized. 12499 // Mark all the code that needs to be deoptimized.
12500 bool marked = false; 12500 bool marked = false;
12501 bool invalidate_embedded_objects = group == kWeakCodeGroup; 12501 bool invalidate_embedded_objects = group == kWeakCodeGroup;
12502 for (int i = start; i < end; i++) { 12502 for (int i = start; i < end; i++) {
12503 Object* obj = object_at(i); 12503 Object* obj = object_at(i);
12504 if (obj->IsWeakCell()) { 12504 if (obj->IsWeakCell()) {
12505 WeakCell* cell = WeakCell::cast(obj); 12505 WeakCell* cell = WeakCell::cast(obj);
12506 if (cell->cleared()) continue; 12506 if (cell->cleared()) continue;
12507 Code* code = Code::cast(cell->value()); 12507 Code* code = Code::cast(cell->value());
12508 if (!code->marked_for_deoptimization() && 12508 if (!code->marked_for_deoptimization()) {
12509 (!code->is_turbofanned() || FLAG_turbo_deoptimization)) {
12510 SetMarkedForDeoptimization(code, group); 12509 SetMarkedForDeoptimization(code, group);
12511 if (invalidate_embedded_objects) { 12510 if (invalidate_embedded_objects) {
12512 code->InvalidateEmbeddedObjects(); 12511 code->InvalidateEmbeddedObjects();
12513 } 12512 }
12514 marked = true; 12513 marked = true;
12515 } 12514 }
12516 } else { 12515 } else {
12517 DCHECK(obj->IsForeign()); 12516 DCHECK(obj->IsForeign());
12518 CompilationDependencies* info = 12517 CompilationDependencies* info =
12519 reinterpret_cast<CompilationDependencies*>( 12518 reinterpret_cast<CompilationDependencies*>(
(...skipping 4776 matching lines...) Expand 10 before | Expand all | Expand 10 after
17296 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17295 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17297 Handle<Object> new_value) { 17296 Handle<Object> new_value) {
17298 if (cell->value() != *new_value) { 17297 if (cell->value() != *new_value) {
17299 cell->set_value(*new_value); 17298 cell->set_value(*new_value);
17300 Isolate* isolate = cell->GetIsolate(); 17299 Isolate* isolate = cell->GetIsolate();
17301 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17300 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17302 isolate, DependentCode::kPropertyCellChangedGroup); 17301 isolate, DependentCode::kPropertyCellChangedGroup);
17303 } 17302 }
17304 } 17303 }
17305 } } // namespace v8::internal 17304 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698