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

Side by Side Diff: src/compiler/machine-operator-reducer-unittest.cc

Issue 559413002: [turbofan] Mark operator constructors as const in MachineOperatorBuilder. (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/machine-operator.cc ('k') | src/compiler/machine-operator-unittest.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/base/bits.h" 5 #include "src/base/bits.h"
6 #include "src/compiler/graph-unittest.h" 6 #include "src/compiler/graph-unittest.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/machine-operator-reducer.h" 8 #include "src/compiler/machine-operator-reducer.h"
9 #include "src/compiler/typer.h" 9 #include "src/compiler/typer.h"
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } // namespace 157 } // namespace
158 158
159 159
160 // ----------------------------------------------------------------------------- 160 // -----------------------------------------------------------------------------
161 // Unary operators 161 // Unary operators
162 162
163 163
164 namespace { 164 namespace {
165 165
166 struct UnaryOperator { 166 struct UnaryOperator {
167 const Operator* (MachineOperatorBuilder::*constructor)(); 167 const Operator* (MachineOperatorBuilder::*constructor)() const;
168 const char* constructor_name; 168 const char* constructor_name;
169 }; 169 };
170 170
171 171
172 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) { 172 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) {
173 return os << unop.constructor_name; 173 return os << unop.constructor_name;
174 } 174 }
175 175
176 176
177 static const UnaryOperator kUnaryOperators[] = { 177 static const UnaryOperator kUnaryOperators[] = {
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 r = Reduce(graph()->NewNode(common()->Projection(0), add)); 530 r = Reduce(graph()->NewNode(common()->Projection(0), add));
531 ASSERT_TRUE(r.Changed()); 531 ASSERT_TRUE(r.Changed());
532 EXPECT_THAT(r.replacement(), IsInt32Constant(z)); 532 EXPECT_THAT(r.replacement(), IsInt32Constant(z));
533 } 533 }
534 } 534 }
535 } 535 }
536 536
537 } // namespace compiler 537 } // namespace compiler
538 } // namespace internal 538 } // namespace internal
539 } // namespace v8 539 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/machine-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698