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

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

Issue 260713008: Add support for javascript incompatibility warnings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const Array& ic_data_array, 144 const Array& ic_data_array,
145 InlineExitCollector* exit_collector, 145 InlineExitCollector* exit_collector,
146 intptr_t osr_id, 146 intptr_t osr_id,
147 bool is_optimizing); 147 bool is_optimizing);
148 148
149 FlowGraph* BuildGraph(); 149 FlowGraph* BuildGraph();
150 150
151 ParsedFunction* parsed_function() const { return parsed_function_; } 151 ParsedFunction* parsed_function() const { return parsed_function_; }
152 const Array& ic_data_array() const { return ic_data_array_; } 152 const Array& ic_data_array() const { return ic_data_array_; }
153 153
154 void WarnOnJSIntegralNumTypeTest(AstNode* node,
155 const AbstractType& type) const;
156
157 void Warning(intptr_t token_pos, const char* format, ...) const
158 PRINTF_ATTRIBUTE(3, 4);
159
154 void Bailout(const char* reason) const; 160 void Bailout(const char* reason) const;
155 161
156 intptr_t AllocateBlockId() { return ++last_used_block_id_; } 162 intptr_t AllocateBlockId() { return ++last_used_block_id_; }
157 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; } 163 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; }
158 164
159 intptr_t context_level() const; 165 intptr_t context_level() const;
160 166
161 void IncrementLoopDepth() { ++loop_depth_; } 167 void IncrementLoopDepth() { ++loop_depth_; }
162 void DecrementLoopDepth() { --loop_depth_; } 168 void DecrementLoopDepth() { --loop_depth_; }
163 intptr_t loop_depth() const { return loop_depth_; } 169 intptr_t loop_depth() const { return loop_depth_; }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 FOR_EACH_NODE(DECLARE_VISIT) 284 FOR_EACH_NODE(DECLARE_VISIT)
279 #undef DECLARE_VISIT 285 #undef DECLARE_VISIT
280 286
281 FlowGraphBuilder* owner() const { return owner_; } 287 FlowGraphBuilder* owner() const { return owner_; }
282 Instruction* entry() const { return entry_; } 288 Instruction* entry() const { return entry_; }
283 Instruction* exit() const { return exit_; } 289 Instruction* exit() const { return exit_; }
284 290
285 bool is_empty() const { return entry_ == NULL; } 291 bool is_empty() const { return entry_ == NULL; }
286 bool is_open() const { return is_empty() || exit_ != NULL; } 292 bool is_open() const { return is_empty() || exit_ != NULL; }
287 293
288 void Bailout(const char* reason); 294 void Bailout(const char* reason) const;
289 void InlineBailout(const char* reason); 295 void InlineBailout(const char* reason) const;
290 296
291 // Append a graph fragment to this graph. Assumes this graph is open. 297 // Append a graph fragment to this graph. Assumes this graph is open.
292 void Append(const EffectGraphVisitor& other_fragment); 298 void Append(const EffectGraphVisitor& other_fragment);
293 // Append a definition that can have uses. Assumes this graph is open. 299 // Append a definition that can have uses. Assumes this graph is open.
294 Value* Bind(Definition* definition); 300 Value* Bind(Definition* definition);
295 // Append a computation with no uses. Assumes this graph is open. 301 // Append a computation with no uses. Assumes this graph is open.
296 void Do(Definition* definition); 302 void Do(Definition* definition);
297 // Append a single (non-Definition, non-Entry) instruction. Assumes this 303 // Append a single (non-Definition, non-Entry) instruction. Assumes this
298 // graph is open. 304 // graph is open.
299 void AddInstruction(Instruction* instruction); 305 void AddInstruction(Instruction* instruction);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // Output parameters. 576 // Output parameters.
571 GrowableArray<TargetEntryInstr**> true_successor_addresses_; 577 GrowableArray<TargetEntryInstr**> true_successor_addresses_;
572 GrowableArray<TargetEntryInstr**> false_successor_addresses_; 578 GrowableArray<TargetEntryInstr**> false_successor_addresses_;
573 579
574 intptr_t condition_token_pos_; 580 intptr_t condition_token_pos_;
575 }; 581 };
576 582
577 } // namespace dart 583 } // namespace dart
578 584
579 #endif // VM_FLOW_GRAPH_BUILDER_H_ 585 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698