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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 V(Map, undetectable_medium_ascii_string_map) \ | 92 V(Map, undetectable_medium_ascii_string_map) \ |
93 V(Map, undetectable_long_ascii_string_map) \ | 93 V(Map, undetectable_long_ascii_string_map) \ |
94 V(Map, byte_array_map) \ | 94 V(Map, byte_array_map) \ |
95 V(Map, fixed_array_map) \ | 95 V(Map, fixed_array_map) \ |
96 V(Map, hash_table_map) \ | 96 V(Map, hash_table_map) \ |
97 V(Map, context_map) \ | 97 V(Map, context_map) \ |
98 V(Map, catch_context_map) \ | 98 V(Map, catch_context_map) \ |
99 V(Map, global_context_map) \ | 99 V(Map, global_context_map) \ |
100 V(Map, code_map) \ | 100 V(Map, code_map) \ |
101 V(Map, oddball_map) \ | 101 V(Map, oddball_map) \ |
| 102 V(Map, global_property_cell_map) \ |
102 V(Map, boilerplate_function_map) \ | 103 V(Map, boilerplate_function_map) \ |
103 V(Map, shared_function_info_map) \ | 104 V(Map, shared_function_info_map) \ |
104 V(Map, proxy_map) \ | 105 V(Map, proxy_map) \ |
105 V(Map, one_word_filler_map) \ | 106 V(Map, one_word_filler_map) \ |
106 V(Map, two_word_filler_map) \ | 107 V(Map, two_word_filler_map) \ |
107 V(Object, nan_value) \ | 108 V(Object, nan_value) \ |
108 V(Object, undefined_value) \ | 109 V(Object, undefined_value) \ |
109 V(Object, minus_zero_value) \ | 110 V(Object, minus_zero_value) \ |
110 V(Object, null_value) \ | 111 V(Object, null_value) \ |
111 V(Object, true_value) \ | 112 V(Object, true_value) \ |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 #endif | 282 #endif |
282 | 283 |
283 // Allocates and initializes a new JavaScript object based on a | 284 // Allocates and initializes a new JavaScript object based on a |
284 // constructor. | 285 // constructor. |
285 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 286 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
286 // failed. | 287 // failed. |
287 // Please note this does not perform a garbage collection. | 288 // Please note this does not perform a garbage collection. |
288 static Object* AllocateJSObject(JSFunction* constructor, | 289 static Object* AllocateJSObject(JSFunction* constructor, |
289 PretenureFlag pretenure = NOT_TENURED); | 290 PretenureFlag pretenure = NOT_TENURED); |
290 | 291 |
| 292 // Allocates and initializes a new JS global object based on a constructor. |
| 293 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 294 // failed. |
| 295 // Please note this does not perform a garbage collection. |
| 296 static Object* AllocateJSGlobalObject(JSFunction* constructor); |
| 297 |
291 // Returns a deep copy of the JavaScript object. | 298 // Returns a deep copy of the JavaScript object. |
292 // Properties and elements are copied too. | 299 // Properties and elements are copied too. |
293 // Returns failure if allocation failed. | 300 // Returns failure if allocation failed. |
294 static Object* CopyJSObject(JSObject* source); | 301 static Object* CopyJSObject(JSObject* source); |
295 | 302 |
296 // Allocates the function prototype. | 303 // Allocates the function prototype. |
297 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 304 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
298 // failed. | 305 // failed. |
299 // Please note this does not perform a garbage collection. | 306 // Please note this does not perform a garbage collection. |
300 static Object* AllocateFunctionPrototype(JSFunction* function); | 307 static Object* AllocateFunctionPrototype(JSFunction* function); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // failed. | 408 // failed. |
402 // Please note this does not perform a garbage collection. | 409 // Please note this does not perform a garbage collection. |
403 static Object* AllocateByteArray(int length, PretenureFlag pretenure); | 410 static Object* AllocateByteArray(int length, PretenureFlag pretenure); |
404 | 411 |
405 // Allocate a non-tenured byte array of the specified length | 412 // Allocate a non-tenured byte array of the specified length |
406 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 413 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
407 // failed. | 414 // failed. |
408 // Please note this does not perform a garbage collection. | 415 // Please note this does not perform a garbage collection. |
409 static Object* AllocateByteArray(int length); | 416 static Object* AllocateByteArray(int length); |
410 | 417 |
| 418 // Allocate a tenured JS global property cell. |
| 419 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 420 // failed. |
| 421 // Please note this does not perform a garbage collection. |
| 422 static Object* AllocateJSGlobalPropertyCell(Object* value); |
| 423 |
411 // Allocates a fixed array initialized with undefined values | 424 // Allocates a fixed array initialized with undefined values |
412 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 425 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
413 // failed. | 426 // failed. |
414 // Please note this does not perform a garbage collection. | 427 // Please note this does not perform a garbage collection. |
415 static Object* AllocateFixedArray(int length, PretenureFlag pretenure); | 428 static Object* AllocateFixedArray(int length, PretenureFlag pretenure); |
416 // Allocate uninitialized, non-tenured fixed array with length elements. | 429 // Allocate uninitialized, non-tenured fixed array with length elements. |
417 static Object* AllocateFixedArray(int length); | 430 static Object* AllocateFixedArray(int length); |
418 | 431 |
419 // Make a copy of src and return it. Returns | 432 // Make a copy of src and return it. Returns |
420 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 433 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 int marked_count_; | 1393 int marked_count_; |
1381 | 1394 |
1382 // The count from the end of the previous full GC. Will be zero if there | 1395 // The count from the end of the previous full GC. Will be zero if there |
1383 // was no previous full GC. | 1396 // was no previous full GC. |
1384 int previous_marked_count_; | 1397 int previous_marked_count_; |
1385 }; | 1398 }; |
1386 | 1399 |
1387 } } // namespace v8::internal | 1400 } } // namespace v8::internal |
1388 | 1401 |
1389 #endif // V8_HEAP_H_ | 1402 #endif // V8_HEAP_H_ |
OLD | NEW |