OLD | NEW |
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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 // Access to in object properties. | 2468 // Access to in object properties. |
2469 inline int GetInObjectPropertyOffset(int index); | 2469 inline int GetInObjectPropertyOffset(int index); |
2470 inline Object* InObjectPropertyAt(int index); | 2470 inline Object* InObjectPropertyAt(int index); |
2471 inline Object* InObjectPropertyAtPut(int index, | 2471 inline Object* InObjectPropertyAtPut(int index, |
2472 Object* value, | 2472 Object* value, |
2473 WriteBarrierMode mode | 2473 WriteBarrierMode mode |
2474 = UPDATE_WRITE_BARRIER); | 2474 = UPDATE_WRITE_BARRIER); |
2475 | 2475 |
2476 // Set the object's prototype (only JSReceiver and null are allowed values). | 2476 // Set the object's prototype (only JSReceiver and null are allowed values). |
2477 MUST_USE_RESULT static MaybeHandle<Object> SetPrototype( | 2477 MUST_USE_RESULT static MaybeHandle<Object> SetPrototype( |
2478 Handle<JSObject> object, | 2478 Handle<JSObject> object, Handle<Object> value, bool from_javascript); |
2479 Handle<Object> value, | |
2480 bool skip_hidden_prototypes = false); | |
2481 | 2479 |
2482 // Initializes the body after properties slot, properties slot is | 2480 // Initializes the body after properties slot, properties slot is |
2483 // initialized by set_properties. Fill the pre-allocated fields with | 2481 // initialized by set_properties. Fill the pre-allocated fields with |
2484 // pre_allocated_value and the rest with filler_value. | 2482 // pre_allocated_value and the rest with filler_value. |
2485 // Note: this call does not update write barrier, the caller is responsible | 2483 // Note: this call does not update write barrier, the caller is responsible |
2486 // to ensure that |filler_value| can be collected without WB here. | 2484 // to ensure that |filler_value| can be collected without WB here. |
2487 inline void InitializeBody(Map* map, | 2485 inline void InitializeBody(Map* map, |
2488 Object* pre_allocated_value, | 2486 Object* pre_allocated_value, |
2489 Object* filler_value); | 2487 Object* filler_value); |
2490 | 2488 |
(...skipping 5282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7773 DECL_ACCESSORS(literals_or_bindings, FixedArray) | 7771 DECL_ACCESSORS(literals_or_bindings, FixedArray) |
7774 | 7772 |
7775 inline FixedArray* literals(); | 7773 inline FixedArray* literals(); |
7776 inline void set_literals(FixedArray* literals); | 7774 inline void set_literals(FixedArray* literals); |
7777 | 7775 |
7778 inline FixedArray* function_bindings(); | 7776 inline FixedArray* function_bindings(); |
7779 inline void set_function_bindings(FixedArray* bindings); | 7777 inline void set_function_bindings(FixedArray* bindings); |
7780 | 7778 |
7781 // The initial map for an object created by this constructor. | 7779 // The initial map for an object created by this constructor. |
7782 inline Map* initial_map(); | 7780 inline Map* initial_map(); |
7783 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map); | 7781 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map, |
| 7782 Handle<Object> prototype); |
7784 inline bool has_initial_map(); | 7783 inline bool has_initial_map(); |
7785 static void EnsureHasInitialMap(Handle<JSFunction> function); | 7784 static void EnsureHasInitialMap(Handle<JSFunction> function); |
7786 | 7785 |
7787 // Get and set the prototype property on a JSFunction. If the | 7786 // Get and set the prototype property on a JSFunction. If the |
7788 // function has an initial map the prototype is set on the initial | 7787 // function has an initial map the prototype is set on the initial |
7789 // map. Otherwise, the prototype is put in the initial map field | 7788 // map. Otherwise, the prototype is put in the initial map field |
7790 // until an initial map is needed. | 7789 // until an initial map is needed. |
7791 inline bool has_prototype(); | 7790 inline bool has_prototype(); |
7792 inline bool has_instance_prototype(); | 7791 inline bool has_instance_prototype(); |
7793 inline Object* prototype(); | 7792 inline Object* prototype(); |
(...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11270 } else { | 11269 } else { |
11271 value &= ~(1 << bit_position); | 11270 value &= ~(1 << bit_position); |
11272 } | 11271 } |
11273 return value; | 11272 return value; |
11274 } | 11273 } |
11275 }; | 11274 }; |
11276 | 11275 |
11277 } } // namespace v8::internal | 11276 } } // namespace v8::internal |
11278 | 11277 |
11279 #endif // V8_OBJECTS_H_ | 11278 #endif // V8_OBJECTS_H_ |
OLD | NEW |