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

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

Issue 1825793002: [stubs] Introduce code stubs for bitwise binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 #define CODE_STUB_ASSEMBLER_BINARY_OP_LIST(V) \ 64 #define CODE_STUB_ASSEMBLER_BINARY_OP_LIST(V) \
65 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \ 65 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \
66 V(Float64Add) \ 66 V(Float64Add) \
67 V(Float64Sub) \ 67 V(Float64Sub) \
68 V(IntPtrAdd) \ 68 V(IntPtrAdd) \
69 V(IntPtrAddWithOverflow) \ 69 V(IntPtrAddWithOverflow) \
70 V(IntPtrSub) \ 70 V(IntPtrSub) \
71 V(IntPtrSubWithOverflow) \ 71 V(IntPtrSubWithOverflow) \
72 V(Int32Add) \ 72 V(Int32Add) \
73 V(Int32AddWithOverflow) \
73 V(Int32Sub) \ 74 V(Int32Sub) \
74 V(Int32Mul) \ 75 V(Int32Mul) \
75 V(WordOr) \ 76 V(WordOr) \
76 V(WordAnd) \ 77 V(WordAnd) \
77 V(WordXor) \ 78 V(WordXor) \
78 V(WordShl) \ 79 V(WordShl) \
79 V(WordShr) \ 80 V(WordShr) \
80 V(WordSar) \ 81 V(WordSar) \
81 V(WordRor) \ 82 V(WordRor) \
82 V(Word32Or) \ 83 V(Word32Or) \
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Load an object pointer from a buffer that isn't in the heap. 288 // Load an object pointer from a buffer that isn't in the heap.
288 Node* LoadBufferObject(Node* buffer, int offset, 289 Node* LoadBufferObject(Node* buffer, int offset,
289 MachineType rep = MachineType::AnyTagged()); 290 MachineType rep = MachineType::AnyTagged());
290 // Load a field from an object on the heap. 291 // Load a field from an object on the heap.
291 Node* LoadObjectField(Node* object, int offset, 292 Node* LoadObjectField(Node* object, int offset,
292 MachineType rep = MachineType::AnyTagged()); 293 MachineType rep = MachineType::AnyTagged());
293 // Load the floating point value of a HeapNumber. 294 // Load the floating point value of a HeapNumber.
294 Node* LoadHeapNumberValue(Node* object); 295 Node* LoadHeapNumberValue(Node* object);
295 // Store the floating point value of a HeapNumber. 296 // Store the floating point value of a HeapNumber.
296 Node* StoreHeapNumberValue(Node* object, Node* value); 297 Node* StoreHeapNumberValue(Node* object, Node* value);
298 // Truncate the floating point value of a HeapNumber to an Int32.
299 Node* TruncateHeapNumberValueToInt32(Node* object);
297 // Load the bit field of a Map. 300 // Load the bit field of a Map.
298 Node* LoadMapBitField(Node* map); 301 Node* LoadMapBitField(Node* map);
299 // Load the instance type of a Map. 302 // Load the instance type of a Map.
300 Node* LoadMapInstanceType(Node* map); 303 Node* LoadMapInstanceType(Node* map);
301 304
302 // Load an array element from a FixedArray. 305 // Load an array element from a FixedArray.
303 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, 306 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index,
304 int additional_offset = 0); 307 int additional_offset = 0);
305 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); 308 Node* LoadFixedArrayElementConstantIndex(Node* object, int index);
306 309
(...skipping 15 matching lines...) Expand all
322 Node* LoadInstanceType(Node* object); 325 Node* LoadInstanceType(Node* object);
323 326
324 // Returns a node that is true if the given bit is set in |word32|. 327 // Returns a node that is true if the given bit is set in |word32|.
325 template <typename T> 328 template <typename T>
326 Node* BitFieldDecode(Node* word32) { 329 Node* BitFieldDecode(Node* word32) {
327 return BitFieldDecode(word32, T::kShift, T::kMask); 330 return BitFieldDecode(word32, T::kShift, T::kMask);
328 } 331 }
329 332
330 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask); 333 Node* BitFieldDecode(Node* word32, uint32_t shift, uint32_t mask);
331 334
335 // Conversions.
336 Node* ChangeInt32ToTagged(Node* value);
337
332 // Branching helpers. 338 // Branching helpers.
333 // TODO(danno): Can we be more cleverish wrt. edge-split? 339 // TODO(danno): Can we be more cleverish wrt. edge-split?
334 void BranchIf(Node* condition, Label* if_true, Label* if_false); 340 void BranchIf(Node* condition, Label* if_true, Label* if_false);
335 341
336 #define BRANCH_HELPER(name) \ 342 #define BRANCH_HELPER(name) \
337 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ 343 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \
338 BranchIf(name(a, b), if_true, if_false); \ 344 BranchIf(name(a, b), if_true, if_false); \
339 } 345 }
340 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) 346 CODE_STUB_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER)
341 #undef BRANCH_HELPER 347 #undef BRANCH_HELPER
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // Map of variables to the list of value nodes that have been added from each 435 // Map of variables to the list of value nodes that have been added from each
430 // merge path in their order of merging. 436 // merge path in their order of merging.
431 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; 437 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_;
432 }; 438 };
433 439
434 } // namespace compiler 440 } // namespace compiler
435 } // namespace internal 441 } // namespace internal
436 } // namespace v8 442 } // namespace v8
437 443
438 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ 444 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_
OLDNEW
« src/code-stubs.cc ('K') | « src/code-stubs.cc ('k') | src/compiler/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698