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

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

Issue 535133002: Remove usages of alloca() according to style guide. (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 | « no previous file | src/compiler/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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/control-builders.h" 8 #include "src/compiler/control-builders.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 } else if (ast_context()->IsEffect()) { 1645 } else if (ast_context()->IsEffect()) {
1646 environment()->Pop(); 1646 environment()->Pop();
1647 } 1647 }
1648 compare_if.End(); 1648 compare_if.End();
1649 ast_context()->ReplaceValue(); 1649 ast_context()->ReplaceValue();
1650 } 1650 }
1651 1651
1652 1652
1653 Node* AstGraphBuilder::ProcessArguments(Operator* op, int arity) { 1653 Node* AstGraphBuilder::ProcessArguments(Operator* op, int arity) {
1654 DCHECK(environment()->stack_height() >= arity); 1654 DCHECK(environment()->stack_height() >= arity);
1655 Node** all = info()->zone()->NewArray<Node*>(arity); // XXX: alloca? 1655 Node** all = info()->zone()->NewArray<Node*>(arity);
1656 for (int i = arity - 1; i >= 0; --i) { 1656 for (int i = arity - 1; i >= 0; --i) {
1657 all[i] = environment()->Pop(); 1657 all[i] = environment()->Pop();
1658 } 1658 }
1659 Node* value = NewNode(op, arity, all); 1659 Node* value = NewNode(op, arity, all);
1660 return value; 1660 return value;
1661 } 1661 }
1662 1662
1663 1663
1664 Node* AstGraphBuilder::BuildLocalFunctionContext(Node* context, Node* closure) { 1664 Node* AstGraphBuilder::BuildLocalFunctionContext(Node* context, Node* closure) {
1665 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 1665 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); 2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead);
2013 2013
2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); 2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine);
2015 node->ReplaceInput(frame_state_index, frame_state_node); 2015 node->ReplaceInput(frame_state_index, frame_state_node);
2016 } 2016 }
2017 } 2017 }
2018 2018
2019 } 2019 }
2020 } 2020 }
2021 } // namespace v8::internal::compiler 2021 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698