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

Side by Side Diff: src/ic/x64/handler-compiler-x64.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: Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_X64 7 #if V8_TARGET_ARCH_X64
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); 377 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0);
378 } 378 }
379 379
380 // Stub never generated for objects that require access checks. 380 // Stub never generated for objects that require access checks.
381 DCHECK(!transition->is_access_check_needed()); 381 DCHECK(!transition->is_access_check_needed());
382 382
383 // Perform map transition for the receiver if necessary. 383 // Perform map transition for the receiver if necessary.
384 if (details.type() == FIELD && 384 if (details.type() == FIELD &&
385 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { 385 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) {
386 // The properties must be extended before we can store the value. 386 // The properties must be extended before we can store the value.
387 // We jump to a runtime call that extends the properties array. 387 __ Move(ExtendStorageDescriptor::MapRegister(), transition);
388 __ PopReturnAddressTo(scratch1); 388
389 __ Push(receiver_reg); 389 ExtendStorageStub stub(isolate(),
390 __ Push(transition); 390 FieldIndex::ForDescriptor(*transition, descriptor),
391 __ Push(value_reg); 391 representation);
392 __ PushReturnAddressFrom(scratch1); 392 GenerateTailCall(masm(), stub.GetCode());
393 __ TailCallExternalReference(
394 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
395 isolate()),
396 3, 1);
397 return; 393 return;
398 } 394 }
399 395
400 // Update the map of the object. 396 // Update the map of the object.
401 __ Move(scratch1, transition); 397 __ Move(scratch1, transition);
402 __ movp(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1); 398 __ movp(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1);
403 399
404 // Update the write barrier for the map field. 400 // Update the write barrier for the map field.
405 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, 401 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2,
406 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 402 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // Return the generated code. 822 // Return the generated code.
827 return GetCode(kind(), Code::NORMAL, name); 823 return GetCode(kind(), Code::NORMAL, name);
828 } 824 }
829 825
830 826
831 #undef __ 827 #undef __
832 } 828 }
833 } // namespace v8::internal 829 } // namespace v8::internal
834 830
835 #endif // V8_TARGET_ARCH_X64 831 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698