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

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

Issue 1551363002: [Interpreter] StateValuesRequireUpdate handles cases when deoptimization is disabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | test/mjsunit/mjsunit.status » ('j') | test/mjsunit/mjsunit.status » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 namespace compiler { 14 namespace compiler {
15 15
16 // Helper for generating frame states for before and after a bytecode. 16 // Helper for generating frame states for before and after a bytecode.
17 class BytecodeGraphBuilder::FrameStateBeforeAndAfter { 17 class BytecodeGraphBuilder::FrameStateBeforeAndAfter {
18 public: 18 public:
19 FrameStateBeforeAndAfter(BytecodeGraphBuilder* builder, 19 FrameStateBeforeAndAfter(BytecodeGraphBuilder* builder,
20 const interpreter::BytecodeArrayIterator& iterator) 20 const interpreter::BytecodeArrayIterator& iterator)
21 : builder_(builder), id_after_(BailoutId::None()) { 21 : builder_(builder), id_after_(BailoutId::None()) {
22 BailoutId id_before(iterator.current_offset()); 22 BailoutId id_before(iterator.current_offset());
23 frame_state_before_ = builder_->environment()->Checkpoint( 23 frame_state_before_ = builder_->environment()->Checkpoint(
24 id_before, AccumulatorUpdateMode::kOutputIgnored); 24 id_before, AccumulatorUpdateMode::kOutputIgnored);
25 id_after_ = BailoutId(id_before.ToInt() + iterator.current_bytecode_size()); 25 id_after_ = BailoutId(id_before.ToInt() + iterator.current_bytecode_size());
26 } 26 }
27 27
28 ~FrameStateBeforeAndAfter() { 28 ~FrameStateBeforeAndAfter() {
29 DCHECK(builder_->environment()->StateValuesAreUpToDate( 29 DCHECK(!builder_->info()->is_deoptimization_enabled() ||
rmcilroy 2016/01/04 15:40:24 Could you move this up into StateValuesRequireUpda
mythria 2016/01/05 10:17:10 Done.
30 accumulator_update_mode_)); 30 builder_->environment()->StateValuesAreUpToDate(
31 accumulator_update_mode_));
31 } 32 }
32 33
33 private: 34 private:
34 friend class Environment; 35 friend class Environment;
35 36
36 void AddToNode(Node* node, AccumulatorUpdateMode update_mode) { 37 void AddToNode(Node* node, AccumulatorUpdateMode update_mode) {
37 int count = OperatorProperties::GetFrameStateInputCount(node->op()); 38 int count = OperatorProperties::GetFrameStateInputCount(node->op());
38 DCHECK_LE(count, 2); 39 DCHECK_LE(count, 2);
39 if (count >= 1) { 40 if (count >= 1) {
40 // Add the frame state for after the operation. 41 // Add the frame state for after the operation.
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 1854
1854 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1855 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1855 if (environment()->IsMarkedAsUnreachable()) return; 1856 if (environment()->IsMarkedAsUnreachable()) return;
1856 environment()->MarkAsUnreachable(); 1857 environment()->MarkAsUnreachable();
1857 exit_controls_.push_back(exit); 1858 exit_controls_.push_back(exit);
1858 } 1859 }
1859 1860
1860 } // namespace compiler 1861 } // namespace compiler
1861 } // namespace internal 1862 } // namespace internal
1862 } // namespace v8 1863 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | test/mjsunit/mjsunit.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698