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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2581443002: [stubs] Add AllocationFlags parameter to AllocateJSObjectFromMap (Closed)
Patch Set: Add flags Created 4 years 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
« no previous file with comments | « src/code-stub-assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 NameDictionary::kElementsStartIndex) - 1892 NameDictionary::kElementsStartIndex) -
1893 kHeapObjectTag)); 1893 kHeapObjectTag));
1894 Node* end_address = IntPtrAdd( 1894 Node* end_address = IntPtrAdd(
1895 result_word, 1895 result_word,
1896 IntPtrSubFoldConstants(store_size, IntPtrConstant(kHeapObjectTag))); 1896 IntPtrSubFoldConstants(store_size, IntPtrConstant(kHeapObjectTag)));
1897 StoreFieldsNoWriteBarrier(start_address, end_address, filler); 1897 StoreFieldsNoWriteBarrier(start_address, end_address, filler);
1898 return result; 1898 return result;
1899 } 1899 }
1900 1900
1901 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties, 1901 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties,
1902 Node* elements) { 1902 Node* elements,
1903 AllocationFlags flags) {
1903 CSA_ASSERT(this, IsMap(map)); 1904 CSA_ASSERT(this, IsMap(map));
1904 Node* size = 1905 Node* size =
1905 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize)); 1906 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize));
1906 CSA_ASSERT(this, IsRegularHeapObjectSize(size)); 1907 CSA_ASSERT(this, IsRegularHeapObjectSize(size));
1907 Node* object = Allocate(size); 1908 Node* object = Allocate(size, flags);
1908 StoreMapNoWriteBarrier(object, map); 1909 StoreMapNoWriteBarrier(object, map);
1909 InitializeJSObjectFromMap(object, map, size, properties, elements); 1910 InitializeJSObjectFromMap(object, map, size, properties, elements);
1910 return object; 1911 return object;
1911 } 1912 }
1912 1913
1913 void CodeStubAssembler::InitializeJSObjectFromMap(Node* object, Node* map, 1914 void CodeStubAssembler::InitializeJSObjectFromMap(Node* object, Node* map,
1914 Node* size, Node* properties, 1915 Node* size, Node* properties,
1915 Node* elements) { 1916 Node* elements) {
1916 // This helper assumes that the object is in new-space, as guarded by the 1917 // This helper assumes that the object is in new-space, as guarded by the
1917 // check in AllocatedJSObjectFromMap. 1918 // check in AllocatedJSObjectFromMap.
(...skipping 6363 matching lines...) Expand 10 before | Expand all | Expand 10 after
8281 Heap::kUndefinedValueRootIndex); 8282 Heap::kUndefinedValueRootIndex);
8282 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, 8283 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset,
8283 Heap::kUndefinedValueRootIndex); 8284 Heap::kUndefinedValueRootIndex);
8284 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, 8285 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset,
8285 context); 8286 context);
8286 return result; 8287 return result;
8287 } 8288 }
8288 8289
8289 } // namespace internal 8290 } // namespace internal
8290 } // namespace v8 8291 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698