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

Unified Diff: src/stub-cache.h

Issue 173853005: allowed keyed store callbacks ic generation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »
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 b7c37c398b1007fb9e42d12ee68f8041420ee336..ad2b550143fe10c1b12805611c6fc7e4be3b5cfc 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -522,11 +522,11 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
}
void JitEvent(Handle<Name> name, Handle<Code> code);
- virtual Register receiver() = 0;
- virtual Register name() = 0;
- virtual Register scratch1() = 0;
- virtual Register scratch2() = 0;
- virtual Register scratch3() = 0;
+ 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]; }
void InitializeRegisters();
@@ -583,6 +583,11 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
Register receiver,
Handle<JSFunction> getter);
+ static void GenerateLoadViaGetterForDeopt(MacroAssembler* masm) {
+ GenerateLoadViaGetter(
+ masm, Handle<HeapType>::null(), no_reg, Handle<JSFunction>());
+ }
+
Handle<Code> CompileLoadNonexistent(Handle<HeapType> type,
Handle<JSObject> last,
Handle<Name> name);
@@ -593,8 +598,6 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
Handle<Name> name,
bool is_dont_delete);
- static Register* registers();
-
protected:
ContextualMode contextual_mode() {
return LoadIC::GetContextualMode(extra_state());
@@ -636,12 +639,10 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
Handle<Name> name,
LookupResult* lookup);
- virtual Register receiver() { return registers_[0]; }
- virtual Register name() { return registers_[1]; }
- virtual Register scratch1() { return registers_[2]; }
- virtual Register scratch2() { return registers_[3]; }
- virtual Register scratch3() { return registers_[4]; }
+ private:
+ static Register* registers();
Register scratch4() { return registers_[5]; }
+ friend class BaseLoadStoreStubCompiler;
};
@@ -726,8 +727,14 @@ class StoreStubCompiler: public BaseLoadStoreStubCompiler {
static void GenerateStoreViaSetter(MacroAssembler* masm,
Handle<HeapType> type,
+ Register receiver,
Handle<JSFunction> setter);
+ static void GenerateStoreViaSetterForDeopt(MacroAssembler* masm) {
+ GenerateStoreViaSetter(
+ masm, Handle<HeapType>::null(), no_reg, Handle<JSFunction>());
+ }
+
Handle<Code> CompileStoreViaSetter(Handle<JSObject> object,
Handle<JSObject> holder,
Handle<Name> name,
@@ -757,17 +764,9 @@ class StoreStubCompiler: public BaseLoadStoreStubCompiler {
Label* label,
Handle<Name> name);
- virtual Register receiver() { return registers_[0]; }
- virtual Register name() { return registers_[1]; }
- Register value() { return registers_[2]; }
- virtual Register scratch1() { return registers_[3]; }
- virtual Register scratch2() { return registers_[4]; }
- virtual Register scratch3() { return registers_[5]; }
-
- protected:
- static Register* registers();
-
private:
+ static Register* registers();
+ static Register value();
friend class BaseLoadStoreStubCompiler;
};
@@ -795,9 +794,7 @@ class KeyedStoreStubCompiler: public StoreStubCompiler {
return KeyedStoreIC::GetKeyedAccessStoreMode(extra_state());
}
- Register transition_map() {
- return registers()[3];
- }
+ Register transition_map() { return scratch1(); }
friend class BaseLoadStoreStubCompiler;
};
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698