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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 | 205 |
206 Handle<Object> GetProperty(Isolate* isolate, | 206 Handle<Object> GetProperty(Isolate* isolate, |
207 Handle<Object> obj, | 207 Handle<Object> obj, |
208 Handle<Object> key) { | 208 Handle<Object> key) { |
209 CALL_HEAP_FUNCTION(isolate, | 209 CALL_HEAP_FUNCTION(isolate, |
210 Runtime::GetObjectProperty(isolate, obj, key), Object); | 210 Runtime::GetObjectProperty(isolate, obj, key), Object); |
211 } | 211 } |
212 | 212 |
213 | 213 |
214 Handle<Object> LookupSingleCharacterStringFromCode(Isolate* isolate, | 214 Handle<String> LookupSingleCharacterStringFromCode(Isolate* isolate, |
215 uint32_t index) { | 215 uint32_t index) { |
216 CALL_HEAP_FUNCTION( | 216 CALL_HEAP_FUNCTION( |
217 isolate, | 217 isolate, |
218 isolate->heap()->LookupSingleCharacterStringFromCode(index), Object); | 218 isolate->heap()->LookupSingleCharacterStringFromCode(index), |
| 219 String); |
219 } | 220 } |
220 | 221 |
221 | 222 |
222 // Wrappers for scripts are kept alive and cached in weak global | 223 // Wrappers for scripts are kept alive and cached in weak global |
223 // handles referred from foreign objects held by the scripts as long as | 224 // handles referred from foreign objects held by the scripts as long as |
224 // they are used. When they are not used anymore, the garbage | 225 // they are used. When they are not used anymore, the garbage |
225 // collector will call the weak callback on the global handle | 226 // collector will call the weak callback on the global handle |
226 // associated with the wrapper and get rid of both the wrapper and the | 227 // associated with the wrapper and get rid of both the wrapper and the |
227 // handle. | 228 // handle. |
228 static void ClearWrapperCache(v8::Isolate* v8_isolate, | 229 static void ClearWrapperCache(v8::Isolate* v8_isolate, |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 Handle<Code> code) { | 796 Handle<Code> code) { |
796 heap->EnsureWeakObjectToCodeTable(); | 797 heap->EnsureWeakObjectToCodeTable(); |
797 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); | 798 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); |
798 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); | 799 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); |
799 CALL_HEAP_FUNCTION_VOID(heap->isolate(), | 800 CALL_HEAP_FUNCTION_VOID(heap->isolate(), |
800 heap->AddWeakObjectToCodeDependency(*object, *dep)); | 801 heap->AddWeakObjectToCodeDependency(*object, *dep)); |
801 } | 802 } |
802 | 803 |
803 | 804 |
804 } } // namespace v8::internal | 805 } } // namespace v8::internal |
OLD | NEW |