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

Side by Side Diff: src/ic/x87/handler-compiler-x87.cc

Issue 587203002: ExtendStorageStub added, it is aimed for extending objects backing store when it runs out of space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 __ fstp_d(FieldOperand(storage_reg, HeapNumber::kValueOffset)); 385 __ fstp_d(FieldOperand(storage_reg, HeapNumber::kValueOffset));
386 } 386 }
387 387
388 // Stub never generated for objects that require access checks. 388 // Stub never generated for objects that require access checks.
389 DCHECK(!transition->is_access_check_needed()); 389 DCHECK(!transition->is_access_check_needed());
390 390
391 // Perform map transition for the receiver if necessary. 391 // Perform map transition for the receiver if necessary.
392 if (details.type() == FIELD && 392 if (details.type() == FIELD &&
393 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { 393 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) {
394 // The properties must be extended before we can store the value. 394 // The properties must be extended before we can store the value.
395 // We jump to a runtime call that extends the properties array. 395 __ mov(ExtendStorageDescriptor::NameRegister(), Immediate(name));
396 __ pop(scratch1); // Return address. 396 __ mov(ExtendStorageDescriptor::MapRegister(), Immediate(transition));
397 __ push(receiver_reg); 397
398 __ push(Immediate(transition)); 398 ExtendStorageStub stub(isolate(),
399 __ push(value_reg); 399 FieldIndex::ForDescriptor(*transition, descriptor),
400 __ push(scratch1); 400 representation);
401 __ TailCallExternalReference( 401 GenerateTailCall(masm(), stub.GetCode());
402 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
403 isolate()),
404 3, 1);
405 return; 402 return;
406 } 403 }
407 404
408 // Update the map of the object. 405 // Update the map of the object.
409 __ mov(scratch1, Immediate(transition)); 406 __ mov(scratch1, Immediate(transition));
410 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1); 407 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1);
411 408
412 // Update the write barrier for the map field. 409 // Update the write barrier for the map field.
413 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, 410 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2,
414 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 411 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 // Return the generated code. 843 // Return the generated code.
847 return GetCode(kind(), Code::NORMAL, name); 844 return GetCode(kind(), Code::NORMAL, name);
848 } 845 }
849 846
850 847
851 #undef __ 848 #undef __
852 } 849 }
853 } // namespace v8::internal 850 } // namespace v8::internal
854 851
855 #endif // V8_TARGET_ARCH_X87 852 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698