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

Unified Diff: src/compiler/linkage.h

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix argument slots. Created 5 years, 6 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
Index: src/compiler/linkage.h
diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h
index abdef7a4efc47eafaf9f32105600c03a6a40d3f0..0358cd28f1b054509750e1a402bb354fa909c7ee 100644
--- a/src/compiler/linkage.h
+++ b/src/compiler/linkage.h
@@ -102,12 +102,18 @@ class CallDescriptor final : public ZoneObject {
// Returns the kind of this call.
Kind kind() const { return kind_; }
+ // Returns {true} if this descriptor is a call to a C function.
+ bool IsCFunctionCall() const { return kind_ == kCallAddress; }
+
// Returns {true} if this descriptor is a call to a JSFunction.
bool IsJSFunctionCall() const { return kind_ == kCallJSFunction; }
// The number of return values from this call.
size_t ReturnCount() const { return machine_sig_->return_count(); }
+ // The number of C parameters to this call.
+ size_t CParameterCount() const { return machine_sig_->parameter_count(); }
+
// The number of JavaScript parameters to this call, including the receiver
// object.
size_t JSParameterCount() const { return js_param_count_; }

Powered by Google App Engine
This is Rietveld 408576698