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

Unified Diff: runtime/vm/intermediate_language_x64.cc

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
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index aeb58d946e04806232e821475836cbdd2ffea35f..da53f8950f8aa6cf892b54039c24f8abc66fddf3 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -17,6 +17,17 @@
namespace dart {
+static LocationSummary* MakeSimpleLocationSummary(
+ intptr_t input_count, Location out) {
+ LocationSummary* summary = new LocationSummary(input_count, 0);
+ for (intptr_t i = 0; i < input_count; i++) {
+ summary->set_in(i, Location::RequiresRegister());
+ }
+ summary->set_out(out);
+ return summary;
+}
+
+
// True iff. the arguments to a call will be properly pushed and can
// be popped after the call.
template <typename T> static bool VerifyCallComputation(T* comp) {
@@ -52,14 +63,34 @@ void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
-static LocationSummary* MakeSimpleLocationSummary(
- intptr_t input_count, Location out) {
- LocationSummary* summary = new LocationSummary(input_count, 0);
- for (intptr_t i = 0; i < input_count; i++) {
- summary->set_in(i, Location::RequiresRegister());
- }
- summary->set_out(out);
- return summary;
+LocationSummary* ThrowInstr::MakeLocationSummary() {
+ return new LocationSummary(0, 0);
+}
+
+
+void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(exception()->IsUse());
+ compiler->GenerateCallRuntime(cid(),
+ token_index(),
+ try_index(),
+ kThrowRuntimeEntry);
+ __ int3();
+}
+
+
+LocationSummary* ReThrowInstr::MakeLocationSummary() {
+ return new LocationSummary(0, 0);
+}
+
+
+void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(exception()->IsUse());
+ ASSERT(stack_trace()->IsUse());
+ compiler->GenerateCallRuntime(cid(),
+ token_index(),
+ try_index(),
+ kReThrowRuntimeEntry);
+ __ int3();
}
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698