| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 8842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8853 | 8853 |
| 8854 bool ComputeArrayIndex(uint32_t* index); | 8854 bool ComputeArrayIndex(uint32_t* index); |
| 8855 | 8855 |
| 8856 // Externalization. | 8856 // Externalization. |
| 8857 bool MakeExternal(v8::String::ExternalStringResource* resource); | 8857 bool MakeExternal(v8::String::ExternalStringResource* resource); |
| 8858 bool MakeExternal(v8::String::ExternalOneByteStringResource* resource); | 8858 bool MakeExternal(v8::String::ExternalOneByteStringResource* resource); |
| 8859 | 8859 |
| 8860 // Conversion. | 8860 // Conversion. |
| 8861 inline bool AsArrayIndex(uint32_t* index); | 8861 inline bool AsArrayIndex(uint32_t* index); |
| 8862 | 8862 |
| 8863 // Trimming. |
| 8864 enum TrimMode : uint8_t { |
| 8865 kTrimLeft = 1u << 0, |
| 8866 kTrimRight = 1u << 1, |
| 8867 kTrim = kTrimLeft | kTrimRight |
| 8868 }; |
| 8869 static Handle<String> Trim(Handle<String> string, TrimMode mode); |
| 8870 |
| 8863 DECLARE_CAST(String) | 8871 DECLARE_CAST(String) |
| 8864 | 8872 |
| 8865 void PrintOn(FILE* out); | 8873 void PrintOn(FILE* out); |
| 8866 | 8874 |
| 8867 // For use during stack traces. Performs rudimentary sanity check. | 8875 // For use during stack traces. Performs rudimentary sanity check. |
| 8868 bool LooksValid(); | 8876 bool LooksValid(); |
| 8869 | 8877 |
| 8870 // Dispatched behavior. | 8878 // Dispatched behavior. |
| 8871 void StringShortPrint(StringStream* accumulator); | 8879 void StringShortPrint(StringStream* accumulator); |
| 8872 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT | 8880 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10785 } | 10793 } |
| 10786 return value; | 10794 return value; |
| 10787 } | 10795 } |
| 10788 }; | 10796 }; |
| 10789 | 10797 |
| 10790 | 10798 |
| 10791 } // NOLINT, false-positive due to second-order macros. | 10799 } // NOLINT, false-positive due to second-order macros. |
| 10792 } // NOLINT, false-positive due to second-order macros. | 10800 } // NOLINT, false-positive due to second-order macros. |
| 10793 | 10801 |
| 10794 #endif // V8_OBJECTS_H_ | 10802 #endif // V8_OBJECTS_H_ |
| OLD | NEW |