| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // - ...FromTwoByte initializes the string from a buffer that is two-byte | 405 // - ...FromTwoByte initializes the string from a buffer that is two-byte |
| 406 // encoded. If the characters are all single-byte characters, the | 406 // encoded. If the characters are all single-byte characters, the |
| 407 // result will be converted to ASCII, otherwise it will be left as | 407 // result will be converted to ASCII, otherwise it will be left as |
| 408 // two-byte. | 408 // two-byte. |
| 409 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 409 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 410 // failed. | 410 // failed. |
| 411 // Please note this does not perform a garbage collection. | 411 // Please note this does not perform a garbage collection. |
| 412 MUST_USE_RESULT static MaybeObject* AllocateStringFromAscii( | 412 MUST_USE_RESULT static MaybeObject* AllocateStringFromAscii( |
| 413 Vector<const char> str, | 413 Vector<const char> str, |
| 414 PretenureFlag pretenure = NOT_TENURED); | 414 PretenureFlag pretenure = NOT_TENURED); |
| 415 MUST_USE_RESULT static MaybeObject* AllocateStringFromUtf8( | 415 MUST_USE_RESULT static inline MaybeObject* AllocateStringFromUtf8( |
| 416 Vector<const char> str, |
| 417 PretenureFlag pretenure = NOT_TENURED); |
| 418 MUST_USE_RESULT static MaybeObject* AllocateStringFromUtf8Slow( |
| 416 Vector<const char> str, | 419 Vector<const char> str, |
| 417 PretenureFlag pretenure = NOT_TENURED); | 420 PretenureFlag pretenure = NOT_TENURED); |
| 418 MUST_USE_RESULT static MaybeObject* AllocateStringFromTwoByte( | 421 MUST_USE_RESULT static MaybeObject* AllocateStringFromTwoByte( |
| 419 Vector<const uc16> str, | 422 Vector<const uc16> str, |
| 420 PretenureFlag pretenure = NOT_TENURED); | 423 PretenureFlag pretenure = NOT_TENURED); |
| 421 | 424 |
| 422 // Allocates a symbol in old space based on the character stream. | 425 // Allocates a symbol in old space based on the character stream. |
| 423 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 426 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 424 // failed. | 427 // failed. |
| 425 // Please note this function does not perform a garbage collection. | 428 // Please note this function does not perform a garbage collection. |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2109 // Return whether this object should be retained. If NULL is returned the | 2112 // Return whether this object should be retained. If NULL is returned the |
| 2110 // object has no references. Otherwise the address of the retained object | 2113 // object has no references. Otherwise the address of the retained object |
| 2111 // should be returned as in some GC situations the object has been moved. | 2114 // should be returned as in some GC situations the object has been moved. |
| 2112 virtual Object* RetainAs(Object* object) = 0; | 2115 virtual Object* RetainAs(Object* object) = 0; |
| 2113 }; | 2116 }; |
| 2114 | 2117 |
| 2115 | 2118 |
| 2116 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
| 2117 | 2120 |
| 2118 #endif // V8_HEAP_H_ | 2121 #endif // V8_HEAP_H_ |
| OLD | NEW |