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

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

Issue 2369463002: Merged: [turbofan] Remove bogus constant materialization from frame. (Closed)
Patch Set: Created 4 years, 2 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/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // knowledge about those fields anyway. 271 // knowledge about those fields anyway.
272 if (index < stackSlotToSpillSlotDelta) continue; 272 if (index < stackSlotToSpillSlotDelta) continue;
273 safepoint.DefinePointerSlot(index, zone()); 273 safepoint.DefinePointerSlot(index, zone());
274 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) { 274 } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
275 Register reg = LocationOperand::cast(operand).GetRegister(); 275 Register reg = LocationOperand::cast(operand).GetRegister();
276 safepoint.DefinePointerRegister(reg, zone()); 276 safepoint.DefinePointerRegister(reg, zone());
277 } 277 }
278 } 278 }
279 } 279 }
280 280
281 bool CodeGenerator::IsMaterializableFromFrame(Handle<HeapObject> object,
282 int* slot_return) {
283 if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) {
284 if (object.is_identical_to(info()->context()) && !info()->is_osr()) {
285 *slot_return = Frame::kContextSlot;
286 return true;
287 } else if (object.is_identical_to(info()->closure())) {
288 *slot_return = Frame::kJSFunctionSlot;
289 return true;
290 }
291 }
292 return false;
293 }
294
295
296 bool CodeGenerator::IsMaterializableFromRoot( 281 bool CodeGenerator::IsMaterializableFromRoot(
297 Handle<HeapObject> object, Heap::RootListIndex* index_return) { 282 Handle<HeapObject> object, Heap::RootListIndex* index_return) {
298 const CallDescriptor* incoming_descriptor = 283 const CallDescriptor* incoming_descriptor =
299 linkage()->GetIncomingDescriptor(); 284 linkage()->GetIncomingDescriptor();
300 if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) { 285 if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) {
301 RootIndexMap map(isolate()); 286 RootIndexMap map(isolate());
302 int root_index = map.Lookup(*object); 287 int root_index = map.Lookup(*object);
303 if (root_index != RootIndexMap::kInvalidRootIndex) { 288 if (root_index != RootIndexMap::kInvalidRootIndex) {
304 *index_return = static_cast<Heap::RootListIndex>(root_index); 289 *index_return = static_cast<Heap::RootListIndex>(root_index);
305 return true; 290 return true;
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 921 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
937 gen->ools_ = this; 922 gen->ools_ = this;
938 } 923 }
939 924
940 925
941 OutOfLineCode::~OutOfLineCode() {} 926 OutOfLineCode::~OutOfLineCode() {}
942 927
943 } // namespace compiler 928 } // namespace compiler
944 } // namespace internal 929 } // namespace internal
945 } // namespace v8 930 } // 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