| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 DISALLOW_COPY_AND_ASSIGN(StubEntry); | 66 DISALLOW_COPY_AND_ASSIGN(StubEntry); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 | 69 |
| 70 // class StubCode is used to maintain the lifecycle of stubs. | 70 // class StubCode is used to maintain the lifecycle of stubs. |
| 71 class StubCode { | 71 class StubCode { |
| 72 public: | 72 public: |
| 73 StubCode() | 73 StubCode() |
| 74 : | 74 : |
| 75 #define STUB_CODE_INITIALIZER(name) \ | 75 #define STUB_CODE_INITIALIZER(name) \ |
| 76 name##_entry_(NULL), \ | 76 name##_entry_(NULL), |
| 77 STUB_CODE_LIST(STUB_CODE_INITIALIZER) | 77 STUB_CODE_LIST(STUB_CODE_INITIALIZER) |
| 78 dummy_(NULL) {} | 78 dummy_(NULL) {} |
| 79 ~StubCode(); | 79 ~StubCode(); |
| 80 | 80 |
| 81 void GenerateFor(Isolate* isolate); | 81 void GenerateFor(Isolate* isolate); |
| 82 | 82 |
| 83 // Generate all stubs which are shared across all isolates, this is done | 83 // Generate all stubs which are shared across all isolates, this is done |
| 84 // only once and the stub code resides in the vm_isolate heap. | 84 // only once and the stub code resides in the vm_isolate heap. |
| 85 static void InitOnce(); | 85 static void InitOnce(); |
| 86 | 86 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 static void GenerateAllocationStubForClass(Assembler* assembler, | 162 static void GenerateAllocationStubForClass(Assembler* assembler, |
| 163 const Class& cls); | 163 const Class& cls); |
| 164 static void GenerateAllocationStubForClosure(Assembler* assembler, | 164 static void GenerateAllocationStubForClosure(Assembler* assembler, |
| 165 const Function& func); | 165 const Function& func); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace dart | 168 } // namespace dart |
| 169 | 169 |
| 170 #endif // VM_STUB_CODE_H_ | 170 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |