| Index: runtime/vm/stub_code.h
|
| ===================================================================
|
| --- runtime/vm/stub_code.h (revision 41244)
|
| +++ runtime/vm/stub_code.h (working copy)
|
| @@ -21,24 +21,8 @@
|
| // isolates running in this dart process.
|
| #define VM_STUB_CODE_LIST(V) \
|
| V(PrintStopMessage) \
|
| - V(CallToRuntime) \
|
| - V(LazyCompile) \
|
| - V(CallBootstrapCFunction) \
|
| - V(CallNativeCFunction) \
|
| - V(CallStaticFunction) \
|
| - V(FixCallersTarget) \
|
| - V(FixAllocationStubTarget) \
|
| - V(FixAllocateArrayStubTarget) \
|
| - V(Deoptimize) \
|
| - V(DeoptimizeLazy) \
|
| - V(ICCallBreakpoint) \
|
| - V(ClosureCallBreakpoint) \
|
| - V(RuntimeCallBreakpoint) \
|
| - V(DebugStepCheck) \
|
| V(GetStackPointer) \
|
| V(JumpToExceptionHandler) \
|
| - V(UnoptimizedIdenticalWithNumberCheck) \
|
| - V(OptimizedIdenticalWithNumberCheck) \
|
|
|
| // Is it permitted for the stubs above to refer to Object::null(), which is
|
| // allocated in the VM isolate and shared across all isolates.
|
| @@ -48,7 +32,19 @@
|
|
|
| // List of stubs created per isolate, these stubs could potentially contain
|
| // embedded objects and hence cannot be shared across isolates.
|
| -#define STUB_CODE_LIST(V) \
|
| +// The initial stubs are needed for loading bootstrapping scripts and have to
|
| +// be generated before Object::Init is called.
|
| +#define BOOTSTRAP_STUB_CODE_LIST(V) \
|
| + V(CallToRuntime) \
|
| + V(LazyCompile) \
|
| +
|
| +#define REST_STUB_CODE_LIST(V) \
|
| + V(CallBootstrapCFunction) \
|
| + V(CallNativeCFunction) \
|
| + V(FixCallersTarget) \
|
| + V(CallStaticFunction) \
|
| + V(FixAllocationStubTarget) \
|
| + V(FixAllocateArrayStubTarget) \
|
| V(CallClosureNoSuchMethod) \
|
| V(AllocateContext) \
|
| V(UpdateStoreBuffer) \
|
| @@ -69,7 +65,19 @@
|
| V(Subtype1TestCache) \
|
| V(Subtype2TestCache) \
|
| V(Subtype3TestCache) \
|
| + V(Deoptimize) \
|
| + V(DeoptimizeLazy) \
|
| + V(ICCallBreakpoint) \
|
| + V(ClosureCallBreakpoint) \
|
| + V(RuntimeCallBreakpoint) \
|
| + V(UnoptimizedIdenticalWithNumberCheck) \
|
| + V(OptimizedIdenticalWithNumberCheck) \
|
| + V(DebugStepCheck) \
|
|
|
| +#define STUB_CODE_LIST(V) \
|
| + BOOTSTRAP_STUB_CODE_LIST(V) \
|
| + REST_STUB_CODE_LIST(V)
|
| +
|
| // class StubEntry is used to describe stub methods generated in dart to
|
| // abstract out common code executed from generated dart code.
|
| class StubEntry {
|
| @@ -106,7 +114,6 @@
|
| isolate_(isolate) {}
|
| ~StubCode();
|
|
|
| - void GenerateFor(Isolate* isolate);
|
|
|
| // Generate all stubs which are shared across all isolates, this is done
|
| // only once and the stub code resides in the vm_isolate heap.
|
| @@ -114,6 +121,9 @@
|
|
|
| // Generate all stubs which are generated on a per isolate basis as they
|
| // have embedded objects which are isolate specific.
|
| + // Bootstrap stubs are needed before Object::Init to compile the bootstrap
|
| + // scripts.
|
| + static void InitBootstrapStubs(Isolate* isolate);
|
| static void Init(Isolate* isolate);
|
|
|
| static void VisitObjectPointers(ObjectPointerVisitor* visitor);
|
| @@ -172,6 +182,9 @@
|
| static const intptr_t kNoInstantiator = 0;
|
|
|
| private:
|
| + void GenerateBootstrapStubsFor(Isolate* isolate);
|
| + void GenerateStubsFor(Isolate* isolate);
|
| +
|
| friend class MegamorphicCacheTable;
|
|
|
| static const intptr_t kStubCodeSize = 4 * KB;
|
|
|