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

Unified Diff: runtime/vm/object.h

Issue 10968058: Support constant folding of instructions with constant smi values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index b39f8e76b13497d8734b4cac546894f76fb9a0a4..9933651828d6ab24c632388a233f83a1783b5d43 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3273,7 +3273,8 @@ class Integer : public Number {
// Return an integer in the form of a RawBigint.
RawBigint* AsBigint() const;
- RawInteger* BinaryOp(Token::Kind operation, const Integer& other) const;
+ RawInteger* ArithmeticOp(Token::Kind operation, const Integer& other) const;
+ RawInteger* BitOp(Token::Kind operation, const Integer& other) const;
OBJECT_IMPLEMENTATION(Integer, Number);
friend class Class;
@@ -3329,6 +3330,8 @@ class Smi : public Integer {
return (value >= kMinValue) && (value <= kMaxValue);
}
+ RawInteger* ShiftOp(Token::Kind kind, const Smi& other) const;
+
private:
static intptr_t ValueFromRaw(uword raw_value) {
intptr_t value = raw_value;
@@ -3416,7 +3419,7 @@ class Bigint : public Integer {
static RawBigint* New(const String& str, Heap::Space space = Heap::kNew);
static RawBigint* New(int64_t value, Heap::Space space = Heap::kNew);
- RawBigint* BinaryOp(Token::Kind operation, const Bigint& other) const;
+ RawBigint* ArithmeticOp(Token::Kind operation, const Bigint& other) const;
private:
Chunk GetChunkAt(intptr_t i) const {

Powered by Google App Engine
This is Rietveld 408576698