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

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

Issue 2157363003: [stubs] Suppress shifts with immediate shift of zero. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/compiler/code-assembler.h ('k') | no next file » | 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 #include "src/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 203
204 #define DEFINE_CODE_ASSEMBLER_BINARY_OP(name) \ 204 #define DEFINE_CODE_ASSEMBLER_BINARY_OP(name) \
205 Node* CodeAssembler::name(Node* a, Node* b) { \ 205 Node* CodeAssembler::name(Node* a, Node* b) { \
206 return raw_assembler_->name(a, b); \ 206 return raw_assembler_->name(a, b); \
207 } 207 }
208 CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP) 208 CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP)
209 #undef DEFINE_CODE_ASSEMBLER_BINARY_OP 209 #undef DEFINE_CODE_ASSEMBLER_BINARY_OP
210 210
211 Node* CodeAssembler::WordShl(Node* value, int shift) { 211 Node* CodeAssembler::WordShl(Node* value, int shift) {
212 return raw_assembler_->WordShl(value, IntPtrConstant(shift)); 212 return (shift != 0) ? raw_assembler_->WordShl(value, IntPtrConstant(shift))
213 : value;
213 } 214 }
214 215
215 Node* CodeAssembler::WordShr(Node* value, int shift) { 216 Node* CodeAssembler::WordShr(Node* value, int shift) {
216 return raw_assembler_->WordShr(value, IntPtrConstant(shift)); 217 return (shift != 0) ? raw_assembler_->WordShr(value, IntPtrConstant(shift))
218 : value;
219 }
220
221 Node* CodeAssembler::Word32Shr(Node* value, int shift) {
222 return (shift != 0) ? raw_assembler_->Word32Shr(value, IntPtrConstant(shift))
223 : value;
217 } 224 }
218 225
219 Node* CodeAssembler::ChangeUint32ToWord(Node* value) { 226 Node* CodeAssembler::ChangeUint32ToWord(Node* value) {
220 if (raw_assembler_->machine()->Is64()) { 227 if (raw_assembler_->machine()->Is64()) {
221 value = raw_assembler_->ChangeUint32ToUint64(value); 228 value = raw_assembler_->ChangeUint32ToUint64(value);
222 } 229 }
223 return value; 230 return value;
224 } 231 }
225 232
226 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) { 233 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) {
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 } 905 }
899 } 906 }
900 } 907 }
901 908
902 bound_ = true; 909 bound_ = true;
903 } 910 }
904 911
905 } // namespace compiler 912 } // namespace compiler
906 } // namespace internal 913 } // namespace internal
907 } // namespace v8 914 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698