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

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

Issue 2445333002: Ensure slow properties for simple {__proto__:null} literals. (Closed)
Patch Set: fixing compilation issue Created 3 years, 7 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
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/contexts.h » ('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 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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 Node* start_address = IntPtrAdd( 2040 Node* start_address = IntPtrAdd(
2041 result_word, IntPtrConstant(NameDictionary::OffsetOfElementAt( 2041 result_word, IntPtrConstant(NameDictionary::OffsetOfElementAt(
2042 NameDictionary::kElementsStartIndex) - 2042 NameDictionary::kElementsStartIndex) -
2043 kHeapObjectTag)); 2043 kHeapObjectTag));
2044 Node* end_address = IntPtrAdd( 2044 Node* end_address = IntPtrAdd(
2045 result_word, IntPtrSub(store_size, IntPtrConstant(kHeapObjectTag))); 2045 result_word, IntPtrSub(store_size, IntPtrConstant(kHeapObjectTag)));
2046 StoreFieldsNoWriteBarrier(start_address, end_address, filler); 2046 StoreFieldsNoWriteBarrier(start_address, end_address, filler);
2047 return result; 2047 return result;
2048 } 2048 }
2049 2049
2050 Node* CodeStubAssembler::CopyNameDictionary(Node* dictionary,
2051 Label* large_object_fallback) {
2052 Comment("Copy boilerplate property dict");
2053 Label done(this);
2054 Node* length = SmiUntag(LoadFixedArrayBaseLength(dictionary));
2055 GotoIf(
2056 IntPtrGreaterThan(length, IntPtrConstant(FixedArray::kMaxRegularLength)),
2057 large_object_fallback);
2058 Node* properties =
2059 AllocateNameDictionary(SmiUntag(GetCapacity<NameDictionary>(dictionary)));
2060 CopyFixedArrayElements(FAST_ELEMENTS, dictionary, properties, length,
2061 SKIP_WRITE_BARRIER, INTPTR_PARAMETERS);
2062 return properties;
2063 }
2064
2050 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties, 2065 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties,
2051 Node* elements, 2066 Node* elements,
2052 AllocationFlags flags) { 2067 AllocationFlags flags) {
2053 CSA_ASSERT(this, IsMap(map)); 2068 CSA_ASSERT(this, IsMap(map));
2054 Node* size = 2069 Node* size =
2055 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize)); 2070 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize));
2056 Node* object = AllocateInNewSpace(size, flags); 2071 Node* object = AllocateInNewSpace(size, flags);
2057 StoreMapNoWriteBarrier(object, map); 2072 StoreMapNoWriteBarrier(object, map);
2058 InitializeJSObjectFromMap(object, map, size, properties, elements); 2073 InitializeJSObjectFromMap(object, map, size, properties, elements);
2059 return object; 2074 return object;
(...skipping 6681 matching lines...) Expand 10 before | Expand all | Expand 10 after
8741 formatted.c_str(), TENURED); 8756 formatted.c_str(), TENURED);
8742 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), 8757 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
8743 HeapConstant(string)); 8758 HeapConstant(string));
8744 } 8759 }
8745 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); 8760 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value);
8746 #endif 8761 #endif
8747 } 8762 }
8748 8763
8749 } // namespace internal 8764 } // namespace internal
8750 } // namespace v8 8765 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698