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

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

Issue 10912120: Restoring assert that deopt_id() should be accessed only if the instruction can deoptimize. Print r… (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 | « runtime/vm/il_printer.cc ('k') | 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 Instruction() 269 Instruction()
270 : deopt_id_(Isolate::Current()->GetNextDeoptId()), 270 : deopt_id_(Isolate::Current()->GetNextDeoptId()),
271 lifetime_position_(-1), 271 lifetime_position_(-1),
272 previous_(NULL), 272 previous_(NULL),
273 next_(NULL), 273 next_(NULL),
274 env_(NULL) { } 274 env_(NULL) { }
275 275
276 virtual Tag tag() const = 0; 276 virtual Tag tag() const = 0;
277 277
278 intptr_t deopt_id() const { return deopt_id_; } 278 intptr_t deopt_id() const {
279 ASSERT(CanDeoptimize());
280 return deopt_id_;
281 }
279 282
280 bool IsBlockEntry() { return (AsBlockEntry() != NULL); } 283 bool IsBlockEntry() { return (AsBlockEntry() != NULL); }
281 virtual BlockEntryInstr* AsBlockEntry() { return NULL; } 284 virtual BlockEntryInstr* AsBlockEntry() { return NULL; }
282 285
283 bool IsDefinition() { return (AsDefinition() != NULL); } 286 bool IsDefinition() { return (AsDefinition() != NULL); }
284 virtual Definition* AsDefinition() { return NULL; } 287 virtual Definition* AsDefinition() { return NULL; }
285 288
286 bool IsControl() { return (AsControl() != NULL); } 289 bool IsControl() { return (AsControl() != NULL); }
287 virtual ControlInstruction* AsControl() { return NULL; } 290 virtual ControlInstruction* AsControl() { return NULL; }
288 291
(...skipping 2570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 virtual Representation representation() const { 2862 virtual Representation representation() const {
2860 return kUnboxedDouble; 2863 return kUnboxedDouble;
2861 } 2864 }
2862 2865
2863 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 2866 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
2864 ASSERT((idx == 0) || (idx == 1)); 2867 ASSERT((idx == 0) || (idx == 1));
2865 return kUnboxedDouble; 2868 return kUnboxedDouble;
2866 } 2869 }
2867 2870
2868 virtual intptr_t DeoptimizationTarget() const { 2871 virtual intptr_t DeoptimizationTarget() const {
2869 return deopt_id(); 2872 // Direct access since this instuction cannot deoptimize, and the deopt-id
2873 // was inherited from another instuction that could deoptimize.
2874 return deopt_id_;
2870 } 2875 }
2871 2876
2872 DECLARE_INSTRUCTION(UnboxedDoubleBinaryOp) 2877 DECLARE_INSTRUCTION(UnboxedDoubleBinaryOp)
2873 virtual RawAbstractType* CompileType() const; 2878 virtual RawAbstractType* CompileType() const;
2874 2879
2875 private: 2880 private:
2876 const Token::Kind op_kind_; 2881 const Token::Kind op_kind_;
2877 2882
2878 DISALLOW_COPY_AND_ASSIGN(UnboxedDoubleBinaryOpInstr); 2883 DISALLOW_COPY_AND_ASSIGN(UnboxedDoubleBinaryOpInstr);
2879 }; 2884 };
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 ForwardInstructionIterator* current_iterator_; 3275 ForwardInstructionIterator* current_iterator_;
3271 3276
3272 private: 3277 private:
3273 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3278 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3274 }; 3279 };
3275 3280
3276 3281
3277 } // namespace dart 3282 } // namespace dart
3278 3283
3279 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3284 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698