| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 *offset_return = JavaScriptFrameConstants::kFunctionOffset; | 213 *offset_return = JavaScriptFrameConstants::kFunctionOffset; |
| 214 return true; | 214 return true; |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 return false; | 217 return false; |
| 218 } | 218 } |
| 219 | 219 |
| 220 | 220 |
| 221 bool CodeGenerator::IsMaterializableFromRoot( | 221 bool CodeGenerator::IsMaterializableFromRoot( |
| 222 Handle<HeapObject> object, Heap::RootListIndex* index_return) { | 222 Handle<HeapObject> object, Heap::RootListIndex* index_return) { |
| 223 Heap::RootListIndex index; | 223 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { |
| 224 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall() && | 224 return isolate()->heap()->GetRootListIndex(object, index_return); |
| 225 isolate()->heap()->GetRootListIndex(*object, &index) && | |
| 226 !Heap::RootCanBeWrittenAfterInitialization(index)) { | |
| 227 *index_return = index; | |
| 228 return true; | |
| 229 } | 225 } |
| 230 return false; | 226 return false; |
| 231 } | 227 } |
| 232 | 228 |
| 233 | 229 |
| 234 void CodeGenerator::AssembleInstruction(Instruction* instr) { | 230 void CodeGenerator::AssembleInstruction(Instruction* instr) { |
| 235 AssembleGaps(instr); | 231 AssembleGaps(instr); |
| 236 AssembleSourcePosition(instr); | 232 AssembleSourcePosition(instr); |
| 237 // Assemble architecture-specific code for the instruction. | 233 // Assemble architecture-specific code for the instruction. |
| 238 AssembleArchInstruction(instr); | 234 AssembleArchInstruction(instr); |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 : masm_(gen->masm()), next_(gen->ools_) { | 682 : masm_(gen->masm()), next_(gen->ools_) { |
| 687 gen->ools_ = this; | 683 gen->ools_ = this; |
| 688 } | 684 } |
| 689 | 685 |
| 690 | 686 |
| 691 OutOfLineCode::~OutOfLineCode() {} | 687 OutOfLineCode::~OutOfLineCode() {} |
| 692 | 688 |
| 693 } // namespace compiler | 689 } // namespace compiler |
| 694 } // namespace internal | 690 } // namespace internal |
| 695 } // namespace v8 | 691 } // namespace v8 |
| OLD | NEW |