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 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 return true; | 195 return true; |
196 } | 196 } |
197 } | 197 } |
198 return false; | 198 return false; |
199 } | 199 } |
200 | 200 |
201 | 201 |
202 bool CodeGenerator::IsMaterializableFromRoot( | 202 bool CodeGenerator::IsMaterializableFromRoot( |
203 Handle<HeapObject> object, Heap::RootListIndex* index_return) { | 203 Handle<HeapObject> object, Heap::RootListIndex* index_return) { |
204 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { | 204 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { |
205 #define IMMORTAL_IMMOVABLE_ROOT(Name) \ | 205 return isolate()->heap()->GetRootListIndex(object, index_return); |
206 if (*object == isolate()->heap()->root(Heap::k##Name##RootIndex)) { \ | |
207 *index_return = Heap::k##Name##RootIndex; \ | |
208 return true; \ | |
209 } | |
210 IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT) | |
211 #undef IMMORTAL_IMMOVABLE_ROOT | |
212 } | 206 } |
213 return false; | 207 return false; |
214 } | 208 } |
215 | 209 |
216 | 210 |
217 void CodeGenerator::AssembleInstruction(Instruction* instr) { | 211 void CodeGenerator::AssembleInstruction(Instruction* instr) { |
218 AssembleGaps(instr); | 212 AssembleGaps(instr); |
219 AssembleSourcePosition(instr); | 213 AssembleSourcePosition(instr); |
220 // Assemble architecture-specific code for the instruction. | 214 // Assemble architecture-specific code for the instruction. |
221 AssembleArchInstruction(instr); | 215 AssembleArchInstruction(instr); |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 : masm_(gen->masm()), next_(gen->ools_) { | 660 : masm_(gen->masm()), next_(gen->ools_) { |
667 gen->ools_ = this; | 661 gen->ools_ = this; |
668 } | 662 } |
669 | 663 |
670 | 664 |
671 OutOfLineCode::~OutOfLineCode() {} | 665 OutOfLineCode::~OutOfLineCode() {} |
672 | 666 |
673 } // namespace compiler | 667 } // namespace compiler |
674 } // namespace internal | 668 } // namespace internal |
675 } // namespace v8 | 669 } // namespace v8 |
OLD | NEW |