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

Unified Diff: src/objects.cc

Issue 705663004: harmony_scoping: Implement lexical bindings at top level (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased patch for landing Created 6 years, 1 month 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 258390c4d5cb2b62ff079e31d90de3e5595b6fcb..640d480dad7e438c1ab412bc09d091035f1bc28a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14677,6 +14677,25 @@ Handle<Object> ExternalFloat64Array::SetValue(
}
+void GlobalObject::InvalidatePropertyCell(Handle<GlobalObject> global,
+ Handle<Name> name) {
+ DCHECK(!global->HasFastProperties());
+ Isolate* isolate = global->GetIsolate();
+ int entry = global->property_dictionary()->FindEntry(name);
+ if (entry != NameDictionary::kNotFound) {
+ Handle<PropertyCell> cell(
+ PropertyCell::cast(global->property_dictionary()->ValueAt(entry)));
+
+ Handle<Object> value(cell->value(), isolate);
+ Handle<PropertyCell> new_cell = isolate->factory()->NewPropertyCell(value);
+ global->property_dictionary()->ValueAtPut(entry, *new_cell);
+
+ Handle<Object> hole = global->GetIsolate()->factory()->the_hole_value();
+ PropertyCell::SetValueInferType(cell, hole);
+ }
+}
+
+
Handle<PropertyCell> JSGlobalObject::EnsurePropertyCell(
Handle<JSGlobalObject> global,
Handle<Name> name) {
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698