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

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

Issue 1225933002: Remove fixed contant pool entries by caching some global constants in Thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added helper methods to Thread Created 5 years, 5 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
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
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(GetStackPointer) \ 23 V(GetStackPointer) \
24 V(JumpToExceptionHandler) \ 24 V(JumpToExceptionHandler) \
25 V(UpdateStoreBuffer) \
25 26
26 // Is it permitted for the stubs above to refer to Object::null(), which is 27 // Is it permitted for the stubs above to refer to Object::null(), which is
27 // allocated in the VM isolate and shared across all isolates. 28 // allocated in the VM isolate and shared across all isolates.
28 // However, in cases where a simple GC-safe placeholder is needed on the stack, 29 // However, in cases where a simple GC-safe placeholder is needed on the stack,
29 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi 30 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi
30 // does not require relocation. 31 // does not require relocation.
31 32
32 // List of stubs created per isolate, these stubs could potentially contain 33 // List of stubs created per isolate, these stubs could potentially contain
33 // embedded objects and hence cannot be shared across isolates. 34 // embedded objects and hence cannot be shared across isolates.
34 // The initial stubs are needed for loading bootstrapping scripts and have to 35 // The initial stubs are needed for loading bootstrapping scripts and have to
35 // be generated before Object::Init is called. 36 // be generated before Object::Init is called.
36 #define BOOTSTRAP_STUB_CODE_LIST(V) \ 37 #define BOOTSTRAP_STUB_CODE_LIST(V) \
37 V(PrintStopMessage) \ 38 V(PrintStopMessage) \
38 V(CallToRuntime) \ 39 V(CallToRuntime) \
39 V(LazyCompile) \ 40 V(LazyCompile) \
40 41
41 #define REST_STUB_CODE_LIST(V) \ 42 #define REST_STUB_CODE_LIST(V) \
42 V(CallBootstrapCFunction) \ 43 V(CallBootstrapCFunction) \
43 V(CallNativeCFunction) \ 44 V(CallNativeCFunction) \
44 V(FixCallersTarget) \ 45 V(FixCallersTarget) \
45 V(CallStaticFunction) \ 46 V(CallStaticFunction) \
46 V(FixAllocationStubTarget) \ 47 V(FixAllocationStubTarget) \
47 V(FixAllocateArrayStubTarget) \ 48 V(FixAllocateArrayStubTarget) \
48 V(CallClosureNoSuchMethod) \ 49 V(CallClosureNoSuchMethod) \
49 V(AllocateContext) \ 50 V(AllocateContext) \
50 V(UpdateStoreBuffer) \
51 V(OneArgCheckInlineCache) \ 51 V(OneArgCheckInlineCache) \
52 V(TwoArgsCheckInlineCache) \ 52 V(TwoArgsCheckInlineCache) \
53 V(SmiAddInlineCache) \ 53 V(SmiAddInlineCache) \
54 V(SmiSubInlineCache) \ 54 V(SmiSubInlineCache) \
55 V(SmiEqualInlineCache) \ 55 V(SmiEqualInlineCache) \
56 V(UnaryRangeCollectingInlineCache) \ 56 V(UnaryRangeCollectingInlineCache) \
57 V(BinaryRangeCollectingInlineCache) \ 57 V(BinaryRangeCollectingInlineCache) \
58 V(OneArgOptimizedCheckInlineCache) \ 58 V(OneArgOptimizedCheckInlineCache) \
59 V(TwoArgsOptimizedCheckInlineCache) \ 59 V(TwoArgsOptimizedCheckInlineCache) \
60 V(ZeroArgsUnoptimizedStaticCall) \ 60 V(ZeroArgsUnoptimizedStaticCall) \
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 Assembler* assembler, 240 Assembler* assembler,
241 const Register left, 241 const Register left,
242 const Register right, 242 const Register right,
243 const Register temp1 = kNoRegister, 243 const Register temp1 = kNoRegister,
244 const Register temp2 = kNoRegister); 244 const Register temp2 = kNoRegister);
245 }; 245 };
246 246
247 } // namespace dart 247 } // namespace dart
248 248
249 #endif // VM_STUB_CODE_H_ 249 #endif // VM_STUB_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698