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

Unified Diff: src/hydrogen.cc

Issue 996133002: correctly invalidate global cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: weak cell check 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 156029cffb95b56a74edc110c24d049dfa4e3e1a..69d17facf8930a059d2edbd9e66c168d0e044a48 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 = handle(cell->value(), isolate());
Toon Verwaest 2015/03/17 11:04:23 Handle<Object> constant_object(cell->value(), isol
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 = handle(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