OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 template <class C> static inline bool Is(Object* obj); | 586 template <class C> static inline bool Is(Object* obj); |
587 | 587 |
588 | 588 |
589 class MaybeObject BASE_EMBEDDED { | 589 class MaybeObject BASE_EMBEDDED { |
590 public: | 590 public: |
591 inline bool IsFailure(); | 591 inline bool IsFailure(); |
592 inline bool IsRetryAfterGC(); | 592 inline bool IsRetryAfterGC(); |
593 inline bool IsOutOfMemory(); | 593 inline bool IsOutOfMemory(); |
594 inline bool IsException(); | 594 inline bool IsException(); |
595 INLINE(bool IsTheHole()); | 595 INLINE(bool IsTheHole()); |
596 INLINE(bool IsArgumentsMarker()); | |
Kevin Millikin (Chromium)
2011/01/06 14:00:47
I wonder why we INLINE exactly these two?
fschneider
2011/01/06 16:22:49
Good question. I don't know. Maybe we should use I
| |
596 inline bool ToObject(Object** obj) { | 597 inline bool ToObject(Object** obj) { |
597 if (IsFailure()) return false; | 598 if (IsFailure()) return false; |
598 *obj = reinterpret_cast<Object*>(this); | 599 *obj = reinterpret_cast<Object*>(this); |
599 return true; | 600 return true; |
600 } | 601 } |
601 inline Object* ToObjectUnchecked() { | 602 inline Object* ToObjectUnchecked() { |
602 ASSERT(!IsFailure()); | 603 ASSERT(!IsFailure()); |
603 return reinterpret_cast<Object*>(this); | 604 return reinterpret_cast<Object*>(this); |
604 } | 605 } |
605 inline Object* ToObjectChecked() { | 606 inline Object* ToObjectChecked() { |
(...skipping 5783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6389 } else { | 6390 } else { |
6390 value &= ~(1 << bit_position); | 6391 value &= ~(1 << bit_position); |
6391 } | 6392 } |
6392 return value; | 6393 return value; |
6393 } | 6394 } |
6394 }; | 6395 }; |
6395 | 6396 |
6396 } } // namespace v8::internal | 6397 } } // namespace v8::internal |
6397 | 6398 |
6398 #endif // V8_OBJECTS_H_ | 6399 #endif // V8_OBJECTS_H_ |
OLD | NEW |