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

Unified Diff: runtime/vm/stub_code.h

Issue 600243002: Patchable AllocateArray stub, like instance allocation stubs. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/stub_code.h
===================================================================
--- runtime/vm/stub_code.h (revision 40629)
+++ runtime/vm/stub_code.h (working copy)
@@ -51,7 +51,6 @@
// 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) \
- V(AllocateArray) \
V(CallClosureNoSuchMethod) \
V(AllocateContext) \
V(UpdateStoreBuffer) \
@@ -98,12 +97,12 @@
// class StubCode is used to maintain the lifecycle of stubs.
class StubCode {
public:
- StubCode()
+ explicit StubCode(Isolate* isolate)
:
#define STUB_CODE_INITIALIZER(name) \
name##_entry_(NULL),
STUB_CODE_LIST(STUB_CODE_INITIALIZER)
- dummy_(NULL) {}
+ isolate_(isolate) {}
~StubCode();
void GenerateFor(Isolate* isolate);
@@ -165,6 +164,7 @@
#undef STUB_CODE_ACCESSOR
static RawCode* GetAllocationStubForClass(const Class& cls);
+ RawCode* GetAllocateArrayStub();
uword UnoptimizedStaticCallEntryPoint(intptr_t num_args_tested);
@@ -190,9 +190,7 @@
StubEntry* name##_entry_;
STUB_CODE_LIST(STUB_CODE_ENTRY);
#undef STUB_CODE_ENTRY
- // This dummy field is needed so that we can initialize
- // the stubs from a macro.
- void* dummy_;
+ Isolate* isolate_;
// Generate the stub and finalize the generated code into the stub
// code executable area.
@@ -203,6 +201,8 @@
static void GenerateAllocationStubForClass(
Assembler* assembler, const Class& cls,
uword* entry_patch_offset, uword* patch_code_pc_offset);
+ static void GeneratePatchableAllocateArrayStub(Assembler* assembler,
+ uword* entry_patch_offset, uword* patch_code_pc_offset);
static void GenerateNArgsCheckInlineCacheStub(
Assembler* assembler,
intptr_t num_args,

Powered by Google App Engine
This is Rietveld 408576698