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

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

Issue 12457034: Ensure that all goto instructions have deoptimization target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
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_FLOW_GRAPH_COMPILER_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_
6 #define VM_FLOW_GRAPH_COMPILER_H_ 6 #define VM_FLOW_GRAPH_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler, 75 RawDeoptInfo* CreateDeoptInfo(FlowGraphCompiler* compiler,
76 DeoptInfoBuilder* builder); 76 DeoptInfoBuilder* builder);
77 77
78 void AllocateIncomingParametersRecursive(Environment* env, 78 void AllocateIncomingParametersRecursive(Environment* env,
79 intptr_t* stack_height); 79 intptr_t* stack_height);
80 80
81 // No code needs to be generated. 81 // No code needs to be generated.
82 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {} 82 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix) {}
83 83
84 // Builds deopt-after continuation point.
85 virtual void BuildReturnAddress(DeoptInfoBuilder* builder,
86 const Function& function,
87 intptr_t slot_ix);
88
89 intptr_t pc_offset() const { return pc_offset_; } 84 intptr_t pc_offset() const { return pc_offset_; }
90 void set_pc_offset(intptr_t offset) { pc_offset_ = offset; } 85 void set_pc_offset(intptr_t offset) { pc_offset_ = offset; }
91 86
92 intptr_t deopt_id() const { return deopt_id_; } 87 intptr_t deopt_id() const { return deopt_id_; }
93 88
94 DeoptReasonId reason() const { return reason_; } 89 DeoptReasonId reason() const { return reason_; }
95 90
96 const Environment* deoptimization_env() const { return deoptimization_env_; } 91 const Environment* deoptimization_env() const { return deoptimization_env_; }
97 void set_deoptimization_env(Environment* env) { deoptimization_env_ = env; } 92 void set_deoptimization_env(Environment* env) { deoptimization_env_ = env; }
98 93
(...skipping 13 matching lines...) Expand all
112 DeoptReasonId reason) 107 DeoptReasonId reason)
113 : CompilerDeoptInfo(deopt_id, reason), entry_label_() { 108 : CompilerDeoptInfo(deopt_id, reason), entry_label_() {
114 ASSERT(reason != kDeoptAtCall); 109 ASSERT(reason != kDeoptAtCall);
115 } 110 }
116 111
117 Label* entry_label() { return &entry_label_; } 112 Label* entry_label() { return &entry_label_; }
118 113
119 // Implementation is in architecture specific file. 114 // Implementation is in architecture specific file.
120 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix); 115 virtual void GenerateCode(FlowGraphCompiler* compiler, intptr_t stub_ix);
121 116
122 // Builds deopt-before continuation point.
123 virtual void BuildReturnAddress(DeoptInfoBuilder* builder,
124 const Function& function,
125 intptr_t slot_ix);
126
127 private: 117 private:
128 Label entry_label_; 118 Label entry_label_;
129 119
130 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub); 120 DISALLOW_COPY_AND_ASSIGN(CompilerDeoptInfoWithStub);
131 }; 121 };
132 122
133 123
134 class SlowPathCode : public ZoneAllocated { 124 class SlowPathCode : public ZoneAllocated {
135 public: 125 public:
136 SlowPathCode() : entry_label_(), exit_label_() { } 126 SlowPathCode() : entry_label_(), exit_label_() { }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 PcDescriptors::Kind kind, 247 PcDescriptors::Kind kind,
258 LocationSummary* locs); 248 LocationSummary* locs);
259 249
260 void GenerateAssertAssignable(intptr_t token_pos, 250 void GenerateAssertAssignable(intptr_t token_pos,
261 intptr_t deopt_id, 251 intptr_t deopt_id,
262 const AbstractType& dst_type, 252 const AbstractType& dst_type,
263 const String& dst_name, 253 const String& dst_name,
264 LocationSummary* locs); 254 LocationSummary* locs);
265 255
266 void GenerateInstanceOf(intptr_t token_pos, 256 void GenerateInstanceOf(intptr_t token_pos,
267 intptr_t deopt_id,
Florian Schneider 2013/04/12 09:23:55 Why remove deopt_id here?
Vyacheslav Egorov (Google) 2013/04/12 10:57:06 Reinstated.
268 const AbstractType& type, 257 const AbstractType& type,
269 bool negate_result, 258 bool negate_result,
270 LocationSummary* locs); 259 LocationSummary* locs);
271 260
272 void GenerateInstanceCall(intptr_t deopt_id, 261 void GenerateInstanceCall(intptr_t deopt_id,
273 intptr_t token_pos, 262 intptr_t token_pos,
274 intptr_t argument_count, 263 intptr_t argument_count,
275 const Array& argument_names, 264 const Array& argument_names,
276 LocationSummary* locs, 265 LocationSummary* locs,
277 const ICData& ic_data); 266 const ICData& ic_data);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // that should be used when deoptimizing we store it in this variable. 536 // that should be used when deoptimizing we store it in this variable.
548 // In future AddDeoptStub should be moved out of the instruction template. 537 // In future AddDeoptStub should be moved out of the instruction template.
549 Environment* pending_deoptimization_env_; 538 Environment* pending_deoptimization_env_;
550 539
551 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 540 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
552 }; 541 };
553 542
554 } // namespace dart 543 } // namespace dart
555 544
556 #endif // VM_FLOW_GRAPH_COMPILER_H_ 545 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698