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

Side by Side Diff: src/builtins/builtins-constructor.h

Issue 2607233002: [builtins] Add EmitFastNewObject (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | src/builtins/builtins-constructor.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 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 4
5 #include "src/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 typedef compiler::Node Node; 10 typedef compiler::Node Node;
(...skipping 26 matching lines...) Expand all
37 AllocationSiteMode allocation_site_mode); 37 AllocationSiteMode allocation_site_mode);
38 38
39 // Maximum number of properties in copied objects. 39 // Maximum number of properties in copied objects.
40 static const int kMaximumClonedShallowObjectProperties = 6; 40 static const int kMaximumClonedShallowObjectProperties = 6;
41 static int FastCloneShallowObjectPropertiesCount(int literal_length); 41 static int FastCloneShallowObjectPropertiesCount(int literal_length);
42 Node* EmitFastCloneShallowObject(CodeAssemblerLabel* call_runtime, 42 Node* EmitFastCloneShallowObject(CodeAssemblerLabel* call_runtime,
43 Node* closure, Node* literals_index, 43 Node* closure, Node* literals_index,
44 Node* properties_count); 44 Node* properties_count);
45 void CreateFastCloneShallowObjectBuiltin(int properties_count); 45 void CreateFastCloneShallowObjectBuiltin(int properties_count);
46 46
47 Node* EmitFastNewObject(Node* context, Node* target, Node* new_target);
48
49 Node* EmitFastNewObject(Node* context, Node* target, Node* new_target,
50 CodeAssemblerLabel* call_runtime);
51
47 private: 52 private:
48 static const int kMaximumSlots = 0x8000; 53 static const int kMaximumSlots = 0x8000;
49 static const int kSmallMaximumSlots = 10; 54 static const int kSmallMaximumSlots = 10;
50 55
51 Node* NonEmptyShallowClone(Node* boilerplate, Node* boilerplate_map, 56 Node* NonEmptyShallowClone(Node* boilerplate, Node* boilerplate_map,
52 Node* boilerplate_elements, Node* allocation_site, 57 Node* boilerplate_elements, Node* allocation_site,
53 Node* capacity, ElementsKind kind); 58 Node* capacity, ElementsKind kind);
54 59
55 // FastNewFunctionContext can only allocate closures which fit in the 60 // FastNewFunctionContext can only allocate closures which fit in the
56 // new space. 61 // new space.
57 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize + 62 STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
58 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize); 63 FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize);
59 }; 64 };
60 65
61 } // namespace internal 66 } // namespace internal
62 } // namespace v8 67 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-constructor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698