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

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

Issue 528963002: Revert "Make FrameStates recursive (to be used for inlining)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/graph-builder.h" 5 #include "src/compiler/graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/generic-graph.h" 8 #include "src/compiler/generic-graph.h"
9 #include "src/compiler/generic-node.h" 9 #include "src/compiler/generic-node.h"
10 #include "src/compiler/generic-node-inl.h" 10 #include "src/compiler/generic-node-inl.h"
(...skipping 23 matching lines...) Expand all
34 34
35 bool has_context = OperatorProperties::HasContextInput(op); 35 bool has_context = OperatorProperties::HasContextInput(op);
36 bool has_framestate = OperatorProperties::HasFrameStateInput(op); 36 bool has_framestate = OperatorProperties::HasFrameStateInput(op);
37 bool has_control = OperatorProperties::GetControlInputCount(op) == 1; 37 bool has_control = OperatorProperties::GetControlInputCount(op) == 1;
38 bool has_effect = OperatorProperties::GetEffectInputCount(op) == 1; 38 bool has_effect = OperatorProperties::GetEffectInputCount(op) == 1;
39 39
40 DCHECK(OperatorProperties::GetControlInputCount(op) < 2); 40 DCHECK(OperatorProperties::GetControlInputCount(op) < 2);
41 DCHECK(OperatorProperties::GetEffectInputCount(op) < 2); 41 DCHECK(OperatorProperties::GetEffectInputCount(op) < 2);
42 42
43 Node* result = NULL; 43 Node* result = NULL;
44 if (!has_context && !has_framestate && !has_control && !has_effect) { 44 if (!has_context && !has_control && !has_effect) {
45 result = graph()->NewNode(op, value_input_count, value_inputs); 45 result = graph()->NewNode(op, value_input_count, value_inputs);
46 } else { 46 } else {
47 int input_count_with_deps = value_input_count; 47 int input_count_with_deps = value_input_count;
48 if (has_context) ++input_count_with_deps; 48 if (has_context) ++input_count_with_deps;
49 if (has_framestate) ++input_count_with_deps; 49 if (has_framestate) ++input_count_with_deps;
50 if (has_control) ++input_count_with_deps; 50 if (has_control) ++input_count_with_deps;
51 if (has_effect) ++input_count_with_deps; 51 if (has_effect) ++input_count_with_deps;
52 void* raw_buffer = alloca(kPointerSize * input_count_with_deps); 52 void* raw_buffer = alloca(kPointerSize * input_count_with_deps);
53 Node** buffer = reinterpret_cast<Node**>(raw_buffer); 53 Node** buffer = reinterpret_cast<Node**>(raw_buffer);
54 memcpy(buffer, value_inputs, kPointerSize * value_input_count); 54 memcpy(buffer, value_inputs, kPointerSize * value_input_count);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (!dead_control_.is_set()) { 242 if (!dead_control_.is_set()) {
243 Node* dead_node = graph()->NewNode(common_->Dead()); 243 Node* dead_node = graph()->NewNode(common_->Dead());
244 dead_control_.set(dead_node); 244 dead_control_.set(dead_node);
245 return dead_node; 245 return dead_node;
246 } 246 }
247 return dead_control_.get(); 247 return dead_control_.get();
248 } 248 }
249 } 249 }
250 } 250 }
251 } // namespace v8::internal::compiler 251 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698