Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: src/heap.h

Issue 24202003: Delete obsolete JSArray allocation functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/builtins.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 628
629 // Allocate a JSArray with no elements 629 // Allocate a JSArray with no elements
630 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( 630 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray(
631 ElementsKind elements_kind, 631 ElementsKind elements_kind,
632 PretenureFlag pretenure = NOT_TENURED) { 632 PretenureFlag pretenure = NOT_TENURED) {
633 return AllocateJSArrayAndStorage(elements_kind, 0, 0, 633 return AllocateJSArrayAndStorage(elements_kind, 0, 0,
634 DONT_INITIALIZE_ARRAY_ELEMENTS, 634 DONT_INITIALIZE_ARRAY_ELEMENTS,
635 pretenure); 635 pretenure);
636 } 636 }
637 637
638 inline MUST_USE_RESULT MaybeObject* AllocateEmptyJSArrayWithAllocationSite(
639 ElementsKind elements_kind,
640 Handle<AllocationSite> allocation_site);
641
642 // Allocate a JSArray with a specified length but elements that are left 638 // Allocate a JSArray with a specified length but elements that are left
643 // uninitialized. 639 // uninitialized.
644 MUST_USE_RESULT MaybeObject* AllocateJSArrayAndStorage( 640 MUST_USE_RESULT MaybeObject* AllocateJSArrayAndStorage(
645 ElementsKind elements_kind, 641 ElementsKind elements_kind,
646 int length, 642 int length,
647 int capacity, 643 int capacity,
648 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS, 644 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS,
649 PretenureFlag pretenure = NOT_TENURED); 645 PretenureFlag pretenure = NOT_TENURED);
650 646
651 MUST_USE_RESULT MaybeObject* AllocateJSArrayAndStorageWithAllocationSite(
652 ElementsKind elements_kind,
653 int length,
654 int capacity,
655 Handle<AllocationSite> allocation_site,
656 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
657
658 MUST_USE_RESULT MaybeObject* AllocateJSArrayStorage( 647 MUST_USE_RESULT MaybeObject* AllocateJSArrayStorage(
659 JSArray* array, 648 JSArray* array,
660 int length, 649 int length,
661 int capacity, 650 int capacity,
662 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); 651 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
663 652
664 // Allocate a JSArray with no elements 653 // Allocate a JSArray with no elements
665 MUST_USE_RESULT MaybeObject* AllocateJSArrayWithElements( 654 MUST_USE_RESULT MaybeObject* AllocateJSArrayWithElements(
666 FixedArrayBase* array_base, 655 FixedArrayBase* array_base,
667 ElementsKind elements_kind, 656 ElementsKind elements_kind,
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 2096
2108 MUST_USE_RESULT MaybeObject* CreateOddball(const char* to_string, 2097 MUST_USE_RESULT MaybeObject* CreateOddball(const char* to_string,
2109 Object* to_number, 2098 Object* to_number,
2110 byte kind); 2099 byte kind);
2111 2100
2112 // Allocate a JSArray with no elements 2101 // Allocate a JSArray with no elements
2113 MUST_USE_RESULT MaybeObject* AllocateJSArray( 2102 MUST_USE_RESULT MaybeObject* AllocateJSArray(
2114 ElementsKind elements_kind, 2103 ElementsKind elements_kind,
2115 PretenureFlag pretenure = NOT_TENURED); 2104 PretenureFlag pretenure = NOT_TENURED);
2116 2105
2117 MUST_USE_RESULT MaybeObject* AllocateJSArrayWithAllocationSite(
2118 ElementsKind elements_kind,
2119 Handle<AllocationSite> allocation_site);
2120
2121 // Allocate empty fixed array. 2106 // Allocate empty fixed array.
2122 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2107 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2123 2108
2124 // Allocate empty external array of given type. 2109 // Allocate empty external array of given type.
2125 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2110 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2126 ExternalArrayType array_type); 2111 ExternalArrayType array_type);
2127 2112
2128 // Allocate empty fixed double array. 2113 // Allocate empty fixed double array.
2129 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); 2114 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray();
2130 2115
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
3038 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3023 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3039 3024
3040 private: 3025 private:
3041 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3026 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3042 }; 3027 };
3043 #endif // DEBUG 3028 #endif // DEBUG
3044 3029
3045 } } // namespace v8::internal 3030 } } // namespace v8::internal
3046 3031
3047 #endif // V8_HEAP_H_ 3032 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698