OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 __ mov(r2, Operand(Handle<Map>(transition))); | 418 __ mov(r2, Operand(Handle<Map>(transition))); |
419 // Please note, if we implement keyed store for arm we need | 419 // Please note, if we implement keyed store for arm we need |
420 // to call the Builtins::KeyedStoreIC_ExtendStorage. | 420 // to call the Builtins::KeyedStoreIC_ExtendStorage. |
421 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_ExtendStorage)); | 421 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_ExtendStorage)); |
422 __ Jump(ic, RelocInfo::CODE_TARGET); | 422 __ Jump(ic, RelocInfo::CODE_TARGET); |
423 } else { | 423 } else { |
424 // Adjust for the number of properties stored in the object. Even in the | 424 // Adjust for the number of properties stored in the object. Even in the |
425 // face of a transition we can use the old map here because the size of the | 425 // face of a transition we can use the old map here because the size of the |
426 // object and the number of in-object properties is not going to change. | 426 // object and the number of in-object properties is not going to change. |
427 index -= object->map()->inobject_properties(); | 427 index -= object->map()->inobject_properties(); |
428 | 428 |
429 if (index >= 0) { | 429 if (index >= 0) { |
430 // Get the properties array | 430 // Get the properties array |
431 __ ldr(r1, FieldMemOperand(r3, JSObject::kPropertiesOffset)); | 431 __ ldr(r1, FieldMemOperand(r3, JSObject::kPropertiesOffset)); |
432 } | 432 } |
433 | 433 |
434 if (transition != NULL) { | 434 if (transition != NULL) { |
435 // Update the map of the object; no write barrier updating is | 435 // Update the map of the object; no write barrier updating is |
436 // needed because the map is never in new space. | 436 // needed because the map is never in new space. |
437 __ mov(ip, Operand(Handle<Map>(transition))); | 437 __ mov(ip, Operand(Handle<Map>(transition))); |
438 __ str(ip, FieldMemOperand(r3, HeapObject::kMapOffset)); | 438 __ str(ip, FieldMemOperand(r3, HeapObject::kMapOffset)); |
439 } | 439 } |
440 | 440 |
441 if (index < 0) { | 441 if (index < 0) { |
442 // Set the property straight into the object. | 442 // Set the property straight into the object. |
443 int offset = object->map()->instance_size() + (index * kPointerSize); | 443 int offset = object->map()->instance_size() + (index * kPointerSize); |
444 __ str(r0, FieldMemOperand(r3, offset)); | 444 __ str(r0, FieldMemOperand(r3, offset)); |
445 | 445 |
446 // Skip updating write barrier if storing a smi. | 446 // Skip updating write barrier if storing a smi. |
447 __ tst(r0, Operand(kSmiTagMask)); | 447 __ tst(r0, Operand(kSmiTagMask)); |
448 __ b(eq, &exit); | 448 __ b(eq, &exit); |
449 | 449 |
450 // Update the write barrier for the array address. | 450 // Update the write barrier for the array address. |
451 __ mov(r1, Operand(offset)); | 451 __ mov(r1, Operand(offset)); |
452 __ RecordWrite(r3, r1, r2); | 452 __ RecordWrite(r3, r1, r2); |
453 } else { | 453 } else { |
454 // Write to the properties array. | 454 // Write to the properties array. |
455 int offset = index * kPointerSize + Array::kHeaderSize; | 455 int offset = index * kPointerSize + Array::kHeaderSize; |
456 __ str(r0, FieldMemOperand(r1, offset)); | 456 __ str(r0, FieldMemOperand(r1, offset)); |
457 | 457 |
458 // Skip updating write barrier if storing a smi. | 458 // Skip updating write barrier if storing a smi. |
459 __ tst(r0, Operand(kSmiTagMask)); | 459 __ tst(r0, Operand(kSmiTagMask)); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 String* name) { | 826 String* name) { |
827 UNIMPLEMENTED(); | 827 UNIMPLEMENTED(); |
828 return Heap::undefined_value(); | 828 return Heap::undefined_value(); |
829 } | 829 } |
830 | 830 |
831 | 831 |
832 | 832 |
833 #undef __ | 833 #undef __ |
834 | 834 |
835 } } // namespace v8::internal | 835 } } // namespace v8::internal |
OLD | NEW |