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

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

Issue 203523011: Introduce a lazy-compile stub for functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased & added MIPS code Created 6 years, 9 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 | Annotate | Revision Log
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(PrintStopMessage) \ 23 V(PrintStopMessage) \
24 V(CallToRuntime) \ 24 V(CallToRuntime) \
25 V(LazyCompile) \
26 V(LazyCompileClosure) \
25 V(CallBootstrapCFunction) \ 27 V(CallBootstrapCFunction) \
26 V(CallNativeCFunction) \ 28 V(CallNativeCFunction) \
27 V(AllocateArray) \ 29 V(AllocateArray) \
28 V(CallNoSuchMethodFunction) \ 30 V(CallNoSuchMethodFunction) \
29 V(InstanceFunctionLookup) \ 31 V(InstanceFunctionLookup) \
30 V(CallStaticFunction) \ 32 V(CallStaticFunction) \
31 V(CallClosureFunction) \ 33 V(CallClosureFunction) \
32 V(FixCallersTarget) \ 34 V(FixCallersTarget) \
33 V(Deoptimize) \ 35 V(Deoptimize) \
34 V(DeoptimizeLazy) \ 36 V(DeoptimizeLazy) \
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 71
70 // class StubEntry is used to describe stub methods generated in dart to 72 // class StubEntry is used to describe stub methods generated in dart to
71 // abstract out common code executed from generated dart code. 73 // abstract out common code executed from generated dart code.
72 class StubEntry { 74 class StubEntry {
73 public: 75 public:
74 StubEntry(const char* name, const Code& code); 76 StubEntry(const char* name, const Code& code);
75 ~StubEntry() {} 77 ~StubEntry() {}
76 78
77 const ExternalLabel& label() const { return label_; } 79 const ExternalLabel& label() const { return label_; }
78 uword EntryPoint() const { return entry_point_; } 80 uword EntryPoint() const { return entry_point_; }
81 RawCode* code() const { return code_; }
79 intptr_t Size() const { return size_; } 82 intptr_t Size() const { return size_; }
80 83
81 // Visit all object pointers. 84 // Visit all object pointers.
82 void VisitObjectPointers(ObjectPointerVisitor* visitor); 85 void VisitObjectPointers(ObjectPointerVisitor* visitor);
83 86
84 private: 87 private:
85 RawCode* code_; 88 RawCode* code_;
86 uword entry_point_; 89 uword entry_point_;
87 intptr_t size_; 90 intptr_t size_;
88 ExternalLabel label_; 91 ExternalLabel label_;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Assembler* assembler, 206 Assembler* assembler,
204 const Register left, 207 const Register left,
205 const Register right, 208 const Register right,
206 const Register temp1 = kNoRegister, 209 const Register temp1 = kNoRegister,
207 const Register temp2 = kNoRegister); 210 const Register temp2 = kNoRegister);
208 }; 211 };
209 212
210 } // namespace dart 213 } // namespace dart
211 214
212 #endif // VM_STUB_CODE_H_ 215 #endif // VM_STUB_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698