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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 bool IsTransition() { | 349 bool IsTransition() { |
350 PropertyType t = type(); | 350 PropertyType t = type(); |
351 ASSERT(t != INTERCEPTOR); | 351 ASSERT(t != INTERCEPTOR); |
352 return t == MAP_TRANSITION || t == CONSTANT_TRANSITION; | 352 return t == MAP_TRANSITION || t == CONSTANT_TRANSITION; |
353 } | 353 } |
354 | 354 |
355 bool IsNullDescriptor() { | 355 bool IsNullDescriptor() { |
356 return type() == NULL_DESCRIPTOR; | 356 return type() == NULL_DESCRIPTOR; |
357 } | 357 } |
358 | 358 |
| 359 bool IsProperty() { |
| 360 return type() < FIRST_PHANTOM_PROPERTY_TYPE; |
| 361 } |
| 362 |
359 JSFunction* GetConstantFunction() { return JSFunction::cast(GetValue()); } | 363 JSFunction* GetConstantFunction() { return JSFunction::cast(GetValue()); } |
360 | 364 |
361 AccessorDescriptor* GetCallbacks() { | 365 AccessorDescriptor* GetCallbacks() { |
362 ASSERT(type() == CALLBACKS); | 366 ASSERT(type() == CALLBACKS); |
363 Proxy* p = Proxy::cast(GetCallbacksObject()); | 367 Proxy* p = Proxy::cast(GetCallbacksObject()); |
364 return reinterpret_cast<AccessorDescriptor*>(p->proxy()); | 368 return reinterpret_cast<AccessorDescriptor*>(p->proxy()); |
365 } | 369 } |
366 | 370 |
367 Object* GetCallbacksObject() { | 371 Object* GetCallbacksObject() { |
368 ASSERT(type() == CALLBACKS); | 372 ASSERT(type() == CALLBACKS); |
(...skipping 14 matching lines...) Expand all Loading... |
383 | 387 |
384 // Append a descriptor to this stream. | 388 // Append a descriptor to this stream. |
385 void Write(Descriptor* desc); | 389 void Write(Descriptor* desc); |
386 // Read a descriptor from the reader and append it to this stream. | 390 // Read a descriptor from the reader and append it to this stream. |
387 void WriteFrom(DescriptorReader* reader); | 391 void WriteFrom(DescriptorReader* reader); |
388 }; | 392 }; |
389 | 393 |
390 } } // namespace v8::internal | 394 } } // namespace v8::internal |
391 | 395 |
392 #endif // V8_PROPERTY_H_ | 396 #endif // V8_PROPERTY_H_ |
OLD | NEW |