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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10533053: Implement inlined version of binary arithmetic operations for doubles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index e6d9861e806cd45ba0b28dd65f62ca2a506eb497..cc35499671c94f6d3c2eb954707c34fd4cbcc5f7 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1294,11 +1294,19 @@ class CatchEntryComp : public TemplateComputation<0> {
class BinaryOpComp : public TemplateComputation<2> {
public:
+ enum OperandsType {
+ kSmiOperands,
+ kDoubleOperands
+ };
+
BinaryOpComp(Token::Kind op_kind,
+ OperandsType operands_type,
InstanceCallComp* instance_call,
Value* left,
Value* right)
- : op_kind_(op_kind), instance_call_(instance_call) {
+ : op_kind_(op_kind),
+ operands_type_(operands_type),
+ instance_call_(instance_call) {
ASSERT(left != NULL);
ASSERT(right != NULL);
inputs_[0] = left;
@@ -1310,6 +1318,8 @@ class BinaryOpComp : public TemplateComputation<2> {
Token::Kind op_kind() const { return op_kind_; }
+ OperandsType operands_type() const { return operands_type_; }
+
InstanceCallComp* instance_call() const { return instance_call_; }
virtual void PrintOperandsTo(BufferFormatter* f) const;
@@ -1318,6 +1328,7 @@ class BinaryOpComp : public TemplateComputation<2> {
private:
const Token::Kind op_kind_;
+ const OperandsType operands_type_;
srdjan 2012/06/08 05:18:22 This works for now, but in Dart it is quite freque
Vyacheslav Egorov (Google) 2012/06/08 11:11:13 We will have to decide how we want to implement th
srdjan 2012/06/08 16:05:55 Sounds good.
InstanceCallComp* instance_call_;
DISALLOW_COPY_AND_ASSIGN(BinaryOpComp);

Powered by Google App Engine
This is Rietveld 408576698