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(); | 533 MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context, |
| 534 ScopeInfo* scope_info); |
534 | 535 |
535 // Allocate a JSArray with no elements | 536 // Allocate a JSArray with no elements |
536 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( | 537 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( |
537 ElementsKind elements_kind, | 538 ElementsKind elements_kind, |
538 PretenureFlag pretenure = NOT_TENURED) { | 539 PretenureFlag pretenure = NOT_TENURED) { |
539 return AllocateJSArrayAndStorage(elements_kind, 0, 0, | 540 return AllocateJSArrayAndStorage(elements_kind, 0, 0, |
540 DONT_INITIALIZE_ARRAY_ELEMENTS, | 541 DONT_INITIALIZE_ARRAY_ELEMENTS, |
541 pretenure); | 542 pretenure); |
542 } | 543 } |
543 | 544 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 | 818 |
818 // AllocateHashTable is identical to AllocateFixedArray except | 819 // AllocateHashTable is identical to AllocateFixedArray except |
819 // that the resulting object has hash_table_map as map. | 820 // that the resulting object has hash_table_map as map. |
820 MUST_USE_RESULT MaybeObject* AllocateHashTable( | 821 MUST_USE_RESULT MaybeObject* AllocateHashTable( |
821 int length, PretenureFlag pretenure = NOT_TENURED); | 822 int length, PretenureFlag pretenure = NOT_TENURED); |
822 | 823 |
823 // Allocate a global (but otherwise uninitialized) context. | 824 // Allocate a global (but otherwise uninitialized) context. |
824 MUST_USE_RESULT MaybeObject* AllocateGlobalContext(); | 825 MUST_USE_RESULT MaybeObject* AllocateGlobalContext(); |
825 | 826 |
826 // Allocate a module context. | 827 // Allocate a module context. |
827 MUST_USE_RESULT MaybeObject* AllocateModuleContext(Context* previous, | 828 MUST_USE_RESULT MaybeObject* AllocateModuleContext(ScopeInfo* scope_info); |
828 ScopeInfo* scope_info); | |
829 | 829 |
830 // Allocate a function context. | 830 // Allocate a function context. |
831 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length, | 831 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length, |
832 JSFunction* function); | 832 JSFunction* function); |
833 | 833 |
834 // Allocate a catch context. | 834 // Allocate a catch context. |
835 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, | 835 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, |
836 Context* previous, | 836 Context* previous, |
837 String* name, | 837 String* name, |
838 Object* thrown_object); | 838 Object* thrown_object); |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2701 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2701 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2702 | 2702 |
2703 private: | 2703 private: |
2704 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2704 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2705 }; | 2705 }; |
2706 #endif // DEBUG || LIVE_OBJECT_LIST | 2706 #endif // DEBUG || LIVE_OBJECT_LIST |
2707 | 2707 |
2708 } } // namespace v8::internal | 2708 } } // namespace v8::internal |
2709 | 2709 |
2710 #endif // V8_HEAP_H_ | 2710 #endif // V8_HEAP_H_ |
OLD | NEW |