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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 // Allocates a function initialized with a shared part. | 484 // Allocates a function initialized with a shared part. |
485 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 485 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
486 // failed. | 486 // failed. |
487 // Please note this does not perform a garbage collection. | 487 // Please note this does not perform a garbage collection. |
488 static Object* AllocateFunction(Map* function_map, | 488 static Object* AllocateFunction(Map* function_map, |
489 SharedFunctionInfo* shared, | 489 SharedFunctionInfo* shared, |
490 Object* prototype, | 490 Object* prototype, |
491 PretenureFlag pretenure = TENURED); | 491 PretenureFlag pretenure = TENURED); |
492 | 492 |
493 // Indicies for direct access into argument objects. | 493 // Indicies for direct access into argument objects. |
| 494 static const int kArgumentsObjectSize = |
| 495 JSObject::kHeaderSize + 2 * kPointerSize; |
494 static const int arguments_callee_index = 0; | 496 static const int arguments_callee_index = 0; |
495 static const int arguments_length_index = 1; | 497 static const int arguments_length_index = 1; |
496 | 498 |
497 // Allocates an arguments object - optionally with an elements array. | 499 // Allocates an arguments object - optionally with an elements array. |
498 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 500 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
499 // failed. | 501 // failed. |
500 // Please note this does not perform a garbage collection. | 502 // Please note this does not perform a garbage collection. |
501 static Object* AllocateArgumentsObject(Object* callee, int length); | 503 static Object* AllocateArgumentsObject(Object* callee, int length); |
502 | 504 |
503 // Converts a double into either a Smi or a HeapNumber object. | 505 // Converts a double into either a Smi or a HeapNumber object. |
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 | 1678 |
1677 // To speed up scavenge collections new space string are kept | 1679 // To speed up scavenge collections new space string are kept |
1678 // separate from old space strings. | 1680 // separate from old space strings. |
1679 static List<Object*> new_space_strings_; | 1681 static List<Object*> new_space_strings_; |
1680 static List<Object*> old_space_strings_; | 1682 static List<Object*> old_space_strings_; |
1681 }; | 1683 }; |
1682 | 1684 |
1683 } } // namespace v8::internal | 1685 } } // namespace v8::internal |
1684 | 1686 |
1685 #endif // V8_HEAP_H_ | 1687 #endif // V8_HEAP_H_ |
OLD | NEW |