OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 | 173 |
174 // Internalized strings are created in the old generation (data space). | 174 // Internalized strings are created in the old generation (data space). |
175 Handle<String> Factory::InternalizeUtf8String(Vector<const char> string) { | 175 Handle<String> Factory::InternalizeUtf8String(Vector<const char> string) { |
176 CALL_HEAP_FUNCTION(isolate(), | 176 CALL_HEAP_FUNCTION(isolate(), |
177 isolate()->heap()->InternalizeUtf8String(string), | 177 isolate()->heap()->InternalizeUtf8String(string), |
178 String); | 178 String); |
179 } | 179 } |
180 | 180 |
| 181 |
181 // Internalized strings are created in the old generation (data space). | 182 // Internalized strings are created in the old generation (data space). |
182 Handle<String> Factory::InternalizeString(Handle<String> string) { | 183 Handle<String> Factory::InternalizeString(Handle<String> string) { |
183 CALL_HEAP_FUNCTION(isolate(), | 184 CALL_HEAP_FUNCTION(isolate(), |
184 isolate()->heap()->InternalizeString(*string), | 185 isolate()->heap()->InternalizeString(*string), |
185 String); | 186 String); |
186 } | 187 } |
187 | 188 |
| 189 |
188 Handle<String> Factory::InternalizeOneByteString(Vector<const uint8_t> string) { | 190 Handle<String> Factory::InternalizeOneByteString(Vector<const uint8_t> string) { |
189 CALL_HEAP_FUNCTION(isolate(), | 191 CALL_HEAP_FUNCTION(isolate(), |
190 isolate()->heap()->InternalizeOneByteString(string), | 192 isolate()->heap()->InternalizeOneByteString(string), |
191 String); | 193 String); |
192 } | 194 } |
193 | 195 |
194 | 196 |
195 Handle<String> Factory::InternalizeOneByteString( | 197 Handle<String> Factory::InternalizeOneByteString( |
196 Handle<SeqOneByteString> string, int from, int length) { | 198 Handle<SeqOneByteString> string, int from, int length) { |
197 CALL_HEAP_FUNCTION(isolate(), | 199 CALL_HEAP_FUNCTION(isolate(), |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 isolate()->heap()->AllocateJSMessageObject(*type, | 1230 isolate()->heap()->AllocateJSMessageObject(*type, |
1229 *arguments, | 1231 *arguments, |
1230 start_position, | 1232 start_position, |
1231 end_position, | 1233 end_position, |
1232 *script, | 1234 *script, |
1233 *stack_trace, | 1235 *stack_trace, |
1234 *stack_frames), | 1236 *stack_frames), |
1235 JSMessageObject); | 1237 JSMessageObject); |
1236 } | 1238 } |
1237 | 1239 |
| 1240 |
1238 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(Handle<String> name) { | 1241 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(Handle<String> name) { |
1239 CALL_HEAP_FUNCTION(isolate(), | 1242 CALL_HEAP_FUNCTION(isolate(), |
1240 isolate()->heap()->AllocateSharedFunctionInfo(*name), | 1243 isolate()->heap()->AllocateSharedFunctionInfo(*name), |
1241 SharedFunctionInfo); | 1244 SharedFunctionInfo); |
1242 } | 1245 } |
1243 | 1246 |
1244 | 1247 |
1245 Handle<String> Factory::NumberToString(Handle<Object> number) { | 1248 Handle<String> Factory::NumberToString(Handle<Object> number) { |
1246 CALL_HEAP_FUNCTION(isolate(), | 1249 CALL_HEAP_FUNCTION(isolate(), |
1247 isolate()->heap()->NumberToString(*number), String); | 1250 isolate()->heap()->NumberToString(*number), String); |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 return Handle<Object>::null(); | 1603 return Handle<Object>::null(); |
1601 } | 1604 } |
1602 | 1605 |
1603 | 1606 |
1604 Handle<Object> Factory::ToBoolean(bool value) { | 1607 Handle<Object> Factory::ToBoolean(bool value) { |
1605 return value ? true_value() : false_value(); | 1608 return value ? true_value() : false_value(); |
1606 } | 1609 } |
1607 | 1610 |
1608 | 1611 |
1609 } } // namespace v8::internal | 1612 } } // namespace v8::internal |
OLD | NEW |