Chromium Code Reviews| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 624 // If not found, a new symbol is added to the table and returned. | 624 // If not found, a new symbol is added to the table and returned. |
| 625 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 625 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
| 626 // failed. | 626 // failed. |
| 627 // Please note this function does not perform a garbage collection. | 627 // Please note this function does not perform a garbage collection. |
| 628 static Object* LookupSymbol(Vector<const char> str); | 628 static Object* LookupSymbol(Vector<const char> str); |
| 629 static Object* LookupAsciiSymbol(const char* str) { | 629 static Object* LookupAsciiSymbol(const char* str) { |
| 630 return LookupSymbol(CStrVector(str)); | 630 return LookupSymbol(CStrVector(str)); |
| 631 } | 631 } |
| 632 static Object* LookupSymbol(String* str); | 632 static Object* LookupSymbol(String* str); |
| 633 static bool LookupSymbolIfExists(String* str, String** symbol); | 633 static bool LookupSymbolIfExists(String* str, String** symbol); |
| 634 static bool LookupTwoCharsIfExists(String* str, String** symbol); | |
|
Søren Thygesen Gjesse
2009/11/19 21:42:57
LookupTwoCharsIfExists -> LookupTwoCharsSymbolIfEx
| |
| 634 | 635 |
| 635 // Compute the matching symbol map for a string if possible. | 636 // Compute the matching symbol map for a string if possible. |
| 636 // NULL is returned if string is in new space or not flattened. | 637 // NULL is returned if string is in new space or not flattened. |
| 637 static Map* SymbolMapForString(String* str); | 638 static Map* SymbolMapForString(String* str); |
| 638 | 639 |
| 639 // Converts the given boolean condition to JavaScript boolean value. | 640 // Converts the given boolean condition to JavaScript boolean value. |
| 640 static Object* ToBoolean(bool condition) { | 641 static Object* ToBoolean(bool condition) { |
| 641 return condition ? true_value() : false_value(); | 642 return condition ? true_value() : false_value(); |
| 642 } | 643 } |
| 643 | 644 |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1617 } | 1618 } |
| 1618 static TranscendentalCache* caches_[kNumberOfCaches]; | 1619 static TranscendentalCache* caches_[kNumberOfCaches]; |
| 1619 Element elements_[kCacheSize]; | 1620 Element elements_[kCacheSize]; |
| 1620 Type type_; | 1621 Type type_; |
| 1621 }; | 1622 }; |
| 1622 | 1623 |
| 1623 | 1624 |
| 1624 } } // namespace v8::internal | 1625 } } // namespace v8::internal |
| 1625 | 1626 |
| 1626 #endif // V8_HEAP_H_ | 1627 #endif // V8_HEAP_H_ |
| OLD | NEW |