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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } | 523 bool UncommitFromSpace() { return new_space_.UncommitFromSpace(); } |
524 | 524 |
525 // Allocates and initializes a new JavaScript object based on a | 525 // Allocates and initializes a new JavaScript object based on a |
526 // constructor. | 526 // constructor. |
527 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 527 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
528 // failed. | 528 // failed. |
529 // Please note this does not perform a garbage collection. | 529 // Please note this does not perform a garbage collection. |
530 MUST_USE_RESULT MaybeObject* AllocateJSObject( | 530 MUST_USE_RESULT MaybeObject* AllocateJSObject( |
531 JSFunction* constructor, PretenureFlag pretenure = NOT_TENURED); | 531 JSFunction* constructor, PretenureFlag pretenure = NOT_TENURED); |
532 | 532 |
| 533 MUST_USE_RESULT MaybeObject* AllocateJSModule(); |
| 534 |
533 // Allocate a JSArray with no elements | 535 // Allocate a JSArray with no elements |
534 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( | 536 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( |
535 ElementsKind elements_kind, | 537 ElementsKind elements_kind, |
536 PretenureFlag pretenure = NOT_TENURED) { | 538 PretenureFlag pretenure = NOT_TENURED) { |
537 return AllocateJSArrayAndStorage(elements_kind, 0, 0, | 539 return AllocateJSArrayAndStorage(elements_kind, 0, 0, |
538 DONT_INITIALIZE_ARRAY_ELEMENTS, | 540 DONT_INITIALIZE_ARRAY_ELEMENTS, |
539 pretenure); | 541 pretenure); |
540 } | 542 } |
541 | 543 |
542 // Allocate a JSArray with a specified length but elements that are left | 544 // Allocate a JSArray with a specified length but elements that are left |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 PretenureFlag pretenure = NOT_TENURED); | 816 PretenureFlag pretenure = NOT_TENURED); |
815 | 817 |
816 // AllocateHashTable is identical to AllocateFixedArray except | 818 // AllocateHashTable is identical to AllocateFixedArray except |
817 // that the resulting object has hash_table_map as map. | 819 // that the resulting object has hash_table_map as map. |
818 MUST_USE_RESULT MaybeObject* AllocateHashTable( | 820 MUST_USE_RESULT MaybeObject* AllocateHashTable( |
819 int length, PretenureFlag pretenure = NOT_TENURED); | 821 int length, PretenureFlag pretenure = NOT_TENURED); |
820 | 822 |
821 // Allocate a global (but otherwise uninitialized) context. | 823 // Allocate a global (but otherwise uninitialized) context. |
822 MUST_USE_RESULT MaybeObject* AllocateGlobalContext(); | 824 MUST_USE_RESULT MaybeObject* AllocateGlobalContext(); |
823 | 825 |
| 826 // Allocate a module context. |
| 827 MUST_USE_RESULT MaybeObject* AllocateModuleContext(Context* previous, |
| 828 ScopeInfo* scope_info); |
| 829 |
824 // Allocate a function context. | 830 // Allocate a function context. |
825 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length, | 831 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length, |
826 JSFunction* function); | 832 JSFunction* function); |
827 | 833 |
828 // Allocate a catch context. | 834 // Allocate a catch context. |
829 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, | 835 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, |
830 Context* previous, | 836 Context* previous, |
831 String* name, | 837 String* name, |
832 Object* thrown_object); | 838 Object* thrown_object); |
833 // Allocate a 'with' context. | 839 // Allocate a 'with' context. |
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2677 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2672 | 2678 |
2673 private: | 2679 private: |
2674 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2680 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2675 }; | 2681 }; |
2676 #endif // DEBUG || LIVE_OBJECT_LIST | 2682 #endif // DEBUG || LIVE_OBJECT_LIST |
2677 | 2683 |
2678 } } // namespace v8::internal | 2684 } } // namespace v8::internal |
2679 | 2685 |
2680 #endif // V8_HEAP_H_ | 2686 #endif // V8_HEAP_H_ |
OLD | NEW |