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

Unified Diff: src/stub-cache.h

Issue 414443002: Always use the LoadStubCompiler for Load handlers, also for keyedload handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ensure that LoadIC can be used to compile keyed load ICs with shared load handlers Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | src/stub-cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.h
diff --git a/src/stub-cache.h b/src/stub-cache.h
index 2a59ecc590799baaf4d118005c23e3b00d58fcb3..cdd98eb59a67d4c75b51e19f474db728b444507f 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -503,13 +503,13 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
class LoadStubCompiler: public BaseLoadStoreStubCompiler {
public:
- LoadStubCompiler(Isolate* isolate,
+ LoadStubCompiler(Isolate* isolate, Code::Kind kind = Code::LOAD_IC,
ExtraICState extra_ic_state = kNoExtraICState,
- CacheHolderFlag cache_holder = kCacheOnReceiver,
- Code::Kind kind = Code::LOAD_IC)
+ CacheHolderFlag cache_holder = kCacheOnReceiver)
: BaseLoadStoreStubCompiler(isolate, kind, extra_ic_state, cache_holder) {
}
virtual ~LoadStubCompiler() { }
+ static Register* registers();
Handle<Code> CompileLoadField(Handle<HeapType> type,
Handle<JSObject> holder,
@@ -603,19 +603,18 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
LookupResult* lookup);
private:
- static Register* registers();
Register scratch4() { return registers_[5]; }
friend class BaseLoadStoreStubCompiler;
};
-class KeyedLoadStubCompiler: public LoadStubCompiler {
+class KeyedLoadStubCompiler : public StubCompiler {
public:
KeyedLoadStubCompiler(Isolate* isolate,
- ExtraICState extra_ic_state = kNoExtraICState,
- CacheHolderFlag cache_holder = kCacheOnReceiver)
- : LoadStubCompiler(isolate, extra_ic_state, cache_holder,
- Code::KEYED_LOAD_IC) {}
+ ExtraICState extra_ic_state = kNoExtraICState)
+ : StubCompiler(isolate, extra_ic_state) {
+ registers_ = LoadStubCompiler::registers();
+ }
Handle<Code> CompileLoadElement(Handle<Map> receiver_map);
@@ -624,9 +623,15 @@ class KeyedLoadStubCompiler: public LoadStubCompiler {
static void GenerateLoadDictionaryElement(MacroAssembler* masm);
+ Register receiver() { return registers_[0]; }
+ Register name() { return registers_[1]; }
+ Register scratch1() { return registers_[2]; }
+ Register scratch2() { return registers_[3]; }
+ Register scratch3() { return registers_[4]; }
+
private:
static Register* registers();
- friend class BaseLoadStoreStubCompiler;
+ Register* registers_;
};
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | src/stub-cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698