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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 bool Object::IsTrue() { | 723 bool Object::IsTrue() { |
724 return this == Heap::true_value(); | 724 return this == Heap::true_value(); |
725 } | 725 } |
726 | 726 |
727 | 727 |
728 bool Object::IsFalse() { | 728 bool Object::IsFalse() { |
729 return this == Heap::false_value(); | 729 return this == Heap::false_value(); |
730 } | 730 } |
731 | 731 |
732 | 732 |
| 733 bool Object::IsArgumentsMarker() { |
| 734 return this == Heap::arguments_marker(); |
| 735 } |
| 736 |
| 737 |
733 double Object::Number() { | 738 double Object::Number() { |
734 ASSERT(IsNumber()); | 739 ASSERT(IsNumber()); |
735 return IsSmi() | 740 return IsSmi() |
736 ? static_cast<double>(reinterpret_cast<Smi*>(this)->value()) | 741 ? static_cast<double>(reinterpret_cast<Smi*>(this)->value()) |
737 : reinterpret_cast<HeapNumber*>(this)->value(); | 742 : reinterpret_cast<HeapNumber*>(this)->value(); |
738 } | 743 } |
739 | 744 |
740 | 745 |
741 | 746 |
742 MaybeObject* Object::ToSmi() { | 747 MaybeObject* Object::ToSmi() { |
(...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3845 #undef WRITE_INT_FIELD | 3850 #undef WRITE_INT_FIELD |
3846 #undef READ_SHORT_FIELD | 3851 #undef READ_SHORT_FIELD |
3847 #undef WRITE_SHORT_FIELD | 3852 #undef WRITE_SHORT_FIELD |
3848 #undef READ_BYTE_FIELD | 3853 #undef READ_BYTE_FIELD |
3849 #undef WRITE_BYTE_FIELD | 3854 #undef WRITE_BYTE_FIELD |
3850 | 3855 |
3851 | 3856 |
3852 } } // namespace v8::internal | 3857 } } // namespace v8::internal |
3853 | 3858 |
3854 #endif // V8_OBJECTS_INL_H_ | 3859 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |