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

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

Issue 23691024: If a rethrow is encountered in the catch block, then its handler must be marked that it needs stack… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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) 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 1979
1980 private: 1980 private:
1981 const intptr_t token_pos_; 1981 const intptr_t token_pos_;
1982 1982
1983 DISALLOW_COPY_AND_ASSIGN(ThrowInstr); 1983 DISALLOW_COPY_AND_ASSIGN(ThrowInstr);
1984 }; 1984 };
1985 1985
1986 1986
1987 class ReThrowInstr : public TemplateInstruction<0> { 1987 class ReThrowInstr : public TemplateInstruction<0> {
1988 public: 1988 public:
1989 explicit ReThrowInstr(intptr_t token_pos) : token_pos_(token_pos) { } 1989 // 'cacth_try_index' can be CatchClauseNode::kInvalidTryIndex if the
Ivan Posva 2013/08/31 00:06:23 cactus?
srdjan 2013/08/31 00:18:06 Done.
1990 // rethrow has been artifically generated by the parser.
1991 ReThrowInstr(intptr_t token_pos, intptr_t catch_try_index)
1992 : token_pos_(token_pos), catch_try_index_(catch_try_index) {}
1990 1993
1991 DECLARE_INSTRUCTION(ReThrow) 1994 DECLARE_INSTRUCTION(ReThrow)
1992 1995
1993 virtual intptr_t ArgumentCount() const { return 2; } 1996 virtual intptr_t ArgumentCount() const { return 2; }
1994 1997
1995 intptr_t token_pos() const { return token_pos_; } 1998 intptr_t token_pos() const { return token_pos_; }
1999 intptr_t catch_try_index() const { return catch_try_index_; }
1996 2000
1997 virtual bool CanDeoptimize() const { return true; } 2001 virtual bool CanDeoptimize() const { return true; }
1998 2002
1999 virtual EffectSet Effects() const { return EffectSet::None(); } 2003 virtual EffectSet Effects() const { return EffectSet::None(); }
2000 2004
2001 virtual bool MayThrow() const { return true; } 2005 virtual bool MayThrow() const { return true; }
2002 2006
2003 private: 2007 private:
2004 const intptr_t token_pos_; 2008 const intptr_t token_pos_;
2009 const intptr_t catch_try_index_;
2005 2010
2006 DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); 2011 DISALLOW_COPY_AND_ASSIGN(ReThrowInstr);
2007 }; 2012 };
2008 2013
2009 2014
2010 class GotoInstr : public TemplateInstruction<0> { 2015 class GotoInstr : public TemplateInstruction<0> {
2011 public: 2016 public:
2012 explicit GotoInstr(JoinEntryInstr* entry) 2017 explicit GotoInstr(JoinEntryInstr* entry)
2013 : successor_(entry), 2018 : successor_(entry),
2014 edge_weight_(0.0), 2019 edge_weight_(0.0),
(...skipping 4771 matching lines...) Expand 10 before | Expand all | Expand 10 after
6786 ForwardInstructionIterator* current_iterator_; 6791 ForwardInstructionIterator* current_iterator_;
6787 6792
6788 private: 6793 private:
6789 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6794 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6790 }; 6795 };
6791 6796
6792 6797
6793 } // namespace dart 6798 } // namespace dart
6794 6799
6795 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6800 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698