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

Side by Side Diff: src/hydrogen-instructions.h

Issue 14211009: Crankshaft: Recognize (i >>> 0) === i for integer32 inputs and replace (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4606 public: 4606 public:
4607 static HInstruction* New(Zone* zone, 4607 static HInstruction* New(Zone* zone,
4608 HValue* context, 4608 HValue* context,
4609 HValue* left, 4609 HValue* left,
4610 HValue* right); 4610 HValue* right);
4611 4611
4612 virtual bool TryDecompose(DecompositionResult* decomposition) { 4612 virtual bool TryDecompose(DecompositionResult* decomposition) {
4613 if (right()->IsInteger32Constant()) { 4613 if (right()->IsInteger32Constant()) {
4614 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { 4614 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) {
4615 // This is intended to look for HAdd and HSub, to handle compounds 4615 // This is intended to look for HAdd and HSub, to handle compounds
4616 // like ((base + offset) >> scale) with one single decomposition. 4616 // like ((base + offset) >>> scale) with one single decomposition.
4617 left()->TryDecompose(decomposition); 4617 left()->TryDecompose(decomposition);
4618 return true; 4618 return true;
4619 } 4619 }
4620 } 4620 }
4621 return false; 4621 return false;
4622 } 4622 }
4623 4623
4624 virtual Range* InferRange(Zone* zone); 4624 virtual Range* InferRange(Zone* zone);
4625 4625
4626 DECLARE_CONCRETE_INSTRUCTION(Shr) 4626 DECLARE_CONCRETE_INSTRUCTION(Shr)
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
6491 virtual bool IsDeletable() const { return true; } 6491 virtual bool IsDeletable() const { return true; }
6492 }; 6492 };
6493 6493
6494 6494
6495 #undef DECLARE_INSTRUCTION 6495 #undef DECLARE_INSTRUCTION
6496 #undef DECLARE_CONCRETE_INSTRUCTION 6496 #undef DECLARE_CONCRETE_INSTRUCTION
6497 6497
6498 } } // namespace v8::internal 6498 } } // namespace v8::internal
6499 6499
6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698