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

Side by Side Diff: src/compiler/x87/code-generator-x87.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/x64/code-generator-x64.cc ('k') | test/mjsunit/regress/regress-crbug-648539.js » ('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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 __ mov(dst, src); 2513 __ mov(dst, src);
2514 } else { 2514 } else {
2515 Operand dst = g.ToOperand(destination); 2515 Operand dst = g.ToOperand(destination);
2516 __ push(src); 2516 __ push(src);
2517 __ pop(dst); 2517 __ pop(dst);
2518 } 2518 }
2519 } else if (source->IsConstant()) { 2519 } else if (source->IsConstant()) {
2520 Constant src_constant = g.ToConstant(source); 2520 Constant src_constant = g.ToConstant(source);
2521 if (src_constant.type() == Constant::kHeapObject) { 2521 if (src_constant.type() == Constant::kHeapObject) {
2522 Handle<HeapObject> src = src_constant.ToHeapObject(); 2522 Handle<HeapObject> src = src_constant.ToHeapObject();
2523 int slot; 2523 if (destination->IsRegister()) {
2524 if (IsMaterializableFromFrame(src, &slot)) {
2525 if (destination->IsRegister()) {
2526 Register dst = g.ToRegister(destination);
2527 __ mov(dst, g.SlotToOperand(slot));
2528 } else {
2529 DCHECK(destination->IsStackSlot());
2530 Operand dst = g.ToOperand(destination);
2531 __ push(g.SlotToOperand(slot));
2532 __ pop(dst);
2533 }
2534 } else if (destination->IsRegister()) {
2535 Register dst = g.ToRegister(destination); 2524 Register dst = g.ToRegister(destination);
2536 __ LoadHeapObject(dst, src); 2525 __ LoadHeapObject(dst, src);
2537 } else { 2526 } else {
2538 DCHECK(destination->IsStackSlot()); 2527 DCHECK(destination->IsStackSlot());
2539 Operand dst = g.ToOperand(destination); 2528 Operand dst = g.ToOperand(destination);
2540 AllowDeferredHandleDereference embedding_raw_address; 2529 AllowDeferredHandleDereference embedding_raw_address;
2541 if (isolate()->heap()->InNewSpace(*src)) { 2530 if (isolate()->heap()->InNewSpace(*src)) {
2542 __ PushHeapObject(src); 2531 __ PushHeapObject(src);
2543 __ pop(dst); 2532 __ pop(dst);
2544 } else { 2533 } else {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2716 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2728 __ Nop(padding_size); 2717 __ Nop(padding_size);
2729 } 2718 }
2730 } 2719 }
2731 2720
2732 #undef __ 2721 #undef __
2733 2722
2734 } // namespace compiler 2723 } // namespace compiler
2735 } // namespace internal 2724 } // namespace internal
2736 } // namespace v8 2725 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | test/mjsunit/regress/regress-crbug-648539.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698