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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.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.cc ('k') | src/compiler/mips/code-generator-mips.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/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 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 __ mov(dst, src); 2033 __ mov(dst, src);
2034 } else { 2034 } else {
2035 Operand dst = g.ToOperand(destination); 2035 Operand dst = g.ToOperand(destination);
2036 __ push(src); 2036 __ push(src);
2037 __ pop(dst); 2037 __ pop(dst);
2038 } 2038 }
2039 } else if (source->IsConstant()) { 2039 } else if (source->IsConstant()) {
2040 Constant src_constant = g.ToConstant(source); 2040 Constant src_constant = g.ToConstant(source);
2041 if (src_constant.type() == Constant::kHeapObject) { 2041 if (src_constant.type() == Constant::kHeapObject) {
2042 Handle<HeapObject> src = src_constant.ToHeapObject(); 2042 Handle<HeapObject> src = src_constant.ToHeapObject();
2043 int slot; 2043 if (destination->IsRegister()) {
2044 if (IsMaterializableFromFrame(src, &slot)) {
2045 if (destination->IsRegister()) {
2046 Register dst = g.ToRegister(destination);
2047 __ mov(dst, g.SlotToOperand(slot));
2048 } else {
2049 DCHECK(destination->IsStackSlot());
2050 Operand dst = g.ToOperand(destination);
2051 __ push(g.SlotToOperand(slot));
2052 __ pop(dst);
2053 }
2054 } else if (destination->IsRegister()) {
2055 Register dst = g.ToRegister(destination); 2044 Register dst = g.ToRegister(destination);
2056 __ LoadHeapObject(dst, src); 2045 __ LoadHeapObject(dst, src);
2057 } else { 2046 } else {
2058 DCHECK(destination->IsStackSlot()); 2047 DCHECK(destination->IsStackSlot());
2059 Operand dst = g.ToOperand(destination); 2048 Operand dst = g.ToOperand(destination);
2060 AllowDeferredHandleDereference embedding_raw_address; 2049 AllowDeferredHandleDereference embedding_raw_address;
2061 if (isolate()->heap()->InNewSpace(*src)) { 2050 if (isolate()->heap()->InNewSpace(*src)) {
2062 __ PushHeapObject(src); 2051 __ PushHeapObject(src);
2063 __ pop(dst); 2052 __ pop(dst);
2064 } else { 2053 } else {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2257 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2269 __ Nop(padding_size); 2258 __ Nop(padding_size);
2270 } 2259 }
2271 } 2260 }
2272 2261
2273 #undef __ 2262 #undef __
2274 2263
2275 } // namespace compiler 2264 } // namespace compiler
2276 } // namespace internal 2265 } // namespace internal
2277 } // namespace v8 2266 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698