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

Unified Diff: src/compiler/escape-analysis.cc

Issue 1997353002: [turbofan] Skip data-flow analysis of code entry field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 7 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/compiler/escape-analysis.h ('k') | test/mjsunit/regress/regress-crbug-613494.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis.cc
diff --git a/src/compiler/escape-analysis.cc b/src/compiler/escape-analysis.cc
index 540699701224a72022f4d15bafd4a241d2a373d7..b8a9188701fcb4bf832795d760a0a4be968e41a3 100644
--- a/src/compiler/escape-analysis.cc
+++ b/src/compiler/escape-analysis.cc
@@ -849,6 +849,7 @@ void EscapeStatusAnalysis::DebugPrint() {
EscapeAnalysis::EscapeAnalysis(Graph* graph, CommonOperatorBuilder* common,
Zone* zone)
: zone_(zone),
+ slot_not_analyzed_(graph->NewNode(common->NumberConstant(0x1c0debad))),
common_(common),
status_analysis_(new (zone) EscapeStatusAnalysis(this, graph, zone)),
virtual_states_(zone),
@@ -1460,6 +1461,15 @@ void EscapeAnalysis::ProcessStoreField(Node* node) {
if (obj && obj->IsTracked() &&
static_cast<size_t>(offset) < obj->field_count()) {
Node* val = ResolveReplacement(NodeProperties::GetValueInput(node, 1));
+ // TODO(mstarzinger): The following is a workaround to not track the code
+ // entry field in virtual JSFunction objects. We only ever store the inner
+ // pointer into the compile lazy stub in this field and the deoptimizer has
+ // this assumption hard-coded in {TranslatedState::MaterializeAt} as well.
+ if (val->opcode() == IrOpcode::kInt32Constant ||
+ val->opcode() == IrOpcode::kInt64Constant) {
+ DCHECK_EQ(JSFunction::kCodeEntryOffset, FieldAccessOf(node->op()).offset);
+ val = slot_not_analyzed_;
+ }
if (obj->GetField(offset) != val) {
obj = CopyForModificationAt(obj, state, node);
obj->SetField(offset, val);
« no previous file with comments | « src/compiler/escape-analysis.h ('k') | test/mjsunit/regress/regress-crbug-613494.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698