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

Unified Diff: src/stub-cache.cc

Issue 8383033: Handlify simple functions of [keyed] load stub compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 9 years, 2 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/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index e5c8482ec707bcb1fdb85a791c958ab737a3915a..e63e59ae4033f7112296c4c118c90d9ba6213397 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -109,16 +109,6 @@ Code* StubCache::Set(String* name, Map* map, Code* code) {
}
-Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<String> name,
- Handle<JSObject> object,
- Handle<JSObject> last) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadNonexistent(*name, *object, *last)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeLoadNonexistent(Handle<String> name,
Handle<JSObject> receiver) {
ASSERT(receiver->IsGlobalObject() || receiver->HasFastProperties());
@@ -152,17 +142,6 @@ Handle<Code> StubCache::ComputeLoadNonexistent(Handle<String> name,
}
-Handle<Code> LoadStubCompiler::CompileLoadField(Handle<JSObject> object,
- Handle<JSObject> holder,
- int index,
- Handle<String> name) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadField(*object, *holder, index, *name)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeLoadField(Handle<String> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
@@ -214,17 +193,6 @@ Handle<Code> StubCache::ComputeLoadCallback(Handle<String> name,
}
-Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Object> value,
- Handle<String> name) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadConstant(*object, *holder, *value, *name)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeLoadConstant(Handle<String> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
@@ -277,6 +245,7 @@ Handle<Code> StubCache::ComputeLoadNormal() {
return isolate_->builtins()->LoadIC_Normal();
}
+
Handle<Code> LoadStubCompiler::CompileLoadGlobal(
Handle<JSObject> object,
Handle<GlobalObject> holder,
@@ -289,6 +258,8 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal(
*object, *holder, *cell, *name, is_dont_delete)),
Code);
}
+
+
Handle<Code> StubCache::ComputeLoadGlobal(Handle<String> name,
Handle<JSObject> receiver,
Handle<GlobalObject> holder,
@@ -309,17 +280,6 @@ Handle<Code> StubCache::ComputeLoadGlobal(Handle<String> name,
}
-Handle<Code> KeyedLoadStubCompiler::CompileLoadField(Handle<String> name,
- Handle<JSObject> object,
- Handle<JSObject> holder,
- int index) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadField(*name, *object, *holder, index)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeKeyedLoadField(Handle<String> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
@@ -339,17 +299,6 @@ Handle<Code> StubCache::ComputeKeyedLoadField(Handle<String> name,
}
-Handle<Code> KeyedLoadStubCompiler::CompileLoadConstant(Handle<String> name,
- Handle<JSObject> object,
- Handle<JSObject> holder,
- Handle<Object> value) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadConstant(*name, *object, *holder, *value)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeKeyedLoadConstant(Handle<String> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
@@ -432,14 +381,6 @@ Handle<Code> StubCache::ComputeKeyedLoadCallback(
}
-Handle<Code> KeyedLoadStubCompiler::CompileLoadArrayLength(
- Handle<String> name) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadArrayLength(*name)),
- Code);
-}
-
Handle<Code> StubCache::ComputeKeyedLoadArrayLength(Handle<String> name,
Handle<JSArray> receiver) {
Code::Flags flags =
@@ -456,14 +397,6 @@ Handle<Code> StubCache::ComputeKeyedLoadArrayLength(Handle<String> name,
}
-Handle<Code> KeyedLoadStubCompiler::CompileLoadStringLength(
- Handle<String> name) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadStringLength(*name)),
- Code);
-}
-
Handle<Code> StubCache::ComputeKeyedLoadStringLength(Handle<String> name,
Handle<String> receiver) {
Code::Flags flags =
@@ -481,15 +414,6 @@ Handle<Code> StubCache::ComputeKeyedLoadStringLength(Handle<String> name,
}
-Handle<Code> KeyedLoadStubCompiler::CompileLoadFunctionPrototype(
- Handle<String> name) {
- CALL_HEAP_FUNCTION(isolate(),
- (set_failure(NULL),
- CompileLoadFunctionPrototype(*name)),
- Code);
-}
-
-
Handle<Code> StubCache::ComputeKeyedLoadFunctionPrototype(
Handle<String> name,
Handle<JSFunction> receiver) {
@@ -1672,8 +1596,18 @@ void StubCompiler::LookupPostInterceptor(JSObject* holder,
}
+Handle<Code> LoadStubCompiler::GetCode(PropertyType type, Handle<String> name) {
+ Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type);
+ Handle<Code> code = GetCodeWithFlags(flags, name);
+ PROFILE(isolate(), CodeCreateEvent(Logger::LOAD_IC_TAG, *code, *name));
+ GDBJIT(AddCode(GDBJITInterface::LOAD_IC, *name, *code));
+ return code;
+}
+
-MaybeObject* LoadStubCompiler::GetCode(PropertyType type, String* name) {
+// TODO(ulan): Eliminate this function when the stub cache is fully
+// handlified.
+MaybeObject* LoadStubCompiler::TryGetCode(PropertyType type, String* name) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type);
MaybeObject* result = TryGetCodeWithFlags(flags, name);
if (!result->IsFailure()) {
@@ -1689,7 +1623,20 @@ MaybeObject* LoadStubCompiler::GetCode(PropertyType type, String* name) {
}
-MaybeObject* KeyedLoadStubCompiler::GetCode(PropertyType type,
+Handle<Code> KeyedLoadStubCompiler::GetCode(PropertyType type,
+ Handle<String> name,
+ InlineCacheState state) {
+ Code::Flags flags = Code::ComputeFlags(
+ Code::KEYED_LOAD_IC, state, Code::kNoExtraICState, type);
+ Handle<Code> code = GetCodeWithFlags(flags, name);
+ PROFILE(isolate(), CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, *code, *name));
+ GDBJIT(AddCode(GDBJITInterface::LOAD_IC, *name, *code));
+ return code;
+}
+
+// TODO(ulan): Eliminate this function when the stub cache is fully
+// handlified.
+MaybeObject* KeyedLoadStubCompiler::TryGetCode(PropertyType type,
String* name,
InlineCacheState state) {
Code::Flags flags = Code::ComputeFlags(
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698