OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 } | 782 } |
783 | 783 |
784 template<typename T> | 784 template<typename T> |
785 inline bool To(T** obj) { | 785 inline bool To(T** obj) { |
786 if (IsFailure()) return false; | 786 if (IsFailure()) return false; |
787 *obj = T::cast(reinterpret_cast<Object*>(this)); | 787 *obj = T::cast(reinterpret_cast<Object*>(this)); |
788 return true; | 788 return true; |
789 } | 789 } |
790 | 790 |
791 template<typename T> | 791 template<typename T> |
792 inline bool ToHandle(Handle<T>* obj) { | 792 inline bool ToHandle(Handle<T>* obj, Isolate* isolate) { |
793 if (IsFailure()) return false; | 793 if (IsFailure()) return false; |
794 *obj = handle(T::cast(reinterpret_cast<Object*>(this))); | 794 *obj = handle(T::cast(reinterpret_cast<Object*>(this)), isolate); |
795 return true; | 795 return true; |
796 } | 796 } |
797 | 797 |
798 #ifdef OBJECT_PRINT | 798 #ifdef OBJECT_PRINT |
799 // Prints this object with details. | 799 // Prints this object with details. |
800 inline void Print() { | 800 inline void Print() { |
801 Print(stdout); | 801 Print(stdout); |
802 } | 802 } |
803 inline void PrintLn() { | 803 inline void PrintLn() { |
804 PrintLn(stdout); | 804 PrintLn(stdout); |
(...skipping 8213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9018 } else { | 9018 } else { |
9019 value &= ~(1 << bit_position); | 9019 value &= ~(1 << bit_position); |
9020 } | 9020 } |
9021 return value; | 9021 return value; |
9022 } | 9022 } |
9023 }; | 9023 }; |
9024 | 9024 |
9025 } } // namespace v8::internal | 9025 } } // namespace v8::internal |
9026 | 9026 |
9027 #endif // V8_OBJECTS_H_ | 9027 #endif // V8_OBJECTS_H_ |
OLD | NEW |