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

Unified Diff: src/stub-cache.h

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: 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/store-buffer.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..f6528c8535ab1823a00dca1f96836ea8f42b291d 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -103,7 +103,7 @@ class StubCache {
Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map);
Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map,
- StrictModeFlag strict_mode,
+ StrictMode strict_mode,
KeyedAccessStoreMode store_mode);
// ---
@@ -122,7 +122,7 @@ class StubCache {
Handle<Code> ComputeLoadElementPolymorphic(MapHandleList* receiver_maps);
Handle<Code> ComputeStoreElementPolymorphic(MapHandleList* receiver_maps,
KeyedAccessStoreMode store_mode,
- StrictModeFlag strict_mode);
+ StrictMode strict_mode);
Handle<Code> ComputePolymorphicIC(Code::Kind kind,
TypeHandleList* types,
@@ -360,12 +360,6 @@ class StubCompiler BASE_EMBEDDED {
Register scratch,
Label* miss_label);
- static void GenerateLoadStringLength(MacroAssembler* masm,
- Register receiver,
- Register scratch1,
- Register scratch2,
- Label* miss_label);
-
static void GenerateLoadFunctionPrototype(MacroAssembler* masm,
Register receiver,
Register scratch1,
@@ -522,11 +516,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 +577,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 +592,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 +633,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 +721,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 +758,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 +788,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/store-buffer.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698