Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: src/heap.h

Issue 11597007: Rename LookupSymbol calls to use Utf8 or OneByte in names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698