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

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

Issue 2608433003: [csa] Re-introduce automatic constant folding for IntPtrAdd and IntPtrSub (Closed)
Patch Set: Review feedback Created 3 years, 11 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 | « src/code-stub-assembler.cc ('k') | src/compiler/code-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 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_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_
6 #define V8_COMPILER_CODE_ASSEMBLER_H_ 6 #define V8_COMPILER_CODE_ASSEMBLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \ 78 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(V) \
79 V(Float64Add) \ 79 V(Float64Add) \
80 V(Float64Sub) \ 80 V(Float64Sub) \
81 V(Float64Mul) \ 81 V(Float64Mul) \
82 V(Float64Div) \ 82 V(Float64Div) \
83 V(Float64Mod) \ 83 V(Float64Mod) \
84 V(Float64Atan2) \ 84 V(Float64Atan2) \
85 V(Float64Pow) \ 85 V(Float64Pow) \
86 V(Float64InsertLowWord32) \ 86 V(Float64InsertLowWord32) \
87 V(Float64InsertHighWord32) \ 87 V(Float64InsertHighWord32) \
88 V(IntPtrAdd) \
89 V(IntPtrAddWithOverflow) \ 88 V(IntPtrAddWithOverflow) \
90 V(IntPtrSub) \
91 V(IntPtrSubWithOverflow) \ 89 V(IntPtrSubWithOverflow) \
92 V(IntPtrMul) \ 90 V(IntPtrMul) \
93 V(Int32Add) \ 91 V(Int32Add) \
94 V(Int32AddWithOverflow) \ 92 V(Int32AddWithOverflow) \
95 V(Int32Sub) \ 93 V(Int32Sub) \
96 V(Int32Mul) \ 94 V(Int32Mul) \
97 V(Int32MulWithOverflow) \ 95 V(Int32MulWithOverflow) \
98 V(Int32Div) \ 96 V(Int32Div) \
99 V(Int32Mod) \ 97 V(Int32Mod) \
100 V(WordOr) \ 98 V(WordOr) \
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Node* value); 267 Node* value);
270 268
271 // Store a value to the root array. 269 // Store a value to the root array.
272 Node* StoreRoot(Heap::RootListIndex root_index, Node* value); 270 Node* StoreRoot(Heap::RootListIndex root_index, Node* value);
273 271
274 // Basic arithmetic operations. 272 // Basic arithmetic operations.
275 #define DECLARE_CODE_ASSEMBLER_BINARY_OP(name) Node* name(Node* a, Node* b); 273 #define DECLARE_CODE_ASSEMBLER_BINARY_OP(name) Node* name(Node* a, Node* b);
276 CODE_ASSEMBLER_BINARY_OP_LIST(DECLARE_CODE_ASSEMBLER_BINARY_OP) 274 CODE_ASSEMBLER_BINARY_OP_LIST(DECLARE_CODE_ASSEMBLER_BINARY_OP)
277 #undef DECLARE_CODE_ASSEMBLER_BINARY_OP 275 #undef DECLARE_CODE_ASSEMBLER_BINARY_OP
278 276
277 Node* IntPtrAdd(Node* left, Node* right);
278 Node* IntPtrSub(Node* left, Node* right);
279
279 Node* WordShl(Node* value, int shift); 280 Node* WordShl(Node* value, int shift);
280 Node* WordShr(Node* value, int shift); 281 Node* WordShr(Node* value, int shift);
281 Node* Word32Shr(Node* value, int shift); 282 Node* Word32Shr(Node* value, int shift);
282 283
283 // Unary 284 // Unary
284 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a); 285 #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name) Node* name(Node* a);
285 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP) 286 CODE_ASSEMBLER_UNARY_OP_LIST(DECLARE_CODE_ASSEMBLER_UNARY_OP)
286 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP 287 #undef DECLARE_CODE_ASSEMBLER_UNARY_OP
287 288
288 // Changes an intptr_t to a double, e.g. for storing an element index 289 // Changes an intptr_t to a double, e.g. for storing an element index
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 ZoneSet<CodeAssemblerVariable::Impl*> variables_; 480 ZoneSet<CodeAssemblerVariable::Impl*> variables_;
480 481
481 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState); 482 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState);
482 }; 483 };
483 484
484 } // namespace compiler 485 } // namespace compiler
485 } // namespace internal 486 } // namespace internal
486 } // namespace v8 487 } // namespace v8
487 488
488 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ 489 #endif // V8_COMPILER_CODE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698