OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_COMPILER_CODE_STUB_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 // Clients of this interface shouldn't depend on lots of compiler internals. | 10 // Clients of this interface shouldn't depend on lots of compiler internals. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 // Smi conversions. | 247 // Smi conversions. |
248 Node* SmiToFloat64(Node* value); | 248 Node* SmiToFloat64(Node* value); |
249 Node* SmiToInt32(Node* value); | 249 Node* SmiToInt32(Node* value); |
250 | 250 |
251 // Smi operations. | 251 // Smi operations. |
252 Node* SmiAdd(Node* a, Node* b); | 252 Node* SmiAdd(Node* a, Node* b); |
253 Node* SmiEqual(Node* a, Node* b); | 253 Node* SmiEqual(Node* a, Node* b); |
254 Node* SmiLessThan(Node* a, Node* b); | 254 Node* SmiLessThan(Node* a, Node* b); |
255 Node* SmiLessThanOrEqual(Node* a, Node* b); | 255 Node* SmiLessThanOrEqual(Node* a, Node* b); |
| 256 Node* SmiMin(Node* a, Node* b); |
256 | 257 |
257 // Load a value from the root array. | 258 // Load a value from the root array. |
258 Node* LoadRoot(Heap::RootListIndex root_index); | 259 Node* LoadRoot(Heap::RootListIndex root_index); |
259 | 260 |
260 // Check a value for smi-ness | 261 // Check a value for smi-ness |
261 Node* WordIsSmi(Node* a); | 262 Node* WordIsSmi(Node* a); |
262 | 263 |
263 // Load an object pointer from a buffer that isn't in the heap. | 264 // Load an object pointer from a buffer that isn't in the heap. |
264 Node* LoadBufferObject(Node* buffer, int offset); | 265 Node* LoadBufferObject(Node* buffer, int offset); |
265 // Load a field from an object on the heap. | 266 // Load a field from an object on the heap. |
(...skipping 19 matching lines...) Expand all Loading... |
285 // Returns a node that is true if the given bit is set in |word32|. | 286 // Returns a node that is true if the given bit is set in |word32|. |
286 template <typename T> | 287 template <typename T> |
287 Node* BitFieldDecode(Node* word32) { | 288 Node* BitFieldDecode(Node* word32) { |
288 return BitFieldDecode(word32, T::kShift, T::kMask); | 289 return BitFieldDecode(word32, T::kShift, T::kMask); |
289 } | 290 } |
290 | 291 |
291 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); | 292 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); |
292 | 293 |
293 // Branching helpers. | 294 // Branching helpers. |
294 // TODO(danno): Can we be more cleverish wrt. edge-split? | 295 // TODO(danno): Can we be more cleverish wrt. edge-split? |
| 296 void BranchIfInt32LessThan(Node* a, Node* b, Label* if_true, Label* if_false); |
295 void BranchIfSmiLessThan(Node* a, Node* b, Label* if_true, Label* if_false); | 297 void BranchIfSmiLessThan(Node* a, Node* b, Label* if_true, Label* if_false); |
296 void BranchIfSmiLessThanOrEqual(Node* a, Node* b, Label* if_true, | 298 void BranchIfSmiLessThanOrEqual(Node* a, Node* b, Label* if_true, |
297 Label* if_false); | 299 Label* if_false); |
298 void BranchIfFloat64Equal(Node* a, Node* b, Label* if_true, Label* if_false); | 300 void BranchIfFloat64Equal(Node* a, Node* b, Label* if_true, Label* if_false); |
299 void BranchIfFloat64LessThan(Node* a, Node* b, Label* if_true, | 301 void BranchIfFloat64LessThan(Node* a, Node* b, Label* if_true, |
300 Label* if_false); | 302 Label* if_false); |
301 void BranchIfFloat64LessThanOrEqual(Node* a, Node* b, Label* if_true, | 303 void BranchIfFloat64LessThanOrEqual(Node* a, Node* b, Label* if_true, |
302 Label* if_false); | 304 Label* if_false); |
303 void BranchIfFloat64GreaterThan(Node* a, Node* b, Label* if_true, | 305 void BranchIfFloat64GreaterThan(Node* a, Node* b, Label* if_true, |
304 Label* if_false); | 306 Label* if_false); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 // Map of variables to the list of value nodes that have been added from each | 382 // Map of variables to the list of value nodes that have been added from each |
381 // merge path in their order of merging. | 383 // merge path in their order of merging. |
382 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 384 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
383 }; | 385 }; |
384 | 386 |
385 } // namespace compiler | 387 } // namespace compiler |
386 } // namespace internal | 388 } // namespace internal |
387 } // namespace v8 | 389 } // namespace v8 |
388 | 390 |
389 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 391 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |