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

Side by Side Diff: src/code-stubs-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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/hydrogen.h" 10 #include "src/hydrogen.h"
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 IfBuilder map_check(this); 1332 IfBuilder map_check(this);
1333 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map); 1333 map_check.IfNot<HCompareObjectEqAndBranch>(expected_map, map);
1334 map_check.ThenDeopt(Deoptimizer::kUnknownMap); 1334 map_check.ThenDeopt(Deoptimizer::kUnknownMap);
1335 map_check.End(); 1335 map_check.End();
1336 } 1336 }
1337 1337
1338 HValue* weak_cell = Add<HConstant>(isolate()->factory()->NewWeakCell( 1338 HValue* weak_cell = Add<HConstant>(isolate()->factory()->NewWeakCell(
1339 StoreGlobalStub::property_cell_placeholder(isolate()))); 1339 StoreGlobalStub::property_cell_placeholder(isolate())));
1340 HValue* cell = Add<HLoadNamedField>(weak_cell, nullptr, 1340 HValue* cell = Add<HLoadNamedField>(weak_cell, nullptr,
1341 HObjectAccess::ForWeakCellValue()); 1341 HObjectAccess::ForWeakCellValue());
1342 Add<HCheckHeapObject>(cell);
1342 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); 1343 HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
1343 HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access); 1344 HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access);
1344 1345
1345 if (stub->is_constant()) { 1346 if (stub->is_constant()) {
1346 IfBuilder builder(this); 1347 IfBuilder builder(this);
1347 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); 1348 builder.If<HCompareObjectEqAndBranch>(cell_contents, value);
1348 builder.Then(); 1349 builder.Then();
1349 builder.ElseDeopt( 1350 builder.ElseDeopt(
1350 Deoptimizer::kUnexpectedCellContentsInConstantGlobalStore); 1351 Deoptimizer::kUnexpectedCellContentsInConstantGlobalStore);
1351 builder.End(); 1352 builder.End();
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 // megamorphic case is handled as part of the default stub. 2029 // megamorphic case is handled as part of the default stub.
2029 DCHECK(!FLAG_vector_ics); 2030 DCHECK(!FLAG_vector_ics);
2030 2031
2031 // Probe the stub cache. 2032 // Probe the stub cache.
2032 Add<HTailCallThroughMegamorphicCache>(receiver, name); 2033 Add<HTailCallThroughMegamorphicCache>(receiver, name);
2033 2034
2034 // We never continue. 2035 // We never continue.
2035 return graph()->GetConstant0(); 2036 return graph()->GetConstant0();
2036 } 2037 }
2037 } } // namespace v8::internal 2038 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698