OLD | NEW |
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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap | 10 #include "src/snapshot/serialize.h" // TODO(turbofan): RootIndexMap |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 240 } |
241 } | 241 } |
242 return false; | 242 return false; |
243 } | 243 } |
244 | 244 |
245 | 245 |
246 bool CodeGenerator::IsMaterializableFromRoot( | 246 bool CodeGenerator::IsMaterializableFromRoot( |
247 Handle<HeapObject> object, Heap::RootListIndex* index_return) { | 247 Handle<HeapObject> object, Heap::RootListIndex* index_return) { |
248 const CallDescriptor* incoming_descriptor = | 248 const CallDescriptor* incoming_descriptor = |
249 linkage()->GetIncomingDescriptor(); | 249 linkage()->GetIncomingDescriptor(); |
250 if (incoming_descriptor->IsJSFunctionCall() || | 250 if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) { |
251 incoming_descriptor->IsInterpreterDispatch()) { | |
252 RootIndexMap map(isolate()); | 251 RootIndexMap map(isolate()); |
253 int root_index = map.Lookup(*object); | 252 int root_index = map.Lookup(*object); |
254 if (root_index != RootIndexMap::kInvalidRootIndex) { | 253 if (root_index != RootIndexMap::kInvalidRootIndex) { |
255 *index_return = static_cast<Heap::RootListIndex>(root_index); | 254 *index_return = static_cast<Heap::RootListIndex>(root_index); |
256 return true; | 255 return true; |
257 } | 256 } |
258 } | 257 } |
259 return false; | 258 return false; |
260 } | 259 } |
261 | 260 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 : masm_(gen->masm()), next_(gen->ools_) { | 714 : masm_(gen->masm()), next_(gen->ools_) { |
716 gen->ools_ = this; | 715 gen->ools_ = this; |
717 } | 716 } |
718 | 717 |
719 | 718 |
720 OutOfLineCode::~OutOfLineCode() {} | 719 OutOfLineCode::~OutOfLineCode() {} |
721 | 720 |
722 } // namespace compiler | 721 } // namespace compiler |
723 } // namespace internal | 722 } // namespace internal |
724 } // namespace v8 | 723 } // namespace v8 |
OLD | NEW |