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

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

Issue 2430273007: [runtime] Object.create(null) creates a slow object (Closed)
Patch Set: adding tests Created 4 years, 2 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
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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 compiler::Node* HashSeed(); 102 compiler::Node* HashSeed();
103 compiler::Node* StaleRegisterConstant(); 103 compiler::Node* StaleRegisterConstant();
104 104
105 compiler::Node* IntPtrOrSmiConstant(int value, ParameterMode mode); 105 compiler::Node* IntPtrOrSmiConstant(int value, ParameterMode mode);
106 106
107 compiler::Node* IntPtrAddFoldConstants(compiler::Node* left, 107 compiler::Node* IntPtrAddFoldConstants(compiler::Node* left,
108 compiler::Node* right); 108 compiler::Node* right);
109 compiler::Node* IntPtrSubFoldConstants(compiler::Node* left, 109 compiler::Node* IntPtrSubFoldConstants(compiler::Node* left,
110 compiler::Node* right); 110 compiler::Node* right);
111 void BranchIfWordIsPowerOfTwo(compiler::Node* value, Label* if_true,
112 Label* if_false);
111 113
112 // Float64 operations. 114 // Float64 operations.
113 compiler::Node* Float64Ceil(compiler::Node* x); 115 compiler::Node* Float64Ceil(compiler::Node* x);
114 compiler::Node* Float64Floor(compiler::Node* x); 116 compiler::Node* Float64Floor(compiler::Node* x);
115 compiler::Node* Float64Round(compiler::Node* x); 117 compiler::Node* Float64Round(compiler::Node* x);
116 compiler::Node* Float64Trunc(compiler::Node* x); 118 compiler::Node* Float64Trunc(compiler::Node* x);
117 119
118 // Tag a Word as a Smi value. 120 // Tag a Word as a Smi value.
119 compiler::Node* SmiTag(compiler::Node* value); 121 compiler::Node* SmiTag(compiler::Node* value);
120 // Untag a Smi value as a Word. 122 // Untag a Smi value as a Word.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 426
425 // Allocate a RegExpResult with the given length (the number of captures, 427 // Allocate a RegExpResult with the given length (the number of captures,
426 // including the match itself), index (the index where the match starts), 428 // including the match itself), index (the index where the match starts),
427 // and input string. |length| and |index| are expected to be tagged, and 429 // and input string. |length| and |index| are expected to be tagged, and
428 // |input| must be a string. 430 // |input| must be a string.
429 compiler::Node* AllocateRegExpResult(compiler::Node* context, 431 compiler::Node* AllocateRegExpResult(compiler::Node* context,
430 compiler::Node* length, 432 compiler::Node* length,
431 compiler::Node* index, 433 compiler::Node* index,
432 compiler::Node* input); 434 compiler::Node* input);
433 435
436 compiler::Node* AllocateNameDictionary(int capacity);
437 compiler::Node* AllocateNameDictionary(compiler::Node* capacity);
438
434 compiler::Node* AllocateJSObjectFromMap(compiler::Node* map, 439 compiler::Node* AllocateJSObjectFromMap(compiler::Node* map,
435 compiler::Node* properties = nullptr, 440 compiler::Node* properties = nullptr,
436 compiler::Node* elements = nullptr); 441 compiler::Node* elements = nullptr);
437 442
438 void InitializeJSObjectFromMap(compiler::Node* object, compiler::Node* map, 443 void InitializeJSObjectFromMap(compiler::Node* object, compiler::Node* map,
439 compiler::Node* size, 444 compiler::Node* size,
440 compiler::Node* properties = nullptr, 445 compiler::Node* properties = nullptr,
441 compiler::Node* elements = nullptr); 446 compiler::Node* elements = nullptr);
442 447
443 void InitializeJSObjectBody(compiler::Node* object, compiler::Node* map, 448 void InitializeJSObjectBody(compiler::Node* object, compiler::Node* map,
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 static const int kElementLoopUnrollThreshold = 8; 1103 static const int kElementLoopUnrollThreshold = 8;
1099 }; 1104 };
1100 1105
1101 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__) 1106 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__)
1102 1107
1103 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1108 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1104 1109
1105 } // namespace internal 1110 } // namespace internal
1106 } // namespace v8 1111 } // namespace v8
1107 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1112 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698