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

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

Issue 1701963002: Unwrap TypeRef returned by InstantiateFrom in AssertAssignableInstr::Canonicalize. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 Value* value, 2634 Value* value,
2635 Value* instantiator_type_arguments, 2635 Value* instantiator_type_arguments,
2636 const AbstractType& dst_type, 2636 const AbstractType& dst_type,
2637 const String& dst_name, 2637 const String& dst_name,
2638 intptr_t deopt_id) 2638 intptr_t deopt_id)
2639 : TemplateDefinition(deopt_id), 2639 : TemplateDefinition(deopt_id),
2640 token_pos_(token_pos), 2640 token_pos_(token_pos),
2641 dst_type_(AbstractType::ZoneHandle(dst_type.raw())), 2641 dst_type_(AbstractType::ZoneHandle(dst_type.raw())),
2642 dst_name_(dst_name) { 2642 dst_name_(dst_name) {
2643 ASSERT(!dst_type.IsNull()); 2643 ASSERT(!dst_type.IsNull());
2644 ASSERT(!dst_type.IsTypeRef());
2644 ASSERT(!dst_name.IsNull()); 2645 ASSERT(!dst_name.IsNull());
2645 SetInputAt(0, value); 2646 SetInputAt(0, value);
2646 SetInputAt(1, instantiator_type_arguments); 2647 SetInputAt(1, instantiator_type_arguments);
2647 } 2648 }
2648 2649
2649 DECLARE_INSTRUCTION(AssertAssignable) 2650 DECLARE_INSTRUCTION(AssertAssignable)
2650 virtual CompileType ComputeType() const; 2651 virtual CompileType ComputeType() const;
2651 virtual bool RecomputeType(); 2652 virtual bool RecomputeType();
2652 2653
2653 Value* value() const { return inputs_[0]; } 2654 Value* value() const { return inputs_[0]; }
2654 Value* instantiator_type_arguments() const { return inputs_[1]; } 2655 Value* instantiator_type_arguments() const { return inputs_[1]; }
2655 2656
2656 virtual TokenPosition token_pos() const { return token_pos_; } 2657 virtual TokenPosition token_pos() const { return token_pos_; }
2657 const AbstractType& dst_type() const { return dst_type_; } 2658 const AbstractType& dst_type() const { return dst_type_; }
2658 void set_dst_type(const AbstractType& dst_type) { 2659 void set_dst_type(const AbstractType& dst_type) {
2660 ASSERT(!dst_type.IsTypeRef());
2659 dst_type_ = dst_type.raw(); 2661 dst_type_ = dst_type.raw();
2660 } 2662 }
2661 const String& dst_name() const { return dst_name_; } 2663 const String& dst_name() const { return dst_name_; }
2662 2664
2663 virtual bool CanDeoptimize() const { return true; } 2665 virtual bool CanDeoptimize() const { return true; }
2664 2666
2665 virtual bool CanBecomeDeoptimizationTarget() const { 2667 virtual bool CanBecomeDeoptimizationTarget() const {
2666 // AssertAssignable instructions that are specialized by the optimizer 2668 // AssertAssignable instructions that are specialized by the optimizer
2667 // (e.g. replaced with CheckClass) need a deoptimization descriptor before. 2669 // (e.g. replaced with CheckClass) need a deoptimization descriptor before.
2668 return true; 2670 return true;
(...skipping 5538 matching lines...) Expand 10 before | Expand all | Expand 10 after
8207 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8209 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8208 UNIMPLEMENTED(); \ 8210 UNIMPLEMENTED(); \
8209 return NULL; \ 8211 return NULL; \
8210 } \ 8212 } \
8211 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8213 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8212 8214
8213 8215
8214 } // namespace dart 8216 } // namespace dart
8215 8217
8216 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8218 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698