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

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

Issue 2692803006: Track the 'awaiter return' call stack use it to detect uncaught exceptions in async functions (Closed)
Patch Set: rmacnak review Created 3 years, 9 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
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 RUNTIME_VM_FLOW_GRAPH_H_ 5 #ifndef RUNTIME_VM_FLOW_GRAPH_H_
6 #define RUNTIME_VM_FLOW_GRAPH_H_ 6 #define RUNTIME_VM_FLOW_GRAPH_H_
7 7
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/hash_map.h" 10 #include "vm/hash_map.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // Remove environments from the instructions which do not deoptimize. 279 // Remove environments from the instructions which do not deoptimize.
280 void EliminateEnvironments(); 280 void EliminateEnvironments();
281 281
282 bool IsReceiver(Definition* def) const; 282 bool IsReceiver(Definition* def) const;
283 283
284 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the 284 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the
285 // shift can be a truncating Smi shift-left and result is always Smi. 285 // shift can be a truncating Smi shift-left and result is always Smi.
286 // Merge instructions (only per basic-block). 286 // Merge instructions (only per basic-block).
287 void TryOptimizePatterns(); 287 void TryOptimizePatterns();
288 288
289 ZoneGrowableArray<TokenPosition>* await_token_positions() const {
290 return await_token_positions_;
291 }
292
293 void set_await_token_positions(
294 ZoneGrowableArray<TokenPosition>* await_token_positions) {
295 await_token_positions_ = await_token_positions;
296 }
297
289 // Replaces uses that are dominated by dom of 'def' with 'other'. 298 // Replaces uses that are dominated by dom of 'def' with 'other'.
290 // Note: uses that occur at instruction dom itself are not dominated by it. 299 // Note: uses that occur at instruction dom itself are not dominated by it.
291 static void RenameDominatedUses(Definition* def, 300 static void RenameDominatedUses(Definition* def,
292 Instruction* dom, 301 Instruction* dom,
293 Definition* other); 302 Definition* other);
294 303
295 // Renames uses of redefined values to make sure that uses of redefined 304 // Renames uses of redefined values to make sure that uses of redefined
296 // values that are dominated by a redefinition are renamed. 305 // values that are dominated by a redefinition are renamed.
297 void RenameUsesDominatedByRedefinitions(); 306 void RenameUsesDominatedByRedefinitions();
298 307
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 ConstantInstr* constant_null_; 393 ConstantInstr* constant_null_;
385 ConstantInstr* constant_dead_; 394 ConstantInstr* constant_dead_;
386 ConstantInstr* constant_empty_context_; 395 ConstantInstr* constant_empty_context_;
387 396
388 BlockEffects* block_effects_; 397 BlockEffects* block_effects_;
389 bool licm_allowed_; 398 bool licm_allowed_;
390 399
391 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_; 400 ZoneGrowableArray<BlockEntryInstr*>* loop_headers_;
392 ZoneGrowableArray<BitVector*>* loop_invariant_loads_; 401 ZoneGrowableArray<BitVector*>* loop_invariant_loads_;
393 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_; 402 ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_;
403 ZoneGrowableArray<TokenPosition>* await_token_positions_;
394 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_; 404 DirectChainedHashMap<ConstantPoolTrait> constant_instr_pool_;
395 BitVector* captured_parameters_; 405 BitVector* captured_parameters_;
396 406
397 intptr_t inlining_id_; 407 intptr_t inlining_id_;
398 }; 408 };
399 409
400 410
401 class LivenessAnalysis : public ValueObject { 411 class LivenessAnalysis : public ValueObject {
402 public: 412 public:
403 LivenessAnalysis(intptr_t variable_count, 413 LivenessAnalysis(intptr_t variable_count,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 548
539 private: 549 private:
540 GrowableArray<Definition*> defs_; 550 GrowableArray<Definition*> defs_;
541 BitVector* contains_vector_; 551 BitVector* contains_vector_;
542 }; 552 };
543 553
544 554
545 } // namespace dart 555 } // namespace dart
546 556
547 #endif // RUNTIME_VM_FLOW_GRAPH_H_ 557 #endif // RUNTIME_VM_FLOW_GRAPH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698