| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 // Finds the symbol for string in the symbol table. | 521 // Finds the symbol for string in the symbol table. |
| 522 // If not found, a new symbol is added to the table and returned. | 522 // If not found, a new symbol is added to the table and returned. |
| 523 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 523 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
| 524 // failed. | 524 // failed. |
| 525 // Please note this function does not perform a garbage collection. | 525 // Please note this function does not perform a garbage collection. |
| 526 static Object* LookupSymbol(Vector<const char> str); | 526 static Object* LookupSymbol(Vector<const char> str); |
| 527 static Object* LookupAsciiSymbol(const char* str) { | 527 static Object* LookupAsciiSymbol(const char* str) { |
| 528 return LookupSymbol(CStrVector(str)); | 528 return LookupSymbol(CStrVector(str)); |
| 529 } | 529 } |
| 530 static Object* LookupSymbol(String* str); | 530 static Object* LookupSymbol(String* str); |
| 531 static bool LookupSymbolIfExists(String* str, String** symbol); |
| 531 | 532 |
| 532 // Compute the matching symbol map for a string if possible. | 533 // Compute the matching symbol map for a string if possible. |
| 533 // NULL is returned if string is in new space or not flattened. | 534 // NULL is returned if string is in new space or not flattened. |
| 534 static Map* SymbolMapForString(String* str); | 535 static Map* SymbolMapForString(String* str); |
| 535 | 536 |
| 536 // Converts the given boolean condition to JavaScript boolean value. | 537 // Converts the given boolean condition to JavaScript boolean value. |
| 537 static Object* ToBoolean(bool condition) { | 538 static Object* ToBoolean(bool condition) { |
| 538 return condition ? true_value() : false_value(); | 539 return condition ? true_value() : false_value(); |
| 539 } | 540 } |
| 540 | 541 |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 int marked_count_; | 1163 int marked_count_; |
| 1163 | 1164 |
| 1164 // The count from the end of the previous full GC. Will be zero if there | 1165 // The count from the end of the previous full GC. Will be zero if there |
| 1165 // was no previous full GC. | 1166 // was no previous full GC. |
| 1166 int previous_marked_count_; | 1167 int previous_marked_count_; |
| 1167 }; | 1168 }; |
| 1168 | 1169 |
| 1169 } } // namespace v8::internal | 1170 } } // namespace v8::internal |
| 1170 | 1171 |
| 1171 #endif // V8_HEAP_H_ | 1172 #endif // V8_HEAP_H_ |
| OLD | NEW |