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

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

Issue 2419433008: Improve CodeStubAssembler assert functionality (Closed)
Patch Set: Fix memory leak 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
« no previous file with comments | « no previous file | src/code-stub-assembler.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 #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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return WordOr(a, b); 140 return WordOr(a, b);
141 } 141 }
142 142
143 // Allocate an object of the given size. 143 // Allocate an object of the given size.
144 compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone); 144 compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone);
145 compiler::Node* Allocate(int size, AllocationFlags flags = kNone); 145 compiler::Node* Allocate(int size, AllocationFlags flags = kNone);
146 compiler::Node* InnerAllocate(compiler::Node* previous, int offset); 146 compiler::Node* InnerAllocate(compiler::Node* previous, int offset);
147 compiler::Node* InnerAllocate(compiler::Node* previous, 147 compiler::Node* InnerAllocate(compiler::Node* previous,
148 compiler::Node* offset); 148 compiler::Node* offset);
149 149
150 void Assert(compiler::Node* condition); 150 void Assert(compiler::Node* condition, const char* string = nullptr,
151 const char* file = nullptr, int line = 0);
151 152
152 // Check a value for smi-ness 153 // Check a value for smi-ness
153 compiler::Node* TaggedIsSmi(compiler::Node* a); 154 compiler::Node* TaggedIsSmi(compiler::Node* a);
154 // Check that the value is a non-negative smi. 155 // Check that the value is a non-negative smi.
155 compiler::Node* WordIsPositiveSmi(compiler::Node* a); 156 compiler::Node* WordIsPositiveSmi(compiler::Node* a);
156 157
157 void BranchIfSmiEqual(compiler::Node* a, compiler::Node* b, Label* if_true, 158 void BranchIfSmiEqual(compiler::Node* a, compiler::Node* b, Label* if_true,
158 Label* if_false) { 159 Label* if_false) {
159 BranchIf(SmiEqual(a, b), if_true, if_false); 160 BranchIf(SmiEqual(a, b), if_true, if_false);
160 } 161 }
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 // Emits keyed sloppy arguments load if the |value| is nullptr or store 984 // Emits keyed sloppy arguments load if the |value| is nullptr or store
984 // otherwise. Returns either the loaded value or |value|. 985 // otherwise. Returns either the loaded value or |value|.
985 compiler::Node* EmitKeyedSloppyArguments(compiler::Node* receiver, 986 compiler::Node* EmitKeyedSloppyArguments(compiler::Node* receiver,
986 compiler::Node* key, 987 compiler::Node* key,
987 compiler::Node* value, 988 compiler::Node* value,
988 Label* bailout); 989 Label* bailout);
989 990
990 static const int kElementLoopUnrollThreshold = 8; 991 static const int kElementLoopUnrollThreshold = 8;
991 }; 992 };
992 993
994 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__)
995
993 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 996 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
994 997
995 } // namespace internal 998 } // namespace internal
996 } // namespace v8 999 } // namespace v8
997 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1000 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698