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

Side by Side Diff: src/crankshaft/arm/lithium-arm.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/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-arm.h" 5 #include "src/crankshaft/arm/lithium-arm.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" 9 #include "src/crankshaft/arm/lithium-codegen-arm.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { 2344 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
2345 LOperand* char_code = UseRegister(instr->value()); 2345 LOperand* char_code = UseRegister(instr->value());
2346 LOperand* context = UseAny(instr->context()); 2346 LOperand* context = UseAny(instr->context());
2347 LStringCharFromCode* result = 2347 LStringCharFromCode* result =
2348 new(zone()) LStringCharFromCode(context, char_code); 2348 new(zone()) LStringCharFromCode(context, char_code);
2349 return AssignPointerMap(DefineAsRegister(result)); 2349 return AssignPointerMap(DefineAsRegister(result));
2350 } 2350 }
2351 2351
2352 2352
2353 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { 2353 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2354 info()->MarkAsDeferredCalling();
2355 LOperand* context = UseAny(instr->context());
2356 LOperand* size = UseRegisterOrConstant(instr->size()); 2354 LOperand* size = UseRegisterOrConstant(instr->size());
2357 LOperand* temp1 = TempRegister(); 2355 LOperand* temp1 = TempRegister();
2358 LOperand* temp2 = TempRegister(); 2356 LOperand* temp2 = TempRegister();
2359 LAllocate* result = new(zone()) LAllocate(context, size, temp1, temp2); 2357 if (instr->IsAllocationFolded()) {
2360 return AssignPointerMap(DefineAsRegister(result)); 2358 LFastAllocate* result = new (zone()) LFastAllocate(size, temp1, temp2);
2359 return DefineAsRegister(result);
2360 } else {
2361 info()->MarkAsDeferredCalling();
2362 LOperand* context = UseAny(instr->context());
2363 LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2);
2364 return AssignPointerMap(DefineAsRegister(result));
2365 }
2361 } 2366 }
2362 2367
2363 2368
2364 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2369 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2365 DCHECK(argument_count_ == 0); 2370 DCHECK(argument_count_ == 0);
2366 allocator_->MarkAsOsrEntry(); 2371 allocator_->MarkAsOsrEntry();
2367 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2372 current_block_->last_environment()->set_ast_id(instr->ast_id());
2368 return AssignEnvironment(new(zone()) LOsrEntry); 2373 return AssignEnvironment(new(zone()) LOsrEntry);
2369 } 2374 }
2370 2375
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2528 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2524 LOperand* object = UseRegister(instr->object()); 2529 LOperand* object = UseRegister(instr->object());
2525 LOperand* index = UseTempRegister(instr->index()); 2530 LOperand* index = UseTempRegister(instr->index());
2526 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2531 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2527 LInstruction* result = DefineSameAsFirst(load); 2532 LInstruction* result = DefineSameAsFirst(load);
2528 return AssignPointerMap(result); 2533 return AssignPointerMap(result);
2529 } 2534 }
2530 2535
2531 } // namespace internal 2536 } // namespace internal
2532 } // namespace v8 2537 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698