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

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

Issue 2357583003: [turbofan] Remove bogus constant materialization from frame. (Closed)
Patch Set: Created 4 years, 3 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 | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('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/address-map.h" 7 #include "src/address-map.h"
8 #include "src/base/adapters.h" 8 #include "src/base/adapters.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // knowledge about those fields anyway. 274 // knowledge about those fields anyway.
275 if (index < stackSlotToSpillSlotDelta) continue; 275 if (index < stackSlotToSpillSlotDelta) continue;
276 safepoint.DefinePointerSlot(index, zone()); 276 safepoint.DefinePointerSlot(index, zone());
277 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) { 277 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
278 Register reg = LocationOperand::cast(operand).GetRegister(); 278 Register reg = LocationOperand::cast(operand).GetRegister();
279 safepoint.DefinePointerRegister(reg, zone()); 279 safepoint.DefinePointerRegister(reg, zone());
280 } 280 }
281 } 281 }
282 } 282 }
283 283
284 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object,
285 int* slot_return) {
286 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) {
287 if (*object == info()->context() && !info()->is_osr()) {
288 *slot_return = Frame::kContextSlot;
289 return true;
290 } else if (object.is_identical_to(info()->closure())) {
291 *slot_return = Frame::kJSFunctionSlot;
292 return true;
293 }
294 }
295 return false;
296 }
297
298
299 bool CodeGenerator::IsMaterializableFromRoot( 284 bool CodeGenerator::IsMaterializableFromRoot(
300 Handle<HeapObject> object, Heap::RootListIndex* index_return) { 285 Handle<HeapObject> object, Heap::RootListIndex* index_return) {
301 const CallDescriptor* incoming_descriptor = 286 const CallDescriptor* incoming_descriptor =
302 linkage()->GetIncomingDescriptor(); 287 linkage()->GetIncomingDescriptor();
303 if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) { 288 if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) {
304 RootIndexMap map(isolate()); 289 RootIndexMap map(isolate());
305 int root_index = map.Lookup(*object); 290 int root_index = map.Lookup(*object);
306 if (root_index != RootIndexMap::kInvalidRootIndex) { 291 if (root_index != RootIndexMap::kInvalidRootIndex) {
307 *index_return = static_cast<Heap::RootListIndex>(root_index); 292 *index_return = static_cast<Heap::RootListIndex>(root_index);
308 return true; 293 return true;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 926 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
942 gen->ools_ = this; 927 gen->ools_ = this;
943 } 928 }
944 929
945 930
946 OutOfLineCode::~OutOfLineCode() {} 931 OutOfLineCode::~OutOfLineCode() {}
947 932
948 } // namespace compiler 933 } // namespace compiler
949 } // namespace internal 934 } // namespace internal
950 } // namespace v8 935 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698