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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 | 279 |
280 Handle<Object> LookupSingleCharacterStringFromCode(Isolate* isolate, | 280 Handle<Object> LookupSingleCharacterStringFromCode(Isolate* isolate, |
281 uint32_t index) { | 281 uint32_t index) { |
282 CALL_HEAP_FUNCTION( | 282 CALL_HEAP_FUNCTION( |
283 isolate, | 283 isolate, |
284 isolate->heap()->LookupSingleCharacterStringFromCode(index), Object); | 284 isolate->heap()->LookupSingleCharacterStringFromCode(index), Object); |
285 } | 285 } |
286 | 286 |
287 | 287 |
288 Handle<String> SubString(Handle<String> str, | |
289 int start, | |
290 int end, | |
291 PretenureFlag pretenure) { | |
292 CALL_HEAP_FUNCTION(str->GetIsolate(), | |
293 str->SubString(start, end, pretenure), String); | |
294 } | |
295 | |
296 | |
297 // Wrappers for scripts are kept alive and cached in weak global | 288 // Wrappers for scripts are kept alive and cached in weak global |
298 // handles referred from foreign objects held by the scripts as long as | 289 // handles referred from foreign objects held by the scripts as long as |
299 // they are used. When they are not used anymore, the garbage | 290 // they are used. When they are not used anymore, the garbage |
300 // collector will call the weak callback on the global handle | 291 // collector will call the weak callback on the global handle |
301 // associated with the wrapper and get rid of both the wrapper and the | 292 // associated with the wrapper and get rid of both the wrapper and the |
302 // handle. | 293 // handle. |
303 static void ClearWrapperCache(v8::Isolate* v8_isolate, | 294 static void ClearWrapperCache(v8::Isolate* v8_isolate, |
304 Persistent<v8::Value>* handle, | 295 Persistent<v8::Value>* handle, |
305 void*) { | 296 void*) { |
306 Handle<Object> cache = Utils::OpenPersistent(handle); | 297 Handle<Object> cache = Utils::OpenPersistent(handle); |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 data->next = prev_next_; | 875 data->next = prev_next_; |
885 data->limit = prev_limit_; | 876 data->limit = prev_limit_; |
886 #ifdef DEBUG | 877 #ifdef DEBUG |
887 handles_detached_ = true; | 878 handles_detached_ = true; |
888 #endif | 879 #endif |
889 return deferred; | 880 return deferred; |
890 } | 881 } |
891 | 882 |
892 | 883 |
893 } } // namespace v8::internal | 884 } } // namespace v8::internal |
OLD | NEW |