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

Side by Side Diff: src/compiler.cc

Issue 2809923002: Unify implementations of Map handles vectors and lists (Closed)
Patch Set: Review feedback Created 3 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 | « no previous file | src/compiler/access-info.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 heap->AddWeakObjectToCodeDependency(object, dep); 225 heap->AddWeakObjectToCodeDependency(object, dep);
226 } 226 }
227 } 227 }
228 228
229 } // namespace 229 } // namespace
230 230
231 void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) { 231 void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
232 // TODO(turbofan): Move this to pipeline.cc once Crankshaft dies. 232 // TODO(turbofan): Move this to pipeline.cc once Crankshaft dies.
233 Isolate* const isolate = code->GetIsolate(); 233 Isolate* const isolate = code->GetIsolate();
234 DCHECK(code->is_optimized_code()); 234 DCHECK(code->is_optimized_code());
235 std::vector<Handle<Map>> maps; 235 MapHandles maps;
236 std::vector<Handle<HeapObject>> objects; 236 std::vector<Handle<HeapObject>> objects;
237 { 237 {
238 DisallowHeapAllocation no_gc; 238 DisallowHeapAllocation no_gc;
239 int const mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 239 int const mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
240 RelocInfo::ModeMask(RelocInfo::CELL); 240 RelocInfo::ModeMask(RelocInfo::CELL);
241 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) { 241 for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
242 RelocInfo::Mode mode = it.rinfo()->rmode(); 242 RelocInfo::Mode mode = it.rinfo()->rmode();
243 if (mode == RelocInfo::CELL && 243 if (mode == RelocInfo::CELL &&
244 code->IsWeakObjectInOptimizedCode(it.rinfo()->target_cell())) { 244 code->IsWeakObjectInOptimizedCode(it.rinfo()->target_cell())) {
245 objects.push_back(handle(it.rinfo()->target_cell(), isolate)); 245 objects.push_back(handle(it.rinfo()->target_cell(), isolate));
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 } 1887 }
1888 1888
1889 if (shared->is_compiled()) { 1889 if (shared->is_compiled()) {
1890 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1890 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1891 JSFunction::EnsureLiterals(function); 1891 JSFunction::EnsureLiterals(function);
1892 } 1892 }
1893 } 1893 }
1894 1894
1895 } // namespace internal 1895 } // namespace internal
1896 } // namespace v8 1896 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/access-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698