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

Unified Diff: src/hydrogen.cc

Issue 996133002: correctly invalidate global cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 years, 9 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/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 7a4322139d68405f408cccd558836f0ec3d5c0dc..fba3c66dac1a447bd32c31b508b791a3be125ee4 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5348,9 +5348,9 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
if (type == kUseCell) {
Handle<PropertyCell> cell = it.GetPropertyCell();
- if (cell->type()->IsConstant()) {
- PropertyCell::AddDependentCompilationInfo(cell, top_info());
- Handle<Object> constant_object = cell->type()->AsConstant()->Value();
+ PropertyCell::AddDependentCompilationInfo(cell, top_info());
+ if (it.property_details().cell_type() == PropertyCellType::kConstant) {
+ Handle<Object> constant_object(cell->value(), isolate());
if (constant_object->IsConsString()) {
constant_object =
String::Flatten(Handle<String>::cast(constant_object));
@@ -6514,8 +6514,9 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment(
GlobalPropertyAccess type = LookupGlobalProperty(var, &it, STORE);
if (type == kUseCell) {
Handle<PropertyCell> cell = it.GetPropertyCell();
- if (cell->type()->IsConstant()) {
- Handle<Object> constant = cell->type()->AsConstant()->Value();
+ PropertyCell::AddDependentCompilationInfo(cell, top_info());
+ if (it.property_details().cell_type() == PropertyCellType::kConstant) {
+ Handle<Object> constant(cell->value(), isolate());
if (value->IsConstant()) {
HConstant* c_value = HConstant::cast(value);
if (!constant.is_identical_to(c_value->handle(isolate()))) {
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698