| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 V(SmiAddInlineCache) \ | 47 V(SmiAddInlineCache) \ |
| 48 V(SmiSubInlineCache) \ | 48 V(SmiSubInlineCache) \ |
| 49 V(SmiEqualInlineCache) \ | 49 V(SmiEqualInlineCache) \ |
| 50 V(UnaryRangeCollectingInlineCache) \ | 50 V(UnaryRangeCollectingInlineCache) \ |
| 51 V(BinaryRangeCollectingInlineCache) \ | 51 V(BinaryRangeCollectingInlineCache) \ |
| 52 V(OneArgOptimizedCheckInlineCache) \ | 52 V(OneArgOptimizedCheckInlineCache) \ |
| 53 V(TwoArgsOptimizedCheckInlineCache) \ | 53 V(TwoArgsOptimizedCheckInlineCache) \ |
| 54 V(ZeroArgsUnoptimizedStaticCall) \ | 54 V(ZeroArgsUnoptimizedStaticCall) \ |
| 55 V(OneArgUnoptimizedStaticCall) \ | 55 V(OneArgUnoptimizedStaticCall) \ |
| 56 V(TwoArgsUnoptimizedStaticCall) \ | 56 V(TwoArgsUnoptimizedStaticCall) \ |
| 57 V(Subtype1TestCache) \ |
| 58 V(Subtype2TestCache) \ |
| 59 V(Subtype3TestCache) \ |
| 57 | 60 |
| 58 // Is it permitted for the stubs above to refer to Object::null(), which is | 61 // Is it permitted for the stubs above to refer to Object::null(), which is |
| 59 // allocated in the VM isolate and shared across all isolates. | 62 // allocated in the VM isolate and shared across all isolates. |
| 60 // However, in cases where a simple GC-safe placeholder is needed on the stack, | 63 // However, in cases where a simple GC-safe placeholder is needed on the stack, |
| 61 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi | 64 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi |
| 62 // does not require relocation. | 65 // does not require relocation. |
| 63 | 66 |
| 64 // List of stubs created per isolate, these stubs could potentially contain | 67 // List of stubs created per isolate, these stubs could potentially contain |
| 65 // embedded objects and hence cannot be shared across isolates. | 68 // embedded objects and hence cannot be shared across isolates. |
| 66 #define STUB_CODE_LIST(V) \ | 69 #define STUB_CODE_LIST(V) \ |
| 67 V(CallClosureNoSuchMethod) \ | 70 V(CallClosureNoSuchMethod) \ |
| 68 V(AllocateContext) \ | 71 V(AllocateContext) \ |
| 69 V(Subtype1TestCache) \ | |
| 70 V(Subtype2TestCache) \ | |
| 71 V(Subtype3TestCache) \ | |
| 72 | 72 |
| 73 | 73 |
| 74 // class StubEntry is used to describe stub methods generated in dart to | 74 // class StubEntry is used to describe stub methods generated in dart to |
| 75 // abstract out common code executed from generated dart code. | 75 // abstract out common code executed from generated dart code. |
| 76 class StubEntry { | 76 class StubEntry { |
| 77 public: | 77 public: |
| 78 explicit StubEntry(const Code& code); | 78 explicit StubEntry(const Code& code); |
| 79 ~StubEntry() {} | 79 ~StubEntry() {} |
| 80 | 80 |
| 81 const ExternalLabel& label() const { return label_; } | 81 const ExternalLabel& label() const { return label_; } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 Assembler* assembler, | 229 Assembler* assembler, |
| 230 const Register left, | 230 const Register left, |
| 231 const Register right, | 231 const Register right, |
| 232 const Register temp1 = kNoRegister, | 232 const Register temp1 = kNoRegister, |
| 233 const Register temp2 = kNoRegister); | 233 const Register temp2 = kNoRegister); |
| 234 }; | 234 }; |
| 235 | 235 |
| 236 } // namespace dart | 236 } // namespace dart |
| 237 | 237 |
| 238 #endif // VM_STUB_CODE_H_ | 238 #endif // VM_STUB_CODE_H_ |
| OLD | NEW |