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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10453098: Move Throw and ReThrow to the location based code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 280847c7f3fbb41833ab7caf66c386b965260151..02bdb6c0d6898df2f4483f9bff3593a0ae8d7f11 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1431,7 +1431,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
// Returns structure describing location constraints required
// to emit native code for this instruction.
- virtual LocationSummary* locs() const {
+ virtual LocationSummary* locs() {
// TODO(vegorov): This should be pure virtual method.
// However we are temporary using NULL for instructions that
// were not converted to the location based code generation yet.
@@ -1651,7 +1651,7 @@ class DoInstr : public Instruction {
virtual void RecordAssignedVars(BitVector* assigned_vars);
- virtual LocationSummary* locs() const {
+ virtual LocationSummary* locs() {
return computation()->locs();
}
@@ -1702,7 +1702,7 @@ class BindInstr : public Instruction {
virtual void RecordAssignedVars(BitVector* assigned_vars);
- virtual LocationSummary* locs() const {
+ virtual LocationSummary* locs() {
return computation()->locs();
}
@@ -1748,7 +1748,8 @@ class ThrowInstr : public Instruction {
: token_index_(token_index),
try_index_(try_index),
exception_(exception),
- successor_(NULL) {
+ successor_(NULL),
+ locs_(NULL) {
ASSERT(exception_ != NULL);
}
@@ -1765,11 +1766,23 @@ class ThrowInstr : public Instruction {
ASSERT(successor_ == NULL);
}
+ LocationSummary* locs() {
+ if (locs_ == NULL) {
+ locs_ = MakeLocationSummary();
+ }
+ return locs_;
+ }
+
+ static LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
const intptr_t token_index_;
const intptr_t try_index_;
Value* exception_;
Instruction* successor_;
+ LocationSummary* locs_;
DISALLOW_COPY_AND_ASSIGN(ThrowInstr);
};
@@ -1785,7 +1798,8 @@ class ReThrowInstr : public Instruction {
try_index_(try_index),
exception_(exception),
stack_trace_(stack_trace),
- successor_(NULL) {
+ successor_(NULL),
+ locs_(NULL) {
ASSERT(exception_ != NULL);
ASSERT(stack_trace_ != NULL);
}
@@ -1806,12 +1820,24 @@ class ReThrowInstr : public Instruction {
ASSERT(successor_ == NULL);
}
+ LocationSummary* locs() {
+ if (locs_ == NULL) {
+ locs_ = MakeLocationSummary();
+ }
+ return locs_;
+ }
+
+ static LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
const intptr_t token_index_;
const intptr_t try_index_;
Value* exception_;
Value* stack_trace_;
Instruction* successor_;
+ LocationSummary* locs_;
Florian Schneider 2012/05/31 13:32:26 Can this be just a member of Instruction instead o
DISALLOW_COPY_AND_ASSIGN(ReThrowInstr);
};
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698