| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2636 | 2636 |
| 2637 // Access to in object properties. | 2637 // Access to in object properties. |
| 2638 inline int GetInObjectPropertyOffset(int index); | 2638 inline int GetInObjectPropertyOffset(int index); |
| 2639 inline Object* InObjectPropertyAt(int index); | 2639 inline Object* InObjectPropertyAt(int index); |
| 2640 inline Object* InObjectPropertyAtPut(int index, | 2640 inline Object* InObjectPropertyAtPut(int index, |
| 2641 Object* value, | 2641 Object* value, |
| 2642 WriteBarrierMode mode | 2642 WriteBarrierMode mode |
| 2643 = UPDATE_WRITE_BARRIER); | 2643 = UPDATE_WRITE_BARRIER); |
| 2644 | 2644 |
| 2645 // Set the object's prototype (only JSReceiver and null are allowed values). | 2645 // Set the object's prototype (only JSReceiver and null are allowed values). |
| 2646 static Handle<Object> SetPrototype(Handle<JSObject> object, | 2646 MUST_USE_RESULT static MaybeHandle<Object> SetPrototype( |
| 2647 Handle<Object> value, | 2647 Handle<JSObject> object, |
| 2648 bool skip_hidden_prototypes = false); | 2648 Handle<Object> value, |
| 2649 bool skip_hidden_prototypes = false); |
| 2649 | 2650 |
| 2650 // Initializes the body after properties slot, properties slot is | 2651 // Initializes the body after properties slot, properties slot is |
| 2651 // initialized by set_properties. Fill the pre-allocated fields with | 2652 // initialized by set_properties. Fill the pre-allocated fields with |
| 2652 // pre_allocated_value and the rest with filler_value. | 2653 // pre_allocated_value and the rest with filler_value. |
| 2653 // Note: this call does not update write barrier, the caller is responsible | 2654 // Note: this call does not update write barrier, the caller is responsible |
| 2654 // to ensure that |filler_value| can be collected without WB here. | 2655 // to ensure that |filler_value| can be collected without WB here. |
| 2655 inline void InitializeBody(Map* map, | 2656 inline void InitializeBody(Map* map, |
| 2656 Object* pre_allocated_value, | 2657 Object* pre_allocated_value, |
| 2657 Object* filler_value); | 2658 Object* filler_value); |
| 2658 | 2659 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2671 | 2672 |
| 2672 // Copy object. | 2673 // Copy object. |
| 2673 enum DeepCopyHints { | 2674 enum DeepCopyHints { |
| 2674 kNoHints = 0, | 2675 kNoHints = 0, |
| 2675 kObjectIsShallowArray = 1 | 2676 kObjectIsShallowArray = 1 |
| 2676 }; | 2677 }; |
| 2677 | 2678 |
| 2678 static Handle<JSObject> Copy(Handle<JSObject> object, | 2679 static Handle<JSObject> Copy(Handle<JSObject> object, |
| 2679 Handle<AllocationSite> site); | 2680 Handle<AllocationSite> site); |
| 2680 static Handle<JSObject> Copy(Handle<JSObject> object); | 2681 static Handle<JSObject> Copy(Handle<JSObject> object); |
| 2681 static Handle<JSObject> DeepCopy(Handle<JSObject> object, | 2682 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( |
| 2682 AllocationSiteUsageContext* site_context, | 2683 Handle<JSObject> object, |
| 2683 DeepCopyHints hints = kNoHints); | 2684 AllocationSiteUsageContext* site_context, |
| 2684 static Handle<JSObject> DeepWalk(Handle<JSObject> object, | 2685 DeepCopyHints hints = kNoHints); |
| 2685 AllocationSiteCreationContext* site_context); | 2686 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( |
| 2687 Handle<JSObject> object, |
| 2688 AllocationSiteCreationContext* site_context); |
| 2686 | 2689 |
| 2687 static Handle<Object> GetDataProperty(Handle<JSObject> object, | 2690 static Handle<Object> GetDataProperty(Handle<JSObject> object, |
| 2688 Handle<Name> key); | 2691 Handle<Name> key); |
| 2689 | 2692 |
| 2690 // Casting. | 2693 // Casting. |
| 2691 static inline JSObject* cast(Object* obj); | 2694 static inline JSObject* cast(Object* obj); |
| 2692 | 2695 |
| 2693 // Dispatched behavior. | 2696 // Dispatched behavior. |
| 2694 void JSObjectShortPrint(StringStream* accumulator); | 2697 void JSObjectShortPrint(StringStream* accumulator); |
| 2695 DECLARE_PRINTER(JSObject) | 2698 DECLARE_PRINTER(JSObject) |
| (...skipping 8407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11103 } else { | 11106 } else { |
| 11104 value &= ~(1 << bit_position); | 11107 value &= ~(1 << bit_position); |
| 11105 } | 11108 } |
| 11106 return value; | 11109 return value; |
| 11107 } | 11110 } |
| 11108 }; | 11111 }; |
| 11109 | 11112 |
| 11110 } } // namespace v8::internal | 11113 } } // namespace v8::internal |
| 11111 | 11114 |
| 11112 #endif // V8_OBJECTS_H_ | 11115 #endif // V8_OBJECTS_H_ |
| OLD | NEW |