| 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/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 function_(function), | 27 function_(function), |
| 28 argument_count_(argument_count) { } | 28 argument_count_(argument_count) { } |
| 29 ~RuntimeEntry() {} | 29 ~RuntimeEntry() {} |
| 30 | 30 |
| 31 const char* name() const { return name_; } | 31 const char* name() const { return name_; } |
| 32 RuntimeFunction function() const { return function_; } | 32 RuntimeFunction function() const { return function_; } |
| 33 int argument_count() const { return argument_count_; } | 33 int argument_count() const { return argument_count_; } |
| 34 uword GetEntryPoint() const { return reinterpret_cast<uword>(function()); } | 34 uword GetEntryPoint() const { return reinterpret_cast<uword>(function()); } |
| 35 | 35 |
| 36 // Generate code to call the runtime entry. | 36 // Generate code to call the runtime entry. |
| 37 void CallFromDart(Assembler* assembler) const; | 37 void Call(Assembler* assembler) const; |
| 38 void CallFromStub(Assembler* assembler) const; | |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 const char* name_; | 40 const char* name_; |
| 42 RuntimeFunction function_; | 41 RuntimeFunction function_; |
| 43 int argument_count_; | 42 int argument_count_; |
| 44 | 43 |
| 45 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); | 44 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 | 47 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 65 VERIFY_ON_TRANSITION; \ | 64 VERIFY_ON_TRANSITION; \ |
| 66 } \ | 65 } \ |
| 67 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments) | 66 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments) |
| 68 | 67 |
| 69 #define DECLARE_RUNTIME_ENTRY(name) \ | 68 #define DECLARE_RUNTIME_ENTRY(name) \ |
| 70 extern const RuntimeEntry k##name##RuntimeEntry | 69 extern const RuntimeEntry k##name##RuntimeEntry |
| 71 | 70 |
| 72 } // namespace dart | 71 } // namespace dart |
| 73 | 72 |
| 74 #endif // VM_RUNTIME_ENTRY_H_ | 73 #endif // VM_RUNTIME_ENTRY_H_ |
| OLD | NEW |