| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 V(AllocateArray) \ | 26 V(AllocateArray) \ |
| 27 V(CallNoSuchMethodFunction) \ | 27 V(CallNoSuchMethodFunction) \ |
| 28 V(MegamorphicLookup) \ | 28 V(MegamorphicLookup) \ |
| 29 V(CallStaticFunction) \ | 29 V(CallStaticFunction) \ |
| 30 V(CallClosureFunction) \ | 30 V(CallClosureFunction) \ |
| 31 V(StackOverflow) \ | 31 V(StackOverflow) \ |
| 32 V(OptimizeInvokedFunction) \ | 32 V(OptimizeInvokedFunction) \ |
| 33 V(FixCallersTarget) \ | 33 V(FixCallersTarget) \ |
| 34 V(Deoptimize) \ | 34 V(Deoptimize) \ |
| 35 | 35 |
| 36 // TODO(regis): Is it OK for the stubs above to refer to Object::null()? | 36 // Is it permitted for the stubs above to refer to Object::null(), which is |
| 37 // allocated in the VM isolate and shared across all isolates. |
| 38 // However, in cases where a simple GC-safe placeholder is needed on the stack, |
| 39 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi |
| 40 // does not require relocation. |
| 37 | 41 |
| 38 // List of stubs created per isolate, these stubs could potentially contain | 42 // List of stubs created per isolate, these stubs could potentially contain |
| 39 // embedded objects and hence cannot be shared across isolates. | 43 // embedded objects and hence cannot be shared across isolates. |
| 40 #define STUB_CODE_LIST(V) \ | 44 #define STUB_CODE_LIST(V) \ |
| 41 V(InvokeDartCode) \ | 45 V(InvokeDartCode) \ |
| 42 V(AllocateContext) \ | 46 V(AllocateContext) \ |
| 43 V(InlineCache) \ | 47 V(InlineCache) \ |
| 44 | 48 |
| 45 | 49 |
| 46 // class StubEntry is used to describe stub methods generated in dart to | 50 // class StubEntry is used to describe stub methods generated in dart to |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 165 |
| 162 static void GenerateAllocationStubForClass(Assembler* assembler, | 166 static void GenerateAllocationStubForClass(Assembler* assembler, |
| 163 const Class& cls); | 167 const Class& cls); |
| 164 static void GenerateAllocationStubForClosure(Assembler* assembler, | 168 static void GenerateAllocationStubForClosure(Assembler* assembler, |
| 165 const Function& func); | 169 const Function& func); |
| 166 }; | 170 }; |
| 167 | 171 |
| 168 } // namespace dart | 172 } // namespace dart |
| 169 | 173 |
| 170 #endif // VM_STUB_CODE_H_ | 174 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |