| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_RUNTIME_ENTRY_H_ | 5 #ifndef VM_RUNTIME_ENTRY_H_ |
| 6 #define VM_RUNTIME_ENTRY_H_ | 6 #define VM_RUNTIME_ENTRY_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/native_arguments.h" | 10 #include "vm/native_arguments.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 RuntimeEntry(const char* name, RuntimeFunction function, | 40 RuntimeEntry(const char* name, RuntimeFunction function, |
| 41 intptr_t argument_count, bool is_leaf, bool is_float) | 41 intptr_t argument_count, bool is_leaf, bool is_float) |
| 42 : name_(name), | 42 : name_(name), |
| 43 function_(function), | 43 function_(function), |
| 44 argument_count_(argument_count), | 44 argument_count_(argument_count), |
| 45 is_leaf_(is_leaf), | 45 is_leaf_(is_leaf), |
| 46 is_float_(is_float), | 46 is_float_(is_float), |
| 47 next_(NULL) { | 47 next_(NULL) { |
| 48 VMTag::RegisterRuntimeEntry(this); | 48 VMTag::RegisterRuntimeEntry(this); |
| 49 } | 49 } |
| 50 ~RuntimeEntry() {} | |
| 51 | 50 |
| 52 const char* name() const { return name_; } | 51 const char* name() const { return name_; } |
| 53 RuntimeFunction function() const { return function_; } | 52 RuntimeFunction function() const { return function_; } |
| 54 intptr_t argument_count() const { return argument_count_; } | 53 intptr_t argument_count() const { return argument_count_; } |
| 55 bool is_leaf() const { return is_leaf_; } | 54 bool is_leaf() const { return is_leaf_; } |
| 56 bool is_float() const { return is_float_; } | 55 bool is_float() const { return is_float_; } |
| 57 uword GetEntryPoint() const; | 56 uword GetEntryPoint() const; |
| 58 | 57 |
| 59 // Generate code to call the runtime entry. | 58 // Generate code to call the runtime entry. |
| 60 void Call(Assembler* assembler, intptr_t argument_count) const; | 59 void Call(Assembler* assembler, intptr_t argument_count) const; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \ | 169 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \ |
| 171 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id; | 170 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id; |
| 172 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS) | 171 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS) |
| 173 #undef CHECK_LEAF_RUNTIME_ADDRESS | 172 #undef CHECK_LEAF_RUNTIME_ADDRESS |
| 174 return kNoRuntimeFunctionId; | 173 return kNoRuntimeFunctionId; |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // namespace dart | 176 } // namespace dart |
| 178 | 177 |
| 179 #endif // VM_RUNTIME_ENTRY_H_ | 178 #endif // VM_RUNTIME_ENTRY_H_ |
| OLD | NEW |