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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 *offset_return = JavaScriptFrameConstants::kFunctionOffset; | 238 *offset_return = JavaScriptFrameConstants::kFunctionOffset; |
239 return true; | 239 return true; |
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 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { | 248 const CallDescriptor* incoming_descriptor = |
| 249 linkage()->GetIncomingDescriptor(); |
| 250 if (incoming_descriptor->IsJSFunctionCall() || |
| 251 incoming_descriptor->IsInterpreterDispatch()) { |
249 RootIndexMap map(isolate()); | 252 RootIndexMap map(isolate()); |
250 int root_index = map.Lookup(*object); | 253 int root_index = map.Lookup(*object); |
251 if (root_index != RootIndexMap::kInvalidRootIndex) { | 254 if (root_index != RootIndexMap::kInvalidRootIndex) { |
252 *index_return = static_cast<Heap::RootListIndex>(root_index); | 255 *index_return = static_cast<Heap::RootListIndex>(root_index); |
253 return true; | 256 return true; |
254 } | 257 } |
255 } | 258 } |
256 return false; | 259 return false; |
257 } | 260 } |
258 | 261 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 : masm_(gen->masm()), next_(gen->ools_) { | 715 : masm_(gen->masm()), next_(gen->ools_) { |
713 gen->ools_ = this; | 716 gen->ools_ = this; |
714 } | 717 } |
715 | 718 |
716 | 719 |
717 OutOfLineCode::~OutOfLineCode() {} | 720 OutOfLineCode::~OutOfLineCode() {} |
718 | 721 |
719 } // namespace compiler | 722 } // namespace compiler |
720 } // namespace internal | 723 } // namespace internal |
721 } // namespace v8 | 724 } // namespace v8 |
OLD | NEW |