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

Side by Side Diff: src/objects.cc

Issue 1434503003: Revert of [heap] Separate out optimized code map processing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/objects.h ('k') | no next file » | 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 "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 11089 matching lines...) Expand 10 before | Expand all | Expand 10 after
11100 } 11100 }
11101 DCHECK(new_code_map->get(i + kLiteralsOffset)->IsFixedArray()); 11101 DCHECK(new_code_map->get(i + kLiteralsOffset)->IsFixedArray());
11102 DCHECK(new_code_map->get(i + kOsrAstIdOffset)->IsSmi()); 11102 DCHECK(new_code_map->get(i + kOsrAstIdOffset)->IsSmi());
11103 } 11103 }
11104 #endif 11104 #endif
11105 shared->set_optimized_code_map(*new_code_map); 11105 shared->set_optimized_code_map(*new_code_map);
11106 } 11106 }
11107 11107
11108 11108
11109 void SharedFunctionInfo::ClearOptimizedCodeMap() { 11109 void SharedFunctionInfo::ClearOptimizedCodeMap() {
11110 FixedArray* code_map = FixedArray::cast(optimized_code_map());
11111
11112 // If the next map link slot is already used then the function was
11113 // enqueued with code flushing and we remove it now.
11114 if (!code_map->get(kNextMapIndex)->IsUndefined()) {
11115 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher();
11116 flusher->EvictOptimizedCodeMap(this);
11117 }
11118
11119 DCHECK(code_map->get(kNextMapIndex)->IsUndefined());
11110 set_optimized_code_map(Smi::FromInt(0)); 11120 set_optimized_code_map(Smi::FromInt(0));
11111 } 11121 }
11112 11122
11113 11123
11114 void SharedFunctionInfo::EvictFromOptimizedCodeMap(Code* optimized_code, 11124 void SharedFunctionInfo::EvictFromOptimizedCodeMap(Code* optimized_code,
11115 const char* reason) { 11125 const char* reason) {
11116 DisallowHeapAllocation no_gc; 11126 DisallowHeapAllocation no_gc;
11117 if (optimized_code_map()->IsSmi()) return; 11127 if (optimized_code_map()->IsSmi()) return;
11118 11128
11119 Heap* heap = GetHeap(); 11129 Heap* heap = GetHeap();
(...skipping 6750 matching lines...) Expand 10 before | Expand all | Expand 10 after
17870 if (cell->value() != *new_value) { 17880 if (cell->value() != *new_value) {
17871 cell->set_value(*new_value); 17881 cell->set_value(*new_value);
17872 Isolate* isolate = cell->GetIsolate(); 17882 Isolate* isolate = cell->GetIsolate();
17873 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17883 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17874 isolate, DependentCode::kPropertyCellChangedGroup); 17884 isolate, DependentCode::kPropertyCellChangedGroup);
17875 } 17885 }
17876 } 17886 }
17877 17887
17878 } // namespace internal 17888 } // namespace internal
17879 } // namespace v8 17889 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698