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

Side by Side Diff: src/objects.cc

Issue 1883403002: [compiler] Move ensuring deoptimization support to backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 8 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/crankshaft/hydrogen.cc ('k') | test/cctest/heap/test-heap.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 13499 matching lines...) Expand 10 before | Expand all | Expand 10 after
13510 13510
13511 13511
13512 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { 13512 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
13513 code()->ClearInlineCaches(); 13513 code()->ClearInlineCaches();
13514 // If we clear ICs, we need to clear the type feedback vector too, since 13514 // If we clear ICs, we need to clear the type feedback vector too, since
13515 // CallICs are synced with a feedback vector slot. 13515 // CallICs are synced with a feedback vector slot.
13516 ClearTypeFeedbackInfo(); 13516 ClearTypeFeedbackInfo();
13517 set_ic_age(new_ic_age); 13517 set_ic_age(new_ic_age);
13518 if (code()->kind() == Code::FUNCTION) { 13518 if (code()->kind() == Code::FUNCTION) {
13519 code()->set_profiler_ticks(0); 13519 code()->set_profiler_ticks(0);
13520 if (optimization_disabled() && 13520 if (optimization_disabled() && opt_count() >= FLAG_max_opt_count) {
13521 opt_count() >= FLAG_max_opt_count) {
13522 // Re-enable optimizations if they were disabled due to opt_count limit. 13521 // Re-enable optimizations if they were disabled due to opt_count limit.
13523 set_optimization_disabled(false); 13522 set_optimization_disabled(false);
13524 } 13523 }
13524 set_opt_count(0);
13525 set_deopt_count(0);
13526 } else if (code()->is_interpreter_entry_trampoline()) {
13527 set_profiler_ticks(0);
13528 if (optimization_disabled() && opt_count() >= FLAG_max_opt_count) {
13529 // Re-enable optimizations if they were disabled due to opt_count limit.
13530 set_optimization_disabled(false);
13531 }
13525 set_opt_count(0); 13532 set_opt_count(0);
13526 set_deopt_count(0); 13533 set_deopt_count(0);
13527 } 13534 }
13528 } 13535 }
13529 13536
13530 13537
13531 int SharedFunctionInfo::SearchOptimizedCodeMapEntry(Context* native_context, 13538 int SharedFunctionInfo::SearchOptimizedCodeMapEntry(Context* native_context,
13532 BailoutId osr_ast_id) { 13539 BailoutId osr_ast_id) {
13533 DisallowHeapAllocation no_gc; 13540 DisallowHeapAllocation no_gc;
13534 DCHECK(native_context->IsNativeContext()); 13541 DCHECK(native_context->IsNativeContext());
(...skipping 5844 matching lines...) Expand 10 before | Expand all | Expand 10 after
19379 if (cell->value() != *new_value) { 19386 if (cell->value() != *new_value) {
19380 cell->set_value(*new_value); 19387 cell->set_value(*new_value);
19381 Isolate* isolate = cell->GetIsolate(); 19388 Isolate* isolate = cell->GetIsolate();
19382 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19389 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19383 isolate, DependentCode::kPropertyCellChangedGroup); 19390 isolate, DependentCode::kPropertyCellChangedGroup);
19384 } 19391 }
19385 } 19392 }
19386 19393
19387 } // namespace internal 19394 } // namespace internal
19388 } // namespace v8 19395 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698