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

Unified Diff: src/runtime/runtime-object.cc

Issue 2412613004: [stubs] Remove unused StoreGlobalViaContextStub. (Closed)
Patch Set: Created 4 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/runtime/runtime.h ('k') | src/s390/code-stubs-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index a4d0429b2f63933c4be63f7d61d8930f16630785..f315bf7d5a3253724cd82a97d09879b7f4e87ab1 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -277,64 +277,6 @@ RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) {
}
-namespace {
-
-Object* StoreGlobalViaContext(Isolate* isolate, int slot, Handle<Object> value,
- LanguageMode language_mode) {
- // Go up context chain to the script context.
- Handle<Context> script_context(isolate->context()->script_context(), isolate);
- DCHECK(script_context->IsScriptContext());
- DCHECK(script_context->get(slot)->IsPropertyCell());
-
- // Lookup the named property on the global object.
- Handle<ScopeInfo> scope_info(script_context->scope_info(), isolate);
- Handle<Name> name(scope_info->ContextSlotName(slot), isolate);
- Handle<JSGlobalObject> global_object(script_context->global_object(),
- isolate);
- LookupIterator it(global_object, name, global_object, LookupIterator::OWN);
-
- // Switch to fast mode only if there is a data property and it's not on
- // a hidden prototype.
- if (it.state() == LookupIterator::DATA &&
- it.GetHolder<Object>().is_identical_to(global_object)) {
- // Now update cell in the script context.
- Handle<PropertyCell> cell = it.GetPropertyCell();
- script_context->set(slot, *cell);
- } else {
- // This is not a fast case, so keep this access in a slow mode.
- // Store empty_property_cell here to release the outdated property cell.
- script_context->set(slot, isolate->heap()->empty_property_cell());
- }
-
- MAYBE_RETURN(Object::SetProperty(&it, value, language_mode,
- Object::CERTAINLY_NOT_STORE_FROM_KEYED),
- isolate->heap()->exception());
- return *value;
-}
-
-} // namespace
-
-
-RUNTIME_FUNCTION(Runtime_StoreGlobalViaContext_Sloppy) {
- HandleScope scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_SMI_ARG_CHECKED(slot, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
-
- return StoreGlobalViaContext(isolate, slot, value, SLOPPY);
-}
-
-
-RUNTIME_FUNCTION(Runtime_StoreGlobalViaContext_Strict) {
- HandleScope scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_SMI_ARG_CHECKED(slot, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
-
- return StoreGlobalViaContext(isolate, slot, value, STRICT);
-}
-
-
RUNTIME_FUNCTION(Runtime_GetProperty) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
« no previous file with comments | « src/runtime/runtime.h ('k') | src/s390/code-stubs-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698