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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.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/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 } 1932 }
1933 } else if (source->IsConstant()) { 1933 } else if (source->IsConstant()) {
1934 Constant src = g.ToConstant(ConstantOperand::cast(source)); 1934 Constant src = g.ToConstant(ConstantOperand::cast(source));
1935 if (destination->IsRegister() || destination->IsStackSlot()) { 1935 if (destination->IsRegister() || destination->IsStackSlot()) {
1936 UseScratchRegisterScope scope(masm()); 1936 UseScratchRegisterScope scope(masm());
1937 Register dst = destination->IsRegister() ? g.ToRegister(destination) 1937 Register dst = destination->IsRegister() ? g.ToRegister(destination)
1938 : scope.AcquireX(); 1938 : scope.AcquireX();
1939 if (src.type() == Constant::kHeapObject) { 1939 if (src.type() == Constant::kHeapObject) {
1940 Handle<HeapObject> src_object = src.ToHeapObject(); 1940 Handle<HeapObject> src_object = src.ToHeapObject();
1941 Heap::RootListIndex index; 1941 Heap::RootListIndex index;
1942 int slot; 1942 if (IsMaterializableFromRoot(src_object, &index)) {
1943 if (IsMaterializableFromFrame(src_object, &slot)) {
1944 __ Ldr(dst, g.SlotToMemOperand(slot, masm()));
1945 } else if (IsMaterializableFromRoot(src_object, &index)) {
1946 __ LoadRoot(dst, index); 1943 __ LoadRoot(dst, index);
1947 } else { 1944 } else {
1948 __ LoadObject(dst, src_object); 1945 __ LoadObject(dst, src_object);
1949 } 1946 }
1950 } else { 1947 } else {
1951 __ Mov(dst, g.ToImmediate(source)); 1948 __ Mov(dst, g.ToImmediate(source));
1952 } 1949 }
1953 if (destination->IsStackSlot()) { 1950 if (destination->IsStackSlot()) {
1954 __ Str(dst, g.ToMemOperand(destination, masm())); 1951 __ Str(dst, g.ToMemOperand(destination, masm()));
1955 } 1952 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 padding_size -= kInstructionSize; 2082 padding_size -= kInstructionSize;
2086 } 2083 }
2087 } 2084 }
2088 } 2085 }
2089 2086
2090 #undef __ 2087 #undef __
2091 2088
2092 } // namespace compiler 2089 } // namespace compiler
2093 } // namespace internal 2090 } // namespace internal
2094 } // namespace v8 2091 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698