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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
659 | 659 |
660 // Allocates and initializes a new global object based on a constructor. | 660 // Allocates and initializes a new global object based on a constructor. |
661 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 661 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
662 // failed. | 662 // failed. |
663 // Please note this does not perform a garbage collection. | 663 // Please note this does not perform a garbage collection. |
664 MUST_USE_RESULT MaybeObject* AllocateGlobalObject(JSFunction* constructor); | 664 MUST_USE_RESULT MaybeObject* AllocateGlobalObject(JSFunction* constructor); |
665 | 665 |
666 // Returns a deep copy of the JavaScript object. | 666 // Returns a deep copy of the JavaScript object. |
667 // Properties and elements are copied too. | 667 // Properties and elements are copied too. |
668 // Returns failure if allocation failed. | 668 // Returns failure if allocation failed. |
669 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source); | 669 // Optionally takes an AllocationSite to be appended in an AllocationMemento. |
670 | 670 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source, |
671 MUST_USE_RESULT MaybeObject* CopyJSObjectWithAllocationSite( | 671 AllocationSite* site = NULL); |
672 JSObject* source, AllocationSite* site); | |
673 | 672 |
674 // Allocates the function prototype. | 673 // Allocates the function prototype. |
675 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 674 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
676 // failed. | 675 // failed. |
677 // Please note this does not perform a garbage collection. | 676 // Please note this does not perform a garbage collection. |
678 MUST_USE_RESULT MaybeObject* AllocateFunctionPrototype(JSFunction* function); | 677 MUST_USE_RESULT MaybeObject* AllocateFunctionPrototype(JSFunction* function); |
679 | 678 |
680 // Allocates a JS ArrayBuffer object. | 679 // Allocates a JS ArrayBuffer object. |
681 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 680 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
682 // failed. | 681 // failed. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1000 // Allocate a 'with' context. | 999 // Allocate a 'with' context. |
1001 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function, | 1000 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function, |
1002 Context* previous, | 1001 Context* previous, |
1003 JSReceiver* extension); | 1002 JSReceiver* extension); |
1004 | 1003 |
1005 // Allocate a block context. | 1004 // Allocate a block context. |
1006 MUST_USE_RESULT MaybeObject* AllocateBlockContext(JSFunction* function, | 1005 MUST_USE_RESULT MaybeObject* AllocateBlockContext(JSFunction* function, |
1007 Context* previous, | 1006 Context* previous, |
1008 ScopeInfo* info); | 1007 ScopeInfo* info); |
1009 | 1008 |
1010 // Allocates a new utility object in the old generation. | 1009 // Allocates a new utility object |
Michael Starzinger
2013/09/19 16:45:25
I liked that comment, can we get it back?
mvstanton
2013/09/20 09:19:15
absolutely, it was removed because for a while I w
| |
1011 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); | 1010 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); |
1012 | 1011 |
1013 // Allocates a function initialized with a shared part. | 1012 // Allocates a function initialized with a shared part. |
1014 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1013 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
1015 // failed. | 1014 // failed. |
1016 // Please note this does not perform a garbage collection. | 1015 // Please note this does not perform a garbage collection. |
1017 MUST_USE_RESULT MaybeObject* AllocateFunction( | 1016 MUST_USE_RESULT MaybeObject* AllocateFunction( |
1018 Map* function_map, | 1017 Map* function_map, |
1019 SharedFunctionInfo* shared, | 1018 SharedFunctionInfo* shared, |
1020 Object* prototype, | 1019 Object* prototype, |
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3023 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3022 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3024 | 3023 |
3025 private: | 3024 private: |
3026 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3025 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3027 }; | 3026 }; |
3028 #endif // DEBUG | 3027 #endif // DEBUG |
3029 | 3028 |
3030 } } // namespace v8::internal | 3029 } } // namespace v8::internal |
3031 | 3030 |
3032 #endif // V8_HEAP_H_ | 3031 #endif // V8_HEAP_H_ |
OLD | NEW |