Index: runtime/vm/runtime_entry.h |
=================================================================== |
--- runtime/vm/runtime_entry.h (revision 23860) |
+++ runtime/vm/runtime_entry.h (working copy) |
@@ -23,19 +23,19 @@ |
class RuntimeEntry : public ValueObject { |
public: |
RuntimeEntry(const char* name, RuntimeFunction function, |
- int argument_count, bool is_leaf) |
- // TODO(regis): In order to simulate leaf runtime calls taking floating point |
- // arguments, we need to add an 'is_float' flag. |
+ int argument_count, bool is_leaf, bool is_float) |
: name_(name), |
function_(function), |
argument_count_(argument_count), |
- is_leaf_(is_leaf) { } |
+ is_leaf_(is_leaf), |
+ is_float_(is_float) { } |
~RuntimeEntry() {} |
const char* name() const { return name_; } |
RuntimeFunction function() const { return function_; } |
int argument_count() const { return argument_count_; } |
bool is_leaf() const { return is_leaf_; } |
+ bool is_float() const { return is_float_; } |
uword GetEntryPoint() const { return reinterpret_cast<uword>(function()); } |
// Generate code to call the runtime entry. |
@@ -46,6 +46,7 @@ |
const RuntimeFunction function_; |
const int argument_count_; |
const bool is_leaf_; |
+ const bool is_float_; |
DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); |
}; |
@@ -56,7 +57,7 @@ |
#define DEFINE_RUNTIME_ENTRY(name, argument_count) \ |
extern void DRT_##name(NativeArguments arguments); \ |
extern const RuntimeEntry k##name##RuntimeEntry( \ |
- "DRT_"#name, &DRT_##name, argument_count, false); \ |
+ "DRT_"#name, &DRT_##name, argument_count, false, false); \ |
static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments); \ |
void DRT_##name(NativeArguments arguments) { \ |
CHECK_STACK_ALIGNMENT; \ |
@@ -74,10 +75,11 @@ |
#define DECLARE_RUNTIME_ENTRY(name) \ |
extern const RuntimeEntry k##name##RuntimeEntry |
-#define DEFINE_LEAF_RUNTIME_ENTRY(type, name, ...) \ |
+#define DEFINE_LEAF_RUNTIME_ENTRY(type, name, argument_count, ...) \ |
extern "C" type DLRT_##name(__VA_ARGS__); \ |
extern const RuntimeEntry k##name##RuntimeEntry( \ |
- "DLRT_"#name, reinterpret_cast<RuntimeFunction>(&DLRT_##name), 0, true); \ |
+ "DLRT_"#name, reinterpret_cast<RuntimeFunction>(&DLRT_##name), \ |
+ argument_count, true, false); \ |
type DLRT_##name(__VA_ARGS__) { \ |
CHECK_STACK_ALIGNMENT; \ |
NoGCScope no_gc_scope; \ |