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

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

Issue 2509623002: [turbofan] Sparse representation for state values (Closed)
Patch Set: Renaming and changing refs to pointers Created 4 years 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/bytecode-graph-builder.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/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } else { 663 } else {
664 DCHECK(static_cast<size_t>(offset + count) <= values()->size()); 664 DCHECK(static_cast<size_t>(offset + count) <= values()->size());
665 for (int i = 0; i < count; i++) { 665 for (int i = 0; i < count; i++) {
666 if ((*state_values)->InputAt(i) != env_values[i]) { 666 if ((*state_values)->InputAt(i) != env_values[i]) {
667 should_update = true; 667 should_update = true;
668 break; 668 break;
669 } 669 }
670 } 670 }
671 } 671 }
672 if (should_update) { 672 if (should_update) {
673 const Operator* op = common()->StateValues(count); 673 const Operator* op = common()->StateValues(count, SparseInputMask::Dense());
674 (*state_values) = graph()->NewNode(op, count, env_values); 674 (*state_values) = graph()->NewNode(op, count, env_values);
675 } 675 }
676 } 676 }
677 677
678 678
679 Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id, 679 Node* AstGraphBuilder::Environment::Checkpoint(BailoutId ast_id,
680 OutputFrameStateCombine combine, 680 OutputFrameStateCombine combine,
681 bool owner_has_exception) { 681 bool owner_has_exception) {
682 if (!builder()->info()->is_deoptimization_enabled()) { 682 if (!builder()->info()->is_deoptimization_enabled()) {
683 return builder()->GetEmptyFrameState(); 683 return builder()->GetEmptyFrameState();
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, 3297 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment,
3298 SourcePositionTable* source_positions, int inlining_id) 3298 SourcePositionTable* source_positions, int inlining_id)
3299 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, 3299 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency,
3300 loop_assignment), 3300 loop_assignment),
3301 source_positions_(source_positions), 3301 source_positions_(source_positions),
3302 start_position_(info->shared_info()->start_position(), inlining_id) {} 3302 start_position_(info->shared_info()->start_position(), inlining_id) {}
3303 3303
3304 } // namespace compiler 3304 } // namespace compiler
3305 } // namespace internal 3305 } // namespace internal
3306 } // namespace v8 3306 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698