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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 10909272: Avoid using a temp register when unboxing a known smi. (Closed) Base URL: http://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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 public: 2988 public:
2989 UnboxDoubleInstr(Value* value, intptr_t deopt_id) { 2989 UnboxDoubleInstr(Value* value, intptr_t deopt_id) {
2990 ASSERT(value != NULL); 2990 ASSERT(value != NULL);
2991 inputs_[0] = value; 2991 inputs_[0] = value;
2992 deopt_id_ = deopt_id; 2992 deopt_id_ = deopt_id;
2993 } 2993 }
2994 2994
2995 Value* value() const { return inputs_[0]; } 2995 Value* value() const { return inputs_[0]; }
2996 2996
2997 virtual bool CanDeoptimize() const { 2997 virtual bool CanDeoptimize() const {
2998 return value()->ResultCid() != kDoubleCid; 2998 return (value()->ResultCid() != kDoubleCid)
2999 && (value()->ResultCid() != kSmiCid);
2999 } 3000 }
3000 3001
3001 virtual bool HasSideEffect() const { return false; } 3002 virtual bool HasSideEffect() const { return false; }
3002 3003
3003 // The output is not an instance but when it is boxed it becomes double. 3004 // The output is not an instance but when it is boxed it becomes double.
3004 virtual intptr_t ResultCid() const { return kDoubleCid; } 3005 virtual intptr_t ResultCid() const { return kDoubleCid; }
3005 3006
3006 virtual Representation representation() const { 3007 virtual Representation representation() const {
3007 return kUnboxedDouble; 3008 return kUnboxedDouble;
3008 } 3009 }
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
3641 ForwardInstructionIterator* current_iterator_; 3642 ForwardInstructionIterator* current_iterator_;
3642 3643
3643 private: 3644 private:
3644 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3645 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3645 }; 3646 };
3646 3647
3647 3648
3648 } // namespace dart 3649 } // namespace dart
3649 3650
3650 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3651 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698