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

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

Issue 2357343003: Fix lazy deoptimization in the presence of exceptions (Closed)
Patch Set: new test case Created 4 years, 2 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 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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 891
892 void Unsupported(FlowGraphCompiler* compiler); 892 void Unsupported(FlowGraphCompiler* compiler);
893 893
894 protected: 894 protected:
895 // GetDeoptId and/or CopyDeoptIdFrom. 895 // GetDeoptId and/or CopyDeoptIdFrom.
896 friend class CallSiteInliner; 896 friend class CallSiteInliner;
897 friend class LICM; 897 friend class LICM;
898 friend class ComparisonInstr; 898 friend class ComparisonInstr;
899 friend class Scheduler; 899 friend class Scheduler;
900 friend class BlockEntryInstr; 900 friend class BlockEntryInstr;
901 friend class CatchBlockEntryInstr; // deopt_id_
901 902
902 // Fetch deopt id without checking if this computation can deoptimize. 903 // Fetch deopt id without checking if this computation can deoptimize.
903 intptr_t GetDeoptId() const { 904 intptr_t GetDeoptId() const {
904 return deopt_id_; 905 return deopt_id_;
905 } 906 }
906 907
907 void CopyDeoptIdFrom(const Instruction& instr) { 908 void CopyDeoptIdFrom(const Instruction& instr) {
908 deopt_id_ = instr.deopt_id_; 909 deopt_id_ = instr.deopt_id_;
909 } 910 }
910 911
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 1559
1559 class CatchBlockEntryInstr : public BlockEntryInstr { 1560 class CatchBlockEntryInstr : public BlockEntryInstr {
1560 public: 1561 public:
1561 CatchBlockEntryInstr(intptr_t block_id, 1562 CatchBlockEntryInstr(intptr_t block_id,
1562 intptr_t try_index, 1563 intptr_t try_index,
1563 GraphEntryInstr* graph_entry, 1564 GraphEntryInstr* graph_entry,
1564 const Array& handler_types, 1565 const Array& handler_types,
1565 intptr_t catch_try_index, 1566 intptr_t catch_try_index,
1566 const LocalVariable& exception_var, 1567 const LocalVariable& exception_var,
1567 const LocalVariable& stacktrace_var, 1568 const LocalVariable& stacktrace_var,
1568 bool needs_stacktrace) 1569 bool needs_stacktrace,
1570 intptr_t deopt_id)
1569 : BlockEntryInstr(block_id, try_index), 1571 : BlockEntryInstr(block_id, try_index),
1570 graph_entry_(graph_entry), 1572 graph_entry_(graph_entry),
1571 predecessor_(NULL), 1573 predecessor_(NULL),
1572 catch_handler_types_(Array::ZoneHandle(handler_types.raw())), 1574 catch_handler_types_(Array::ZoneHandle(handler_types.raw())),
1573 catch_try_index_(catch_try_index), 1575 catch_try_index_(catch_try_index),
1574 exception_var_(exception_var), 1576 exception_var_(exception_var),
1575 stacktrace_var_(stacktrace_var), 1577 stacktrace_var_(stacktrace_var),
1576 needs_stacktrace_(needs_stacktrace) { } 1578 needs_stacktrace_(needs_stacktrace) {
1579 deopt_id_ = deopt_id;
1580 }
1577 1581
1578 DECLARE_INSTRUCTION(CatchBlockEntry) 1582 DECLARE_INSTRUCTION(CatchBlockEntry)
1579 1583
1580 virtual intptr_t PredecessorCount() const { 1584 virtual intptr_t PredecessorCount() const {
1581 return (predecessor_ == NULL) ? 0 : 1; 1585 return (predecessor_ == NULL) ? 0 : 1;
1582 } 1586 }
1583 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { 1587 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const {
1584 ASSERT((index == 0) && (predecessor_ != NULL)); 1588 ASSERT((index == 0) && (predecessor_ != NULL));
1585 return predecessor_; 1589 return predecessor_;
1586 } 1590 }
(...skipping 6710 matching lines...) Expand 10 before | Expand all | Expand 10 after
8297 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8301 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8298 UNIMPLEMENTED(); \ 8302 UNIMPLEMENTED(); \
8299 return NULL; \ 8303 return NULL; \
8300 } \ 8304 } \
8301 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8305 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8302 8306
8303 8307
8304 } // namespace dart 8308 } // namespace dart
8305 8309
8306 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8310 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698