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

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

Issue 2219223002: Remove more vestigial CONST_LEGACY support and clean up var declaration code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 8fb06caaff2f771b6a139aab2fbaf9f709a00262..26bfb29d9366b56ae1eefc4321dd065c3f10c78c 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -209,42 +209,6 @@ RUNTIME_FUNCTION(Runtime_InitializeVarGlobal) {
isolate, Object::SetProperty(global, name, value, language_mode));
}
-
-RUNTIME_FUNCTION(Runtime_InitializeConstGlobal) {
- HandleScope handle_scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
-
- Handle<JSGlobalObject> global(isolate->global_object());
-
- // Lookup the property as own on the global object.
- LookupIterator it(global, name, global, LookupIterator::OWN_SKIP_INTERCEPTOR);
- Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(&it);
- DCHECK(maybe.IsJust());
- PropertyAttributes old_attributes = maybe.FromJust();
-
- PropertyAttributes attr =
- static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
- // Set the value if the property is either missing, or the property attributes
- // allow setting the value without invoking an accessor.
- if (it.IsFound()) {
- // Ignore if we can't reconfigure the value.
- if ((old_attributes & DONT_DELETE) != 0) {
- if ((old_attributes & READ_ONLY) != 0 ||
- it.state() == LookupIterator::ACCESSOR) {
- return *value;
- }
- attr = static_cast<PropertyAttributes>(old_attributes | READ_ONLY);
- }
- }
-
- RETURN_FAILURE_ON_EXCEPTION(
- isolate, JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, attr));
-
- return *value;
-}
-
namespace {
Object* DeclareEvalHelper(Isolate* isolate, Handle<String> name,
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698