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

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

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 4 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/graph.h ('k') | src/compiler/graph-builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/compiler/graph.h"
6
7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/graph-inl.h"
10 #include "src/compiler/node.h"
11 #include "src/compiler/node-aux-data-inl.h"
12 #include "src/compiler/node-properties.h"
13 #include "src/compiler/node-properties-inl.h"
14 #include "src/compiler/operator-properties.h"
15 #include "src/compiler/operator-properties-inl.h"
16
17 namespace v8 {
18 namespace internal {
19 namespace compiler {
20
21 Graph::Graph(Zone* zone)
22 : GenericGraph(zone), decorators_(DecoratorVector::allocator_type(zone)) {}
23
24
25 Node* Graph::NewNode(Operator* op, int input_count, Node** inputs) {
26 ASSERT(op->InputCount() <= input_count);
27 Node* result = Node::New(this, input_count, inputs);
28 result->Initialize(op);
29 for (DecoratorVector::iterator i = decorators_.begin();
30 i != decorators_.end(); ++i) {
31 (*i)->Decorate(result);
32 }
33 return result;
34 }
35
36
37 void Graph::ChangeOperator(Node* node, Operator* op) { node->set_op(op); }
38
39
40 void Graph::DeleteNode(Node* node) {
41 #if DEBUG
42 // Nodes can't be deleted if they have uses.
43 Node::Uses::iterator use_iterator(node->uses().begin());
44 ASSERT(use_iterator == node->uses().end());
45 #endif
46
47 #if DEBUG
48 memset(node, 0xDE, sizeof(Node));
49 #endif
50 }
51 }
52 }
53 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698