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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 2034673002: [turbofan] Remove eager frame state from property access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-checkpoint-3
Patch Set: Rebased. Created 4 years, 6 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 | « no previous file | src/compiler/js-global-object-specialization.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 412
413 // Helper for generating before and after frame states. 413 // Helper for generating before and after frame states.
414 class AstGraphBuilder::FrameStateBeforeAndAfter { 414 class AstGraphBuilder::FrameStateBeforeAndAfter {
415 public: 415 public:
416 FrameStateBeforeAndAfter(AstGraphBuilder* builder, BailoutId id_before) 416 FrameStateBeforeAndAfter(AstGraphBuilder* builder, BailoutId id_before)
417 : builder_(builder), frame_state_before_(nullptr) { 417 : builder_(builder), frame_state_before_(nullptr) {
418 frame_state_before_ = id_before == BailoutId::None() 418 frame_state_before_ = id_before == BailoutId::None()
419 ? builder_->GetEmptyFrameState() 419 ? builder_->GetEmptyFrameState()
420 : builder_->environment()->Checkpoint(id_before); 420 : builder_->environment()->Checkpoint(id_before);
421 // Create an explicit checkpoint node for before the operation. 421 if (id_before != BailoutId::None()) {
422 Node* node = builder_->NewNode(builder_->common()->Checkpoint()); 422 // Create an explicit checkpoint node for before the operation.
423 DCHECK_EQ(IrOpcode::kDead, 423 Node* node = builder_->NewNode(builder_->common()->Checkpoint());
424 NodeProperties::GetFrameStateInput(node, 0)->opcode()); 424 DCHECK_EQ(IrOpcode::kDead,
425 NodeProperties::ReplaceFrameStateInput(node, 0, frame_state_before_); 425 NodeProperties::GetFrameStateInput(node, 0)->opcode());
426 NodeProperties::ReplaceFrameStateInput(node, 0, frame_state_before_);
427 }
426 } 428 }
427 429
428 void AddToNode( 430 void AddToNode(
429 Node* node, BailoutId id_after, 431 Node* node, BailoutId id_after,
430 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()) { 432 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()) {
431 int count = OperatorProperties::GetFrameStateInputCount(node->op()); 433 int count = OperatorProperties::GetFrameStateInputCount(node->op());
432 DCHECK_LE(count, 2); 434 DCHECK_LE(count, 2);
433 435
434 if (count >= 1) { 436 if (count >= 1) {
435 // Add the frame state for after the operation. 437 // Add the frame state for after the operation.
(...skipping 3937 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 // Phi does not exist yet, introduce one. 4375 // Phi does not exist yet, introduce one.
4374 value = NewPhi(inputs, value, control); 4376 value = NewPhi(inputs, value, control);
4375 value->ReplaceInput(inputs - 1, other); 4377 value->ReplaceInput(inputs - 1, other);
4376 } 4378 }
4377 return value; 4379 return value;
4378 } 4380 }
4379 4381
4380 } // namespace compiler 4382 } // namespace compiler
4381 } // namespace internal 4383 } // namespace internal
4382 } // namespace v8 4384 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-global-object-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698