| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 // Tells whether the instance with this map should be ignored by the | 2476 // Tells whether the instance with this map should be ignored by the |
| 2477 // __proto__ accessor. | 2477 // __proto__ accessor. |
| 2478 inline void set_is_hidden_prototype() { | 2478 inline void set_is_hidden_prototype() { |
| 2479 set_bit_field(bit_field() | (1 << kIsHiddenPrototype)); | 2479 set_bit_field(bit_field() | (1 << kIsHiddenPrototype)); |
| 2480 } | 2480 } |
| 2481 | 2481 |
| 2482 inline bool is_hidden_prototype() { | 2482 inline bool is_hidden_prototype() { |
| 2483 return ((1 << kIsHiddenPrototype) & bit_field()) != 0; | 2483 return ((1 << kIsHiddenPrototype) & bit_field()) != 0; |
| 2484 } | 2484 } |
| 2485 | 2485 |
| 2486 // Tells whether the instance has a named interceptor. | 2486 // Records and queries whether the instance has a named interceptor. |
| 2487 inline void set_has_named_interceptor() { | 2487 inline void set_has_named_interceptor() { |
| 2488 set_bit_field(bit_field() | (1 << kHasNamedInterceptor)); | 2488 set_bit_field(bit_field() | (1 << kHasNamedInterceptor)); |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 inline bool has_named_interceptor() { | 2491 inline bool has_named_interceptor() { |
| 2492 return ((1 << kHasNamedInterceptor) & bit_field()) != 0; | 2492 return ((1 << kHasNamedInterceptor) & bit_field()) != 0; |
| 2493 } | 2493 } |
| 2494 | 2494 |
| 2495 // Tells whether the instance has a named interceptor. | 2495 // Records and queries whether the instance has an indexed interceptor. |
| 2496 inline void set_has_indexed_interceptor() { | 2496 inline void set_has_indexed_interceptor() { |
| 2497 set_bit_field(bit_field() | (1 << kHasIndexedInterceptor)); | 2497 set_bit_field(bit_field() | (1 << kHasIndexedInterceptor)); |
| 2498 } | 2498 } |
| 2499 | 2499 |
| 2500 inline bool has_indexed_interceptor() { | 2500 inline bool has_indexed_interceptor() { |
| 2501 return ((1 << kHasIndexedInterceptor) & bit_field()) != 0; | 2501 return ((1 << kHasIndexedInterceptor) & bit_field()) != 0; |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 // Tells whether the instance is undetectable. | 2504 // Tells whether the instance is undetectable. |
| 2505 // An undetectable object is a special class of JSObject: 'typeof' operator | 2505 // An undetectable object is a special class of JSObject: 'typeof' operator |
| (...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); | 4014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); |
| 4015 }; | 4015 }; |
| 4016 | 4016 |
| 4017 | 4017 |
| 4018 // An accessor must have a getter, but can have no setter. | 4018 // An accessor must have a getter, but can have no setter. |
| 4019 // | 4019 // |
| 4020 // When setting a property, V8 searches accessors in prototypes. | 4020 // When setting a property, V8 searches accessors in prototypes. |
| 4021 // If an accessor was found and it does not have a setter, | 4021 // If an accessor was found and it does not have a setter, |
| 4022 // the request is ignored. | 4022 // the request is ignored. |
| 4023 // | 4023 // |
| 4024 // To allow shadow an accessor property, the accessor can | 4024 // If the accessor in the prototype has the READ_ONLY property attribute, then |
| 4025 // have READ_ONLY property attribute so that a new value | 4025 // a new value is added to the local object when the property is set. |
| 4026 // is added to the local object to shadow the accessor | 4026 // This shadows the accessor in the prototype. |
| 4027 // in prototypes. | |
| 4028 class AccessorInfo: public Struct { | 4027 class AccessorInfo: public Struct { |
| 4029 public: | 4028 public: |
| 4030 DECL_ACCESSORS(getter, Object) | 4029 DECL_ACCESSORS(getter, Object) |
| 4031 DECL_ACCESSORS(setter, Object) | 4030 DECL_ACCESSORS(setter, Object) |
| 4032 DECL_ACCESSORS(data, Object) | 4031 DECL_ACCESSORS(data, Object) |
| 4033 DECL_ACCESSORS(name, Object) | 4032 DECL_ACCESSORS(name, Object) |
| 4034 DECL_ACCESSORS(flag, Smi) | 4033 DECL_ACCESSORS(flag, Smi) |
| 4035 | 4034 |
| 4036 inline bool all_can_read(); | 4035 inline bool all_can_read(); |
| 4037 inline void set_all_can_read(bool value); | 4036 inline void set_all_can_read(bool value); |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4461 } else { | 4460 } else { |
| 4462 value &= ~(1 << bit_position); | 4461 value &= ~(1 << bit_position); |
| 4463 } | 4462 } |
| 4464 return value; | 4463 return value; |
| 4465 } | 4464 } |
| 4466 }; | 4465 }; |
| 4467 | 4466 |
| 4468 } } // namespace v8::internal | 4467 } } // namespace v8::internal |
| 4469 | 4468 |
| 4470 #endif // V8_OBJECTS_H_ | 4469 #endif // V8_OBJECTS_H_ |
| OLD | NEW |