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

Unified Diff: runtime/vm/stub_code.h

Issue 668193002: Remove isolate pointer from context objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« 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