| 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(PrintStopMessage) \ | 23 V(PrintStopMessage) \ |
| 24 V(CallToRuntime) \ | 24 V(CallToRuntime) \ |
| 25 V(LazyCompile) \ | 25 V(LazyCompile) \ |
| 26 V(CallBootstrapCFunction) \ | 26 V(CallBootstrapCFunction) \ |
| 27 V(CallNativeCFunction) \ | 27 V(CallNativeCFunction) \ |
| 28 V(CallStaticFunction) \ | 28 V(CallStaticFunction) \ |
| 29 V(FixCallersTarget) \ | 29 V(FixCallersTarget) \ |
| 30 V(FixAllocationStubTarget) \ |
| 30 V(Deoptimize) \ | 31 V(Deoptimize) \ |
| 31 V(DeoptimizeLazy) \ | 32 V(DeoptimizeLazy) \ |
| 32 V(ICCallBreakpoint) \ | 33 V(ICCallBreakpoint) \ |
| 33 V(ClosureCallBreakpoint) \ | 34 V(ClosureCallBreakpoint) \ |
| 34 V(RuntimeCallBreakpoint) \ | 35 V(RuntimeCallBreakpoint) \ |
| 35 V(DebugStepCheck) \ | 36 V(DebugStepCheck) \ |
| 36 V(Subtype1TestCache) \ | 37 V(Subtype1TestCache) \ |
| 37 V(Subtype2TestCache) \ | 38 V(Subtype2TestCache) \ |
| 38 V(Subtype3TestCache) \ | 39 V(Subtype3TestCache) \ |
| 39 V(GetStackPointer) \ | 40 V(GetStackPointer) \ |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // This dummy field is needed so that we can initialize | 193 // This dummy field is needed so that we can initialize |
| 193 // the stubs from a macro. | 194 // the stubs from a macro. |
| 194 void* dummy_; | 195 void* dummy_; |
| 195 | 196 |
| 196 // Generate the stub and finalize the generated code into the stub | 197 // Generate the stub and finalize the generated code into the stub |
| 197 // code executable area. | 198 // code executable area. |
| 198 static RawCode* Generate(const char* name, | 199 static RawCode* Generate(const char* name, |
| 199 void (*GenerateStub)(Assembler* assembler)); | 200 void (*GenerateStub)(Assembler* assembler)); |
| 200 | 201 |
| 201 static void GenerateMegamorphicMissStub(Assembler* assembler); | 202 static void GenerateMegamorphicMissStub(Assembler* assembler); |
| 202 static void GenerateAllocationStubForClass(Assembler* assembler, | 203 static uword GenerateAllocationStubForClass(Assembler* assembler, |
| 203 const Class& cls); | 204 const Class& cls); |
| 204 static void GenerateNArgsCheckInlineCacheStub( | 205 static void GenerateNArgsCheckInlineCacheStub( |
| 205 Assembler* assembler, | 206 Assembler* assembler, |
| 206 intptr_t num_args, | 207 intptr_t num_args, |
| 207 const RuntimeEntry& handle_ic_miss, | 208 const RuntimeEntry& handle_ic_miss, |
| 208 Token::Kind kind); | 209 Token::Kind kind); |
| 209 static void GenerateUsageCounterIncrement(Assembler* assembler, | 210 static void GenerateUsageCounterIncrement(Assembler* assembler, |
| 210 Register temp_reg); | 211 Register temp_reg); |
| 211 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); | 212 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); |
| 212 | 213 |
| 213 static void GenerateIdenticalWithNumberCheckStub( | 214 static void GenerateIdenticalWithNumberCheckStub( |
| 214 Assembler* assembler, | 215 Assembler* assembler, |
| 215 const Register left, | 216 const Register left, |
| 216 const Register right, | 217 const Register right, |
| 217 const Register temp1 = kNoRegister, | 218 const Register temp1 = kNoRegister, |
| 218 const Register temp2 = kNoRegister); | 219 const Register temp2 = kNoRegister); |
| 219 }; | 220 }; |
| 220 | 221 |
| 221 } // namespace dart | 222 } // namespace dart |
| 222 | 223 |
| 223 #endif // VM_STUB_CODE_H_ | 224 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |