| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 142 } |
| 143 | 143 |
| 144 // UTF8 strings are pretenured when used for regexp literal patterns and | 144 // UTF8 strings are pretenured when used for regexp literal patterns and |
| 145 // flags in the parser. | 145 // flags in the parser. |
| 146 Handle<String> NewStringFromUtf8( | 146 Handle<String> NewStringFromUtf8( |
| 147 Vector<const char> str, | 147 Vector<const char> str, |
| 148 PretenureFlag pretenure = NOT_TENURED); | 148 PretenureFlag pretenure = NOT_TENURED); |
| 149 | 149 |
| 150 Handle<String> NewStringFromTwoByte( | 150 Handle<String> NewStringFromTwoByte( |
| 151 Vector<const uc16> str, | 151 Vector<const uc16> str, |
| 152 bool check_for_one_byte = true, |
| 152 PretenureFlag pretenure = NOT_TENURED); | 153 PretenureFlag pretenure = NOT_TENURED); |
| 153 | 154 |
| 154 // Allocates and partially initializes an ASCII or TwoByte String. The | 155 // Allocates and partially initializes an ASCII or TwoByte String. The |
| 155 // characters of the string are uninitialized. Currently used in regexp code | 156 // characters of the string are uninitialized. Currently used in regexp code |
| 156 // only, where they are pretenured. | 157 // only, where they are pretenured. |
| 157 Handle<SeqOneByteString> NewRawOneByteString( | 158 Handle<SeqOneByteString> NewRawOneByteString( |
| 158 int length, | 159 int length, |
| 159 PretenureFlag pretenure = NOT_TENURED); | 160 PretenureFlag pretenure = NOT_TENURED); |
| 160 Handle<SeqTwoByteString> NewRawTwoByteString( | 161 Handle<SeqTwoByteString> NewRawTwoByteString( |
| 161 int length, | 162 int length, |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 isolate()); | 600 isolate()); |
| 600 } else { | 601 } else { |
| 601 return NewNumber(static_cast<double>(value), pretenure); | 602 return NewNumber(static_cast<double>(value), pretenure); |
| 602 } | 603 } |
| 603 } | 604 } |
| 604 | 605 |
| 605 | 606 |
| 606 } } // namespace v8::internal | 607 } } // namespace v8::internal |
| 607 | 608 |
| 608 #endif // V8_FACTORY_H_ | 609 #endif // V8_FACTORY_H_ |
| OLD | NEW |