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

Side by Side Diff: src/arm/lithium-arm.cc

Issue 1124443004: New hydrogen instruction to reduce cost of growing an array on keyed stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/arm/lithium-codegen-arm.h" 9 #include "src/arm/lithium-codegen-arm.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 LInstruction* LChunkBuilder::DoTrapAllocationMemento( 2362 LInstruction* LChunkBuilder::DoTrapAllocationMemento(
2363 HTrapAllocationMemento* instr) { 2363 HTrapAllocationMemento* instr) {
2364 LOperand* object = UseRegister(instr->object()); 2364 LOperand* object = UseRegister(instr->object());
2365 LOperand* temp = TempRegister(); 2365 LOperand* temp = TempRegister();
2366 LTrapAllocationMemento* result = 2366 LTrapAllocationMemento* result =
2367 new(zone()) LTrapAllocationMemento(object, temp); 2367 new(zone()) LTrapAllocationMemento(object, temp);
2368 return AssignEnvironment(result); 2368 return AssignEnvironment(result);
2369 } 2369 }
2370 2370
2371 2371
2372 LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) {
2373 info()->MarkAsDeferredCalling();
2374 LOperand* context = UseFixed(instr->context(), cp);
2375 LOperand* object = Use(instr->object());
2376 LOperand* elements = Use(instr->elements());
2377 LOperand* key = UseRegisterOrConstant(instr->key());
2378 LOperand* current_capacity = UseRegisterOrConstant(instr->current_capacity());
2379
2380 LMaybeGrowElements* result = new (zone())
2381 LMaybeGrowElements(context, object, elements, key, current_capacity);
2382 DefineFixed(result, r0);
2383 return AssignPointerMap(AssignEnvironment(result));
2384 }
2385
2386
2372 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 2387 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
2373 bool is_in_object = instr->access().IsInobject(); 2388 bool is_in_object = instr->access().IsInobject();
2374 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2389 bool needs_write_barrier = instr->NeedsWriteBarrier();
2375 bool needs_write_barrier_for_map = instr->has_transition() && 2390 bool needs_write_barrier_for_map = instr->has_transition() &&
2376 instr->NeedsWriteBarrierForMap(); 2391 instr->NeedsWriteBarrierForMap();
2377 2392
2378 LOperand* obj; 2393 LOperand* obj;
2379 if (needs_write_barrier) { 2394 if (needs_write_barrier) {
2380 obj = is_in_object 2395 obj = is_in_object
2381 ? UseRegister(instr->object()) 2396 ? UseRegister(instr->object())
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2680 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2666 HAllocateBlockContext* instr) { 2681 HAllocateBlockContext* instr) {
2667 LOperand* context = UseFixed(instr->context(), cp); 2682 LOperand* context = UseFixed(instr->context(), cp);
2668 LOperand* function = UseRegisterAtStart(instr->function()); 2683 LOperand* function = UseRegisterAtStart(instr->function());
2669 LAllocateBlockContext* result = 2684 LAllocateBlockContext* result =
2670 new(zone()) LAllocateBlockContext(context, function); 2685 new(zone()) LAllocateBlockContext(context, function);
2671 return MarkAsCall(DefineFixed(result, cp), instr); 2686 return MarkAsCall(DefineFixed(result, cp), instr);
2672 } 2687 }
2673 2688
2674 } } // namespace v8::internal 2689 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698