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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1178853002: [heap] Unify the immortal immovable root detection mechanism. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use the right predicate during code generation. Created 5 years, 6 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/heap/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) { 223 Heap::RootListIndex index;
224 return isolate()->heap()->GetRootListIndex(object, index_return); 224 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall() &&
225 isolate()->heap()->GetRootListIndex(*object, &index) &&
226 !Heap::RootCanBeWrittenAfterInitialization(index)) {
227 *index_return = index;
228 return true;
225 } 229 }
226 return false; 230 return false;
227 } 231 }
228 232
229 233
230 void CodeGenerator::AssembleInstruction(Instruction* instr) { 234 void CodeGenerator::AssembleInstruction(Instruction* instr) {
231 AssembleGaps(instr); 235 AssembleGaps(instr);
232 AssembleSourcePosition(instr); 236 AssembleSourcePosition(instr);
233 // Assemble architecture-specific code for the instruction. 237 // Assemble architecture-specific code for the instruction.
234 AssembleArchInstruction(instr); 238 AssembleArchInstruction(instr);
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 : masm_(gen->masm()), next_(gen->ools_) { 686 : masm_(gen->masm()), next_(gen->ools_) {
683 gen->ools_ = this; 687 gen->ools_ = this;
684 } 688 }
685 689
686 690
687 OutOfLineCode::~OutOfLineCode() {} 691 OutOfLineCode::~OutOfLineCode() {}
688 692
689 } // namespace compiler 693 } // namespace compiler
690 } // namespace internal 694 } // namespace internal
691 } // namespace v8 695 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698