| 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_STUB_CODE_H_ | 5 #ifndef VM_STUB_CODE_H_ |
| 6 #define VM_STUB_CODE_H_ | 6 #define VM_STUB_CODE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 | 10 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 // Forward declarations. | 13 // Forward declarations. |
| 14 class Code; | 14 class Code; |
| 15 class Isolate; | 15 class Isolate; |
| 16 class ObjectPointerVisitor; | 16 class ObjectPointerVisitor; |
| 17 class RawCode; | 17 class RawCode; |
| 18 | 18 |
| 19 | 19 |
| 20 // List of stubs created in the VM isolate, these stubs are shared by different | 20 // List of stubs created in the VM isolate, these stubs are shared by different |
| 21 // isolates running in this dart process. | 21 // isolates running in this dart process. |
| 22 #define VM_STUB_CODE_LIST(V) \ | 22 #define VM_STUB_CODE_LIST(V) \ |
| 23 V(DartCallToRuntime) \ | 23 V(CallToRuntime) \ |
| 24 V(StubCallToRuntime) \ | |
| 25 V(PrintStopMessage) \ | 24 V(PrintStopMessage) \ |
| 26 V(CallNativeCFunction) \ | 25 V(CallNativeCFunction) \ |
| 27 V(AllocateArray) \ | 26 V(AllocateArray) \ |
| 28 V(CallNoSuchMethodFunction) \ | 27 V(CallNoSuchMethodFunction) \ |
| 29 V(MegamorphicLookup) \ | 28 V(MegamorphicLookup) \ |
| 30 V(CallStaticFunction) \ | 29 V(CallStaticFunction) \ |
| 31 V(CallClosureFunction) \ | 30 V(CallClosureFunction) \ |
| 32 V(FixCallersTarget) \ | 31 V(FixCallersTarget) \ |
| 33 V(Deoptimize) \ | 32 V(Deoptimize) \ |
| 34 V(BreakpointStatic) \ | 33 V(BreakpointStatic) \ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 94 |
| 96 // Generate all stubs which are generated on a per isolate basis as they | 95 // Generate all stubs which are generated on a per isolate basis as they |
| 97 // have embedded objects which are isolate specific. | 96 // have embedded objects which are isolate specific. |
| 98 static void Init(Isolate* isolate); | 97 static void Init(Isolate* isolate); |
| 99 | 98 |
| 100 static void VisitObjectPointers(ObjectPointerVisitor* visitor); | 99 static void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 101 | 100 |
| 102 // Check if specified pc is in the dart invocation stub used for | 101 // Check if specified pc is in the dart invocation stub used for |
| 103 // transitioning into dart code. | 102 // transitioning into dart code. |
| 104 static bool InInvocationStub(uword pc); | 103 static bool InInvocationStub(uword pc); |
| 105 // Check if specified pc is in StubCallToRuntime stub. | |
| 106 static bool InStubCallToRuntimeStubCode(uword pc); | |
| 107 | 104 |
| 108 // Returns NULL if no stub found. | 105 // Returns NULL if no stub found. |
| 109 static const char* NameOfStub(uword entry_point); | 106 static const char* NameOfStub(uword entry_point); |
| 110 | 107 |
| 111 // Define the shared stub code accessors. | 108 // Define the shared stub code accessors. |
| 112 #define STUB_CODE_ACCESSOR(name) \ | 109 #define STUB_CODE_ACCESSOR(name) \ |
| 113 static StubEntry* name##_entry() { \ | 110 static StubEntry* name##_entry() { \ |
| 114 return name##_entry_; \ | 111 return name##_entry_; \ |
| 115 } \ | 112 } \ |
| 116 static const ExternalLabel& name##Label() { \ | 113 static const ExternalLabel& name##Label() { \ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 const Class& cls); | 174 const Class& cls); |
| 178 static void GenerateAllocationStubForClosure(Assembler* assembler, | 175 static void GenerateAllocationStubForClosure(Assembler* assembler, |
| 179 const Function& func); | 176 const Function& func); |
| 180 static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler, | 177 static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler, |
| 181 intptr_t num_args); | 178 intptr_t num_args); |
| 182 }; | 179 }; |
| 183 | 180 |
| 184 } // namespace dart | 181 } // namespace dart |
| 185 | 182 |
| 186 #endif // VM_STUB_CODE_H_ | 183 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |