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

Unified Diff: src/stub-cache.h

Issue 143633007: A64: Synchronize with r18764. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/string.js ('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 1f3fa9320213c5d2b6b4463ce723287b251449d7..72ca16e428325d675da3fbdd02f359de2bae3b59 100644
--- a/src/stub-cache.h
+++ b/src/stub-cache.h
@@ -92,11 +92,11 @@ class StubCache {
InlineCacheHolderFlag cache_holder = OWN_MAP);
Handle<Code> ComputeMonomorphicIC(Handle<Name> name,
- Handle<Type> type,
+ Handle<HeapType> type,
Handle<Code> handler,
ExtraICState extra_ic_state);
- Handle<Code> ComputeLoadNonexistent(Handle<Name> name, Handle<Type> type);
+ Handle<Code> ComputeLoadNonexistent(Handle<Name> name, Handle<HeapType> type);
Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map);
@@ -472,10 +472,7 @@ class StubCompiler BASE_EMBEDDED {
// register is only clobbered if it the same as the holder register. The
// function returns a register containing the holder - either object_reg or
// holder_reg.
- // The function can optionally (when save_at_depth !=
- // kInvalidProtoDepth) save the object at the given depth by moving
- // it to [esp + kPointerSize].
- Register CheckPrototypes(Handle<Type> type,
+ Register CheckPrototypes(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Register holder_reg,
@@ -483,20 +480,6 @@ class StubCompiler BASE_EMBEDDED {
Register scratch2,
Handle<Name> name,
Label* miss,
- PrototypeCheckType check = CHECK_ALL_MAPS) {
- return CheckPrototypes(type, object_reg, holder, holder_reg, scratch1,
- scratch2, name, kInvalidProtoDepth, miss, check);
- }
-
- Register CheckPrototypes(Handle<Type> type,
- Register object_reg,
- Handle<JSObject> holder,
- Register holder_reg,
- Register scratch1,
- Register scratch2,
- Handle<Name> name,
- int save_at_depth,
- Label* miss,
PrototypeCheckType check = CHECK_ALL_MAPS);
void GenerateBooleanCheck(Register object, Label* miss);
@@ -517,9 +500,6 @@ class StubCompiler BASE_EMBEDDED {
Isolate* isolate() { return isolate_; }
Heap* heap() { return isolate()->heap(); }
Factory* factory() { return isolate()->factory(); }
- ContextualMode contextual_mode() {
- return IC::GetContextualMode(extra_state());
- }
static void GenerateTailCall(MacroAssembler* masm, Handle<Code> code);
@@ -547,7 +527,7 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
}
virtual ~BaseLoadStoreStubCompiler() { }
- Handle<Code> CompileMonomorphicIC(Handle<Type> type,
+ Handle<Code> CompileMonomorphicIC(Handle<HeapType> type,
Handle<Code> handler,
Handle<Name> name);
@@ -557,10 +537,6 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
Code::StubType type,
IcCheckType check);
- virtual void GenerateNameCheck(Handle<Name> name,
- Register name_reg,
- Label* miss) { }
-
static Builtins::Name MissBuiltin(Code::Kind kind) {
switch (kind) {
case Code::LOAD_IC: return Builtins::kLoadIC_Miss;
@@ -573,7 +549,7 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
}
protected:
- virtual Register HandlerFrontendHeader(Handle<Type> type,
+ virtual Register HandlerFrontendHeader(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Handle<Name> name,
@@ -581,7 +557,7 @@ class BaseLoadStoreStubCompiler: public StubCompiler {
virtual void HandlerFrontendFooter(Handle<Name> name, Label* miss) = 0;
- Register HandlerFrontend(Handle<Type> type,
+ Register HandlerFrontend(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Handle<Name> name);
@@ -640,32 +616,32 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
cache_holder) { }
virtual ~LoadStubCompiler() { }
- Handle<Code> CompileLoadField(Handle<Type> type,
+ Handle<Code> CompileLoadField(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name,
PropertyIndex index,
Representation representation);
- Handle<Code> CompileLoadCallback(Handle<Type> type,
+ Handle<Code> CompileLoadCallback(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name,
Handle<ExecutableAccessorInfo> callback);
- Handle<Code> CompileLoadCallback(Handle<Type> type,
+ Handle<Code> CompileLoadCallback(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name,
const CallOptimization& call_optimization);
- Handle<Code> CompileLoadConstant(Handle<Type> type,
+ Handle<Code> CompileLoadConstant(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name,
Handle<Object> value);
- Handle<Code> CompileLoadInterceptor(Handle<Type> type,
+ Handle<Code> CompileLoadInterceptor(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name);
- Handle<Code> CompileLoadViaGetter(Handle<Type> type,
+ Handle<Code> CompileLoadViaGetter(Handle<HeapType> type,
Handle<JSObject> holder,
Handle<Name> name,
Handle<JSFunction> getter);
@@ -674,11 +650,11 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
Register receiver,
Handle<JSFunction> getter);
- Handle<Code> CompileLoadNonexistent(Handle<Type> type,
+ Handle<Code> CompileLoadNonexistent(Handle<HeapType> type,
Handle<JSObject> last,
Handle<Name> name);
- Handle<Code> CompileLoadGlobal(Handle<Type> type,
+ Handle<Code> CompileLoadGlobal(Handle<HeapType> type,
Handle<GlobalObject> holder,
Handle<PropertyCell> cell,
Handle<Name> name,
@@ -687,7 +663,11 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
static Register* registers();
protected:
- virtual Register HandlerFrontendHeader(Handle<Type> type,
+ ContextualMode contextual_mode() {
+ return LoadIC::GetContextualMode(extra_state());
+ }
+
+ virtual Register HandlerFrontendHeader(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Handle<Name> name,
@@ -695,12 +675,12 @@ class LoadStubCompiler: public BaseLoadStoreStubCompiler {
virtual void HandlerFrontendFooter(Handle<Name> name, Label* miss);
- Register CallbackHandlerFrontend(Handle<Type> type,
+ Register CallbackHandlerFrontend(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Handle<Name> name,
Handle<Object> callback);
- void NonexistentHandlerFrontend(Handle<Type> type,
+ void NonexistentHandlerFrontend(Handle<HeapType> type,
Handle<JSObject> last,
Handle<Name> name);
@@ -746,13 +726,8 @@ class KeyedLoadStubCompiler: public LoadStubCompiler {
static void GenerateLoadDictionaryElement(MacroAssembler* masm);
- protected:
- static Register* registers();
-
private:
- virtual void GenerateNameCheck(Handle<Name> name,
- Register name_reg,
- Label* miss);
+ static Register* registers();
friend class BaseLoadStoreStubCompiler;
};
@@ -836,7 +811,7 @@ class StoreStubCompiler: public BaseLoadStoreStubCompiler {
}
protected:
- virtual Register HandlerFrontendHeader(Handle<Type> type,
+ virtual Register HandlerFrontendHeader(Handle<HeapType> type,
Register object_reg,
Handle<JSObject> holder,
Handle<Name> name,
@@ -878,21 +853,17 @@ class KeyedStoreStubCompiler: public StoreStubCompiler {
static void GenerateStoreDictionaryElement(MacroAssembler* masm);
- protected:
+ private:
static Register* registers();
KeyedAccessStoreMode store_mode() {
return KeyedStoreIC::GetKeyedAccessStoreMode(extra_state());
}
- private:
Register transition_map() {
return registers()[3];
}
- virtual void GenerateNameCheck(Handle<Name> name,
- Register name_reg,
- Label* miss);
friend class BaseLoadStoreStubCompiler;
};
@@ -900,18 +871,7 @@ class KeyedStoreStubCompiler: public StoreStubCompiler {
// Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
// IC stubs.
#define CUSTOM_CALL_IC_GENERATORS(V) \
- V(ArrayPush) \
- V(ArrayPop) \
- V(StringCharCodeAt) \
- V(StringCharAt) \
- V(StringFromCharCode) \
- V(MathFloor) \
- V(MathAbs) \
- V(ArrayCode)
-
-
-#define SITE_SPECIFIC_CALL_GENERATORS(V) \
- V(ArrayCode)
+ V(ArrayPush)
class CallStubCompiler: public StubCompiler {
@@ -968,7 +928,6 @@ class CallStubCompiler: public StubCompiler {
Handle<Name> name);
static bool HasCustomCallGenerator(Handle<JSFunction> function);
- static bool CanBeCached(Handle<JSFunction> function);
private:
// Compiles a custom call constant/global IC. For constant calls cell is
@@ -1052,10 +1011,19 @@ class CallOptimization BASE_EMBEDDED {
return api_call_info_;
}
- // Returns the depth of the object having the expected type in the
- // prototype chain between the two arguments.
- int GetPrototypeDepthOfExpectedType(Handle<JSObject> object,
- Handle<JSObject> holder) const;
+ enum HolderLookup {
+ kHolderNotFound,
+ kHolderIsReceiver,
+ kHolderIsPrototypeOfMap
+ };
+ // Returns a map whose prototype has the expected type in the
+ // prototype chain between the two arguments
+ // null will be returned if the first argument has that property
+ // lookup will be set accordingly
+ Handle<Map> LookupHolderOfExpectedType(Handle<JSObject> receiver,
+ Handle<JSObject> object,
+ Handle<JSObject> holder,
+ HolderLookup* holder_lookup) const;
bool IsCompatibleReceiver(Object* receiver) {
ASSERT(is_simple_api_call());
« no previous file with comments | « src/string.js ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698