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

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

Issue 1977833002: MIPS64: Fix allocation folding test failures. (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 | « no previous file | no next file » | 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/mips64/lithium-mips64.h" 5 #include "src/crankshaft/mips64/lithium-mips64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { 2296 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
2297 LOperand* char_code = UseRegister(instr->value()); 2297 LOperand* char_code = UseRegister(instr->value());
2298 LOperand* context = UseAny(instr->context()); 2298 LOperand* context = UseAny(instr->context());
2299 LStringCharFromCode* result = 2299 LStringCharFromCode* result =
2300 new(zone()) LStringCharFromCode(context, char_code); 2300 new(zone()) LStringCharFromCode(context, char_code);
2301 return AssignPointerMap(DefineAsRegister(result)); 2301 return AssignPointerMap(DefineAsRegister(result));
2302 } 2302 }
2303 2303
2304 2304
2305 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { 2305 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2306 info()->MarkAsDeferredCalling();
2307 LOperand* context = UseAny(instr->context());
2308 LOperand* size = UseRegisterOrConstant(instr->size()); 2306 LOperand* size = UseRegisterOrConstant(instr->size());
2309 LOperand* temp1 = TempRegister(); 2307 LOperand* temp1 = TempRegister();
2310 LOperand* temp2 = TempRegister(); 2308 LOperand* temp2 = TempRegister();
2311 LAllocate* result = new(zone()) LAllocate(context, size, temp1, temp2); 2309 if (instr->IsAllocationFolded()) {
2312 return AssignPointerMap(DefineAsRegister(result)); 2310 LFastAllocate* result = new (zone()) LFastAllocate(size, temp1, temp2);
2311 return DefineAsRegister(result);
2312 } else {
2313 info()->MarkAsDeferredCalling();
2314 LOperand* context = UseAny(instr->context());
2315 LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2);
2316 return AssignPointerMap(DefineAsRegister(result));
2317 }
2313 } 2318 }
2314 2319
2315 2320
2316 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2321 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2317 DCHECK(argument_count_ == 0); 2322 DCHECK(argument_count_ == 0);
2318 allocator_->MarkAsOsrEntry(); 2323 allocator_->MarkAsOsrEntry();
2319 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2324 current_block_->last_environment()->set_ast_id(instr->ast_id());
2320 return AssignEnvironment(new(zone()) LOsrEntry); 2325 return AssignEnvironment(new(zone()) LOsrEntry);
2321 } 2326 }
2322 2327
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 LOperand* index = UseTempRegister(instr->index()); 2482 LOperand* index = UseTempRegister(instr->index());
2478 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2483 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2479 LInstruction* result = DefineSameAsFirst(load); 2484 LInstruction* result = DefineSameAsFirst(load);
2480 return AssignPointerMap(result); 2485 return AssignPointerMap(result);
2481 } 2486 }
2482 2487
2483 } // namespace internal 2488 } // namespace internal
2484 } // namespace v8 2489 } // namespace v8
2485 2490
2486 #endif // V8_TARGET_ARCH_MIPS64 2491 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698