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

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

Issue 1085693003: MIPS: [turbofan] Load immortal heap objects from the heap roots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/compiler/mips64/code-generator-mips64.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 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 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/mips/macro-assembler-mips.h" 9 #include "src/mips/macro-assembler-mips.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 UNREACHABLE(); 1133 UNREACHABLE();
1134 break; 1134 break;
1135 case Constant::kFloat64: 1135 case Constant::kFloat64:
1136 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 1136 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
1137 break; 1137 break;
1138 case Constant::kExternalReference: 1138 case Constant::kExternalReference:
1139 __ li(dst, Operand(src.ToExternalReference())); 1139 __ li(dst, Operand(src.ToExternalReference()));
1140 break; 1140 break;
1141 case Constant::kHeapObject: { 1141 case Constant::kHeapObject: {
1142 Handle<HeapObject> src_object = src.ToHeapObject(); 1142 Handle<HeapObject> src_object = src.ToHeapObject();
1143 if (info()->IsOptimizing() && 1143 Heap::RootListIndex index;
1144 src_object.is_identical_to(info()->context())) { 1144 int offset;
1145 // Loading the context from the frame is way cheaper than 1145 if (IsMaterializableFromFrame(src_object, &offset)) {
1146 // materializing the actual context heap object address. 1146 __ lw(dst, MemOperand(fp, offset));
1147 __ lw(dst, MemOperand(fp, StandardFrameConstants::kContextOffset)); 1147 } else if (IsMaterializableFromRoot(src_object, &index)) {
1148 } else if (info()->IsOptimizing() && 1148 __ LoadRoot(dst, index);
1149 src_object.is_identical_to(info()->closure())) {
1150 // Loading the JSFunction from the frame is way cheaper than
1151 // materializing the actual JSFunction heap object address.
1152 __ lw(dst,
1153 MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
1154 } else { 1149 } else {
1155 __ li(dst, src_object); 1150 __ li(dst, src_object);
1156 } 1151 }
1157 break; 1152 break;
1158 } 1153 }
1159 case Constant::kRpoNumber: 1154 case Constant::kRpoNumber:
1160 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips. 1155 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips.
1161 break; 1156 break;
1162 } 1157 }
1163 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination)); 1158 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination));
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1299 }
1305 } 1300 }
1306 MarkLazyDeoptSite(); 1301 MarkLazyDeoptSite();
1307 } 1302 }
1308 1303
1309 #undef __ 1304 #undef __
1310 1305
1311 } // namespace compiler 1306 } // namespace compiler
1312 } // namespace internal 1307 } // namespace internal
1313 } // namespace v8 1308 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698