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

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

Issue 9177001: Optimize simple constant cases for bitwise &, | and ^. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen-instructions.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 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 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 : HBitwiseBinaryOperation(context, left, right), op_(op) { 3144 : HBitwiseBinaryOperation(context, left, right), op_(op) {
3145 ASSERT(op == Token::BIT_AND || 3145 ASSERT(op == Token::BIT_AND ||
3146 op == Token::BIT_OR || 3146 op == Token::BIT_OR ||
3147 op == Token::BIT_XOR); 3147 op == Token::BIT_XOR);
3148 } 3148 }
3149 3149
3150 Token::Value op() const { return op_; } 3150 Token::Value op() const { return op_; }
3151 3151
3152 virtual bool IsCommutative() const { return true; } 3152 virtual bool IsCommutative() const { return true; }
3153 3153
3154 virtual HValue* Canonicalize();
3155
3154 static HInstruction* NewHBitwise(Zone* zone, 3156 static HInstruction* NewHBitwise(Zone* zone,
3155 Token::Value op, 3157 Token::Value op,
3156 HValue* context, 3158 HValue* context,
3157 HValue* left, 3159 HValue* left,
3158 HValue* right); 3160 HValue* right);
3159 3161
3160 DECLARE_CONCRETE_INSTRUCTION(Bitwise) 3162 DECLARE_CONCRETE_INSTRUCTION(Bitwise)
3161 3163
3162 protected: 3164 protected:
3163 virtual bool DataEquals(HValue* other) { 3165 virtual bool DataEquals(HValue* other) {
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
4499 4501
4500 DECLARE_CONCRETE_INSTRUCTION(In) 4502 DECLARE_CONCRETE_INSTRUCTION(In)
4501 }; 4503 };
4502 4504
4503 #undef DECLARE_INSTRUCTION 4505 #undef DECLARE_INSTRUCTION
4504 #undef DECLARE_CONCRETE_INSTRUCTION 4506 #undef DECLARE_CONCRETE_INSTRUCTION
4505 4507
4506 } } // namespace v8::internal 4508 } } // namespace v8::internal
4507 4509
4508 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4510 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698