| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |