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

Side by Side Diff: src/crankshaft/x87/lithium-x87.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/x87/lithium-x87.h ('k') | src/heap/spaces.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/x87/lithium-x87.h" 5 #include "src/crankshaft/x87/lithium-x87.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { 2392 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
2393 LOperand* char_code = UseRegister(instr->value()); 2393 LOperand* char_code = UseRegister(instr->value());
2394 LOperand* context = UseAny(instr->context()); 2394 LOperand* context = UseAny(instr->context());
2395 LStringCharFromCode* result = 2395 LStringCharFromCode* result =
2396 new(zone()) LStringCharFromCode(context, char_code); 2396 new(zone()) LStringCharFromCode(context, char_code);
2397 return AssignPointerMap(DefineAsRegister(result)); 2397 return AssignPointerMap(DefineAsRegister(result));
2398 } 2398 }
2399 2399
2400 2400
2401 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { 2401 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2402 info()->MarkAsDeferredCalling(); 2402 LOperand* size = instr->size()->IsConstant() ? UseConstant(instr->size())
2403 LOperand* context = UseAny(instr->context()); 2403 : UseRegister(instr->size());
2404 LOperand* size = instr->size()->IsConstant() 2404 if (instr->IsAllocationFolded()) {
2405 ? UseConstant(instr->size()) 2405 LOperand* temp = TempRegister();
2406 : UseTempRegister(instr->size()); 2406 LFastAllocate* result = new (zone()) LFastAllocate(size, temp);
2407 LOperand* temp = TempRegister(); 2407 return DefineAsRegister(result);
2408 LAllocate* result = new(zone()) LAllocate(context, size, temp); 2408 } else {
2409 return AssignPointerMap(DefineAsRegister(result)); 2409 info()->MarkAsDeferredCalling();
2410 LOperand* context = UseAny(instr->context());
2411 LOperand* temp = TempRegister();
2412 LAllocate* result = new (zone()) LAllocate(context, size, temp);
2413 return AssignPointerMap(DefineAsRegister(result));
2414 }
2410 } 2415 }
2411 2416
2412 2417
2413 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2418 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2414 DCHECK(argument_count_ == 0); 2419 DCHECK(argument_count_ == 0);
2415 allocator_->MarkAsOsrEntry(); 2420 allocator_->MarkAsOsrEntry();
2416 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2421 current_block_->last_environment()->set_ast_id(instr->ast_id());
2417 return AssignEnvironment(new(zone()) LOsrEntry); 2422 return AssignEnvironment(new(zone()) LOsrEntry);
2418 } 2423 }
2419 2424
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 LOperand* index = UseTempRegister(instr->index()); 2587 LOperand* index = UseTempRegister(instr->index());
2583 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2588 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2584 LInstruction* result = DefineSameAsFirst(load); 2589 LInstruction* result = DefineSameAsFirst(load);
2585 return AssignPointerMap(result); 2590 return AssignPointerMap(result);
2586 } 2591 }
2587 2592
2588 } // namespace internal 2593 } // namespace internal
2589 } // namespace v8 2594 } // namespace v8
2590 2595
2591 #endif // V8_TARGET_ARCH_X87 2596 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698