Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 4f685cf0f77411055c8cb5a72a7dcddcb155907a..32fc1abea3ea259d0289eec0782dc5cfc01faca6 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -274,40 +274,6 @@ RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) { |
} |
-RUNTIME_FUNCTION(Runtime_LoadGlobalViaContext) { |
- HandleScope scope(isolate); |
- DCHECK_EQ(1, args.length()); |
- CONVERT_SMI_ARG_CHECKED(slot, 0); |
- |
- // 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 the 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()); |
- } |
- |
- RETURN_RESULT_OR_FAILURE(isolate, Object::GetProperty(&it)); |
-} |
- |
- |
namespace { |
Object* StoreGlobalViaContext(Isolate* isolate, int slot, Handle<Object> value, |