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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 | 1059 |
1060 // Copy the code and scope info part of the code object, but insert | 1060 // Copy the code and scope info part of the code object, but insert |
1061 // the provided data as the relocation information. | 1061 // the provided data as the relocation information. |
1062 MUST_USE_RESULT MaybeObject* CopyCode(Code* code, Vector<byte> reloc_info); | 1062 MUST_USE_RESULT MaybeObject* CopyCode(Code* code, Vector<byte> reloc_info); |
1063 | 1063 |
1064 // Finds the symbol for string in the symbol table. | 1064 // Finds the symbol for string in the symbol table. |
1065 // If not found, a new symbol is added to the table and returned. | 1065 // If not found, a new symbol is added to the table and returned. |
1066 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 1066 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
1067 // failed. | 1067 // failed. |
1068 // Please note this function does not perform a garbage collection. | 1068 // Please note this function does not perform a garbage collection. |
1069 MUST_USE_RESULT MaybeObject* LookupSymbol(Vector<const char> str); | 1069 MUST_USE_RESULT MaybeObject* LookupUtf8Symbol(Vector<const char> str); |
1070 MUST_USE_RESULT MaybeObject* LookupAsciiSymbol(Vector<const char> str); | 1070 MUST_USE_RESULT MaybeObject* LookupUtf8Symbol(const char* str) { |
| 1071 return LookupUtf8Symbol(CStrVector(str)); |
| 1072 } |
| 1073 MUST_USE_RESULT MaybeObject* LookupOneByteSymbol(Vector<const char> str); |
1071 MUST_USE_RESULT MaybeObject* LookupTwoByteSymbol(Vector<const uc16> str); | 1074 MUST_USE_RESULT MaybeObject* LookupTwoByteSymbol(Vector<const uc16> str); |
1072 MUST_USE_RESULT MaybeObject* LookupAsciiSymbol(const char* str) { | |
1073 return LookupSymbol(CStrVector(str)); | |
1074 } | |
1075 MUST_USE_RESULT MaybeObject* LookupSymbol(String* str); | 1075 MUST_USE_RESULT MaybeObject* LookupSymbol(String* str); |
1076 MUST_USE_RESULT MaybeObject* LookupAsciiSymbol( | 1076 MUST_USE_RESULT MaybeObject* LookupOneByteSymbol( |
1077 Handle<SeqOneByteString> string, int from, int length); | 1077 Handle<SeqOneByteString> string, int from, int length); |
1078 | 1078 |
1079 bool LookupSymbolIfExists(String* str, String** symbol); | 1079 bool LookupSymbolIfExists(String* str, String** symbol); |
1080 bool LookupTwoCharsSymbolIfExists(String* str, String** symbol); | 1080 bool LookupTwoCharsSymbolIfExists(String* str, String** symbol); |
1081 | 1081 |
1082 // Compute the matching symbol map for a string if possible. | 1082 // Compute the matching symbol map for a string if possible. |
1083 // NULL is returned if string is in new space or not flattened. | 1083 // NULL is returned if string is in new space or not flattened. |
1084 Map* SymbolMapForString(String* str); | 1084 Map* SymbolMapForString(String* str); |
1085 | 1085 |
1086 // Tries to flatten a string before compare operation. | 1086 // Tries to flatten a string before compare operation. |
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2879 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2879 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2880 | 2880 |
2881 private: | 2881 private: |
2882 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2882 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2883 }; | 2883 }; |
2884 #endif // DEBUG || LIVE_OBJECT_LIST | 2884 #endif // DEBUG || LIVE_OBJECT_LIST |
2885 | 2885 |
2886 } } // namespace v8::internal | 2886 } } // namespace v8::internal |
2887 | 2887 |
2888 #endif // V8_HEAP_H_ | 2888 #endif // V8_HEAP_H_ |
OLD | NEW |