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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-ia32.h ('k') | src/interface-descriptors.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 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 LInstruction* LChunkBuilder::DoTrapAllocationMemento( 2386 LInstruction* LChunkBuilder::DoTrapAllocationMemento(
2387 HTrapAllocationMemento* instr) { 2387 HTrapAllocationMemento* instr) {
2388 LOperand* object = UseRegister(instr->object()); 2388 LOperand* object = UseRegister(instr->object());
2389 LOperand* temp = TempRegister(); 2389 LOperand* temp = TempRegister();
2390 LTrapAllocationMemento* result = 2390 LTrapAllocationMemento* result =
2391 new(zone()) LTrapAllocationMemento(object, temp); 2391 new(zone()) LTrapAllocationMemento(object, temp);
2392 return AssignEnvironment(result); 2392 return AssignEnvironment(result);
2393 } 2393 }
2394 2394
2395 2395
2396 LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) {
2397 info()->MarkAsDeferredCalling();
2398 LOperand* context = UseFixed(instr->context(), esi);
2399 LOperand* object = Use(instr->object());
2400 LOperand* elements = Use(instr->elements());
2401 LOperand* key = UseRegisterOrConstant(instr->key());
2402 LOperand* current_capacity = UseRegisterOrConstant(instr->current_capacity());
2403
2404 LMaybeGrowElements* result = new (zone())
2405 LMaybeGrowElements(context, object, elements, key, current_capacity);
2406 DefineFixed(result, eax);
2407 return AssignPointerMap(AssignEnvironment(result));
2408 }
2409
2410
2396 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 2411 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
2397 bool is_in_object = instr->access().IsInobject(); 2412 bool is_in_object = instr->access().IsInobject();
2398 bool is_external_location = instr->access().IsExternalMemory() && 2413 bool is_external_location = instr->access().IsExternalMemory() &&
2399 instr->access().offset() == 0; 2414 instr->access().offset() == 0;
2400 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2415 bool needs_write_barrier = instr->NeedsWriteBarrier();
2401 bool needs_write_barrier_for_map = instr->has_transition() && 2416 bool needs_write_barrier_for_map = instr->has_transition() &&
2402 instr->NeedsWriteBarrierForMap(); 2417 instr->NeedsWriteBarrierForMap();
2403 2418
2404 LOperand* obj; 2419 LOperand* obj;
2405 if (needs_write_barrier) { 2420 if (needs_write_barrier) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 LOperand* function = UseRegisterAtStart(instr->function()); 2745 LOperand* function = UseRegisterAtStart(instr->function());
2731 LAllocateBlockContext* result = 2746 LAllocateBlockContext* result =
2732 new(zone()) LAllocateBlockContext(context, function); 2747 new(zone()) LAllocateBlockContext(context, function);
2733 return MarkAsCall(DefineFixed(result, esi), instr); 2748 return MarkAsCall(DefineFixed(result, esi), instr);
2734 } 2749 }
2735 2750
2736 2751
2737 } } // namespace v8::internal 2752 } } // namespace v8::internal
2738 2753
2739 #endif // V8_TARGET_ARCH_IA32 2754 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698