Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: runtime/vm/stub_code.h

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/runtime_entry_x64.cc ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static bool InInvocationStub(uword pc); 109 static bool InInvocationStub(uword pc);
110 110
111 // Check if the specified pc is in the jump to exception handler stub. 111 // Check if the specified pc is in the jump to exception handler stub.
112 static bool InJumpToExceptionHandlerStub(uword pc); 112 static bool InJumpToExceptionHandlerStub(uword pc);
113 113
114 // Returns NULL if no stub found. 114 // Returns NULL if no stub found.
115 static const char* NameOfStub(uword entry_point); 115 static const char* NameOfStub(uword entry_point);
116 116
117 // Define the shared stub code accessors. 117 // Define the shared stub code accessors.
118 #define STUB_CODE_ACCESSOR(name) \ 118 #define STUB_CODE_ACCESSOR(name) \
119 static StubEntry* name##_entry() { \ 119 static const StubEntry* name##_entry() { \
120 return name##_entry_; \ 120 return name##_entry_; \
121 } \ 121 } \
122 static const ExternalLabel& name##Label() { \
123 return name##_entry()->label(); \
124 } \
125 static uword name##EntryPoint() { \
126 return name##_entry()->EntryPoint(); \
127 } \
128 static intptr_t name##Size() { \ 122 static intptr_t name##Size() { \
129 return name##_entry()->Size(); \ 123 return name##_entry()->Size(); \
130 } 124 }
131 VM_STUB_CODE_LIST(STUB_CODE_ACCESSOR); 125 VM_STUB_CODE_LIST(STUB_CODE_ACCESSOR);
132 #undef STUB_CODE_ACCESSOR 126 #undef STUB_CODE_ACCESSOR
133 127
134 static RawCode* GetAllocationStubForClass(const Class& cls); 128 static RawCode* GetAllocationStubForClass(const Class& cls);
135 129
136 static uword UnoptimizedStaticCallEntryPoint(intptr_t num_args_tested); 130 static const StubEntry* UnoptimizedStaticCallEntry(intptr_t num_args_tested);
137 131
138 static const intptr_t kNoInstantiator = 0; 132 static const intptr_t kNoInstantiator = 0;
139 133
140 static void EmitMegamorphicLookup( 134 static void EmitMegamorphicLookup(
141 Assembler*, Register recv, Register cache, Register target); 135 Assembler*, Register recv, Register cache, Register target);
142 136
143 private: 137 private:
144 friend class MegamorphicCacheTable; 138 friend class MegamorphicCacheTable;
145 139
146 static const intptr_t kStubCodeSize = 4 * KB; 140 static const intptr_t kStubCodeSize = 4 * KB;
(...skipping 30 matching lines...) Expand all
177 RangeCollectionMode range_collection_mode, 171 RangeCollectionMode range_collection_mode,
178 bool optimized = false); 172 bool optimized = false);
179 static void GenerateUsageCounterIncrement(Assembler* assembler, 173 static void GenerateUsageCounterIncrement(Assembler* assembler,
180 Register temp_reg); 174 Register temp_reg);
181 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler); 175 static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
182 }; 176 };
183 177
184 } // namespace dart 178 } // namespace dart
185 179
186 #endif // VM_STUB_CODE_H_ 180 #endif // VM_STUB_CODE_H_
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry_x64.cc ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698