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

Side by Side Diff: src/crankshaft/mips/lithium-mips.cc

Issue 1899813003: [crankshaft] Fragmentation-free allocation folding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/crankshaft/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/crankshaft/mips/lithium-mips.h" 5 #include "src/crankshaft/mips/lithium-mips.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { 2291 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
2292 LOperand* char_code = UseRegister(instr->value()); 2292 LOperand* char_code = UseRegister(instr->value());
2293 LOperand* context = UseAny(instr->context()); 2293 LOperand* context = UseAny(instr->context());
2294 LStringCharFromCode* result = 2294 LStringCharFromCode* result =
2295 new(zone()) LStringCharFromCode(context, char_code); 2295 new(zone()) LStringCharFromCode(context, char_code);
2296 return AssignPointerMap(DefineAsRegister(result)); 2296 return AssignPointerMap(DefineAsRegister(result));
2297 } 2297 }
2298 2298
2299 2299
2300 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { 2300 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2301 info()->MarkAsDeferredCalling();
2302 LOperand* context = UseAny(instr->context());
2303 LOperand* size = UseRegisterOrConstant(instr->size()); 2301 LOperand* size = UseRegisterOrConstant(instr->size());
2304 LOperand* temp1 = TempRegister(); 2302 LOperand* temp1 = TempRegister();
2305 LOperand* temp2 = TempRegister(); 2303 LOperand* temp2 = TempRegister();
2306 LAllocate* result = new(zone()) LAllocate(context, size, temp1, temp2); 2304 if (instr->IsAllocationFolded()) {
2307 return AssignPointerMap(DefineAsRegister(result)); 2305 LFastAllocate* result = new (zone()) LFastAllocate(size, temp1, temp2);
2306 return DefineAsRegister(result);
2307 } else {
2308 info()->MarkAsDeferredCalling();
2309 LOperand* context = UseAny(instr->context());
2310 LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2);
2311 return AssignPointerMap(DefineAsRegister(result));
2312 }
2308 } 2313 }
2309 2314
2310 2315
2311 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2316 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2312 DCHECK(argument_count_ == 0); 2317 DCHECK(argument_count_ == 0);
2313 allocator_->MarkAsOsrEntry(); 2318 allocator_->MarkAsOsrEntry();
2314 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2319 current_block_->last_environment()->set_ast_id(instr->ast_id());
2315 return AssignEnvironment(new(zone()) LOsrEntry); 2320 return AssignEnvironment(new(zone()) LOsrEntry);
2316 } 2321 }
2317 2322
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 LOperand* index = UseTempRegister(instr->index()); 2477 LOperand* index = UseTempRegister(instr->index());
2473 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2478 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2474 LInstruction* result = DefineSameAsFirst(load); 2479 LInstruction* result = DefineSameAsFirst(load);
2475 return AssignPointerMap(result); 2480 return AssignPointerMap(result);
2476 } 2481 }
2477 2482
2478 } // namespace internal 2483 } // namespace internal
2479 } // namespace v8 2484 } // namespace v8
2480 2485
2481 #endif // V8_TARGET_ARCH_MIPS 2486 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698