OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 void Heap::SetKeyedLookupCache(LookupCache* cache) { | 204 void Heap::SetKeyedLookupCache(LookupCache* cache) { |
205 keyed_lookup_cache_ = cache; | 205 keyed_lookup_cache_ = cache; |
206 } | 206 } |
207 | 207 |
208 | 208 |
209 void Heap::ClearKeyedLookupCache() { | 209 void Heap::ClearKeyedLookupCache() { |
210 keyed_lookup_cache_ = undefined_value(); | 210 keyed_lookup_cache_ = undefined_value(); |
211 } | 211 } |
212 | 212 |
213 | 213 |
| 214 void Heap::SetLastScriptId(Object* last_script_id) { |
| 215 last_script_id_ = last_script_id; |
| 216 } |
| 217 |
| 218 |
214 #define GC_GREEDY_CHECK() \ | 219 #define GC_GREEDY_CHECK() \ |
215 ASSERT(!FLAG_gc_greedy || v8::internal::Heap::GarbageCollectionGreedyCheck()) | 220 ASSERT(!FLAG_gc_greedy || v8::internal::Heap::GarbageCollectionGreedyCheck()) |
216 | 221 |
217 | 222 |
218 // Calls the FUNCTION_CALL function and retries it up to three times | 223 // Calls the FUNCTION_CALL function and retries it up to three times |
219 // to guarantee that any allocations performed during the call will | 224 // to guarantee that any allocations performed during the call will |
220 // succeed if there's enough memory. | 225 // succeed if there's enough memory. |
221 | 226 |
222 // Warning: Do not use the identifiers __object__ or __scope__ in a | 227 // Warning: Do not use the identifiers __object__ or __scope__ in a |
223 // call to this macro. | 228 // call to this macro. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 allocation_allowed_ = new_state; | 277 allocation_allowed_ = new_state; |
273 return old; | 278 return old; |
274 } | 279 } |
275 | 280 |
276 #endif | 281 #endif |
277 | 282 |
278 | 283 |
279 } } // namespace v8::internal | 284 } } // namespace v8::internal |
280 | 285 |
281 #endif // V8_HEAP_INL_H_ | 286 #endif // V8_HEAP_INL_H_ |
OLD | NEW |