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

Unified Diff: src/ast.h

Issue 975001: Use untagged int32 values in evaluation of side-effect free expressions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 4147)
+++ src/ast.h (working copy)
@@ -269,8 +269,18 @@
bitfields_ |= ToInt32Field::encode(to_int32);
}
+ // How many bitwise logical or shift operators are used in this expression?
+ int num_bit_ops() { return NumBitOpsField::decode(bitfields_); }
+ void set_num_bit_ops(int num_bit_ops) {
+ bitfields_ &= ~NumBitOpsField::mask();
+ num_bit_ops = Min(num_bit_ops, kMaxNumBitOps);
+ bitfields_ |= NumBitOpsField::encode(num_bit_ops);
+ }
+
private:
+ static const int kMaxNumBitOps = (1 << 5) - 1;
+
uint32_t bitfields_;
StaticType type_;
@@ -281,6 +291,7 @@
class SideEffectFreeField : public BitField<bool, 0, 1> {};
class NoNegativeZeroField : public BitField<bool, 1, 1> {};
class ToInt32Field : public BitField<bool, 2, 1> {};
+ class NumBitOpsField : public BitField<int, 3, 5> {};
};
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698