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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1756403002: VM: Add smi fast path operations for precompiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 10 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 | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index f424c9931d43c4a0e928b2c6fd1818978dd69ad2..731fecafea9e5ff468c11fafe74c19b467a1ec55 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -479,6 +479,7 @@ class EmbeddedArray<T, 0> {
M(AllocateUninitializedContext) \
M(CloneContext) \
M(BinarySmiOp) \
+ M(CheckedSmiOp) \
M(BinaryInt32Op) \
M(UnarySmiOp) \
M(UnaryDoubleOp) \
@@ -2067,7 +2068,6 @@ class PushArgumentInstr : public TemplateDefinition<1, NoThrow> {
virtual EffectSet Effects() const { return EffectSet::None(); }
-
virtual TokenPosition token_pos() const {
return TokenPosition::kPushArgument;
}
@@ -6868,6 +6868,39 @@ class UnaryMintOpInstr : public UnaryIntegerOpInstr {
};
+class CheckedSmiOpInstr : public TemplateDefinition<2, Throws> {
+ public:
+ CheckedSmiOpInstr(Token::Kind op_kind,
+ Value* left,
+ Value* right,
+ InstanceCallInstr* call)
+ : TemplateDefinition(call->deopt_id()),
+ call_(call),
+ op_kind_(op_kind) {
+ SetInputAt(0, left);
+ SetInputAt(1, right);
+ }
+
+ InstanceCallInstr* call() const { return call_; }
+ Token::Kind op_kind() const { return op_kind_; }
+ Value* left() const { return inputs_[0]; }
+ Value* right() const { return inputs_[1]; }
+
+ virtual bool CanDeoptimize() const { return true; }
+
+ virtual EffectSet Effects() const { return EffectSet::All(); }
+
+ PRINT_OPERANDS_TO_SUPPORT
+
+ DECLARE_INSTRUCTION(CheckedSmiOp)
+
+ private:
+ InstanceCallInstr* call_;
+ const Token::Kind op_kind_;
+ DISALLOW_COPY_AND_ASSIGN(CheckedSmiOpInstr);
+};
+
+
class BinaryIntegerOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
public:
BinaryIntegerOpInstr(Token::Kind op_kind,
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698