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

Side by Side Diff: src/compiler.cc

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

Powered by Google App Engine
This is Rietveld 408576698