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

Unified Diff: src/stub-cache.cc

Issue 26968004: Turn Load/StoreGlobal into a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 9a30173b2e4e9f907f17bf384aa66067bee4c4f8..096ecea229f831664580172915e3b2d90eb5b3bf 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -202,22 +202,6 @@ Handle<Code> StubCache::ComputeLoadNonexistent(Handle<Name> name,
}
-Handle<Code> StubCache::ComputeLoadGlobal(Handle<Name> name,
- Handle<JSObject> receiver,
- Handle<GlobalObject> holder,
- Handle<PropertyCell> cell,
- bool is_dont_delete) {
- Handle<Code> stub = FindIC(name, receiver, Code::LOAD_IC);
- if (!stub.is_null()) return stub;
-
- LoadStubCompiler compiler(isolate_);
- Handle<Code> ic =
- compiler.CompileLoadGlobal(receiver, holder, cell, name, is_dont_delete);
- HeapObject::UpdateMapCodeCache(receiver, name, ic);
- return ic;
-}
-
-
Handle<Code> StubCache::ComputeKeyedLoadElement(Handle<Map> receiver_map) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC);
Handle<Name> name =
@@ -262,36 +246,6 @@ Handle<Code> StubCache::ComputeKeyedStoreElement(
}
-Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name,
- Handle<GlobalObject> receiver,
- Handle<PropertyCell> cell,
- Handle<Object> value,
- StrictModeFlag strict_mode) {
- Isolate* isolate = cell->GetIsolate();
- Handle<Type> union_type(PropertyCell::UpdateType(cell, value), isolate);
- bool is_constant = union_type->IsConstant();
- StoreGlobalStub stub(strict_mode, is_constant);
-
- Handle<Code> code = FindIC(
- name, Handle<JSObject>::cast(receiver),
- Code::STORE_IC, stub.GetExtraICState());
- if (!code.is_null()) return code;
-
- // Replace the placeholder cell and global object map with the actual global
- // cell and receiver map.
- Handle<Map> meta_map(isolate_->heap()->meta_map());
- Handle<Object> receiver_map(receiver->map(), isolate_);
- code = stub.GetCodeCopyFromTemplate(isolate_);
- code->ReplaceNthObject(1, *meta_map, *receiver_map);
- Handle<Map> cell_map(isolate_->heap()->global_property_cell_map());
- code->ReplaceNthObject(1, *cell_map, *cell);
-
- HeapObject::UpdateMapCodeCache(receiver, name, code);
-
- return code;
-}
-
-
#define CALL_LOGGER_TAG(kind, type) \
(kind == Code::CALL_IC ? Logger::type : Logger::KEYED_##type)
@@ -1563,7 +1517,6 @@ Handle<Code> BaseLoadStoreStubCompiler::GetICCode(Code::Kind kind,
Handle<Code> BaseLoadStoreStubCompiler::GetCode(Code::Kind kind,
Code::StubType type,
Handle<Name> name) {
- ASSERT(type != Code::NORMAL);
Code::Flags flags = Code::ComputeFlags(
Code::HANDLER, MONOMORPHIC, extra_state(), type, kind);
Handle<Code> code = GetCodeWithFlags(flags, name);
« 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