| 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 RUNTIME_VM_STUB_CODE_H_ | 5 #ifndef RUNTIME_VM_STUB_CODE_H_ |
| 6 #define RUNTIME_VM_STUB_CODE_H_ | 6 #define RUNTIME_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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 private: | 111 private: |
| 112 RawCode* code_; | 112 RawCode* code_; |
| 113 uword entry_point_; | 113 uword entry_point_; |
| 114 uword checked_entry_point_; | 114 uword checked_entry_point_; |
| 115 intptr_t size_; | 115 intptr_t size_; |
| 116 ExternalLabel label_; | 116 ExternalLabel label_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(StubEntry); | 118 DISALLOW_COPY_AND_ASSIGN(StubEntry); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 | |
| 122 // class StubCode is used to maintain the lifecycle of stubs. | 121 // class StubCode is used to maintain the lifecycle of stubs. |
| 123 class StubCode : public AllStatic { | 122 class StubCode : public AllStatic { |
| 124 public: | 123 public: |
| 125 // Generate all stubs which are shared across all isolates, this is done | 124 // Generate all stubs which are shared across all isolates, this is done |
| 126 // only once and the stub code resides in the vm_isolate heap. | 125 // only once and the stub code resides in the vm_isolate heap. |
| 127 static void InitOnce(); | 126 static void InitOnce(); |
| 128 | 127 |
| 129 // Generate all stubs which are generated on a per isolate basis as they | 128 // Generate all stubs which are generated on a per isolate basis as they |
| 130 // have embedded objects which are isolate specific. | 129 // have embedded objects which are isolate specific. |
| 131 static void Init(Isolate* isolate); | 130 static void Init(Isolate* isolate); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 Assembler* assembler, | 195 Assembler* assembler, |
| 197 intptr_t num_args, | 196 intptr_t num_args, |
| 198 const RuntimeEntry& handle_ic_miss, | 197 const RuntimeEntry& handle_ic_miss, |
| 199 Token::Kind kind, | 198 Token::Kind kind, |
| 200 bool optimized = false); | 199 bool optimized = false); |
| 201 static void GenerateUsageCounterIncrement(Assembler* assembler, | 200 static void GenerateUsageCounterIncrement(Assembler* assembler, |
| 202 Register temp_reg); | 201 Register temp_reg); |
| 203 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); | 202 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); |
| 204 }; | 203 }; |
| 205 | 204 |
| 206 | |
| 207 enum DeoptStubKind { kLazyDeoptFromReturn, kLazyDeoptFromThrow, kEagerDeopt }; | 205 enum DeoptStubKind { kLazyDeoptFromReturn, kLazyDeoptFromThrow, kEagerDeopt }; |
| 208 | 206 |
| 209 // Zap value used to indicate unused CODE_REG in deopt. | 207 // Zap value used to indicate unused CODE_REG in deopt. |
| 210 static const uword kZapCodeReg = 0xf1f1f1f1; | 208 static const uword kZapCodeReg = 0xf1f1f1f1; |
| 211 | 209 |
| 212 // Zap value used to indicate unused return address in deopt. | 210 // Zap value used to indicate unused return address in deopt. |
| 213 static const uword kZapReturnAddress = 0xe1e1e1e1; | 211 static const uword kZapReturnAddress = 0xe1e1e1e1; |
| 214 | 212 |
| 215 } // namespace dart | 213 } // namespace dart |
| 216 | 214 |
| 217 #endif // RUNTIME_VM_STUB_CODE_H_ | 215 #endif // RUNTIME_VM_STUB_CODE_H_ |
| OLD | NEW |