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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 579723004: Introduce simplified BooleanToNumber operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. 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/simplified-operator.h ('k') | src/compiler/typer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static bool Equals(const ElementAccess& lhs, const ElementAccess& rhs) { 58 static bool Equals(const ElementAccess& lhs, const ElementAccess& rhs) {
59 return lhs.base_is_tagged == rhs.base_is_tagged && 59 return lhs.base_is_tagged == rhs.base_is_tagged &&
60 lhs.header_size == rhs.header_size && 60 lhs.header_size == rhs.header_size &&
61 lhs.machine_type == rhs.machine_type && lhs.type->Is(rhs.type); 61 lhs.machine_type == rhs.machine_type && lhs.type->Is(rhs.type);
62 } 62 }
63 }; 63 };
64 64
65 65
66 #define PURE_OP_LIST(V) \ 66 #define PURE_OP_LIST(V) \
67 V(BooleanNot, Operator::kNoProperties, 1) \ 67 V(BooleanNot, Operator::kNoProperties, 1) \
68 V(BooleanToNumber, Operator::kNoProperties, 1) \
68 V(NumberEqual, Operator::kCommutative, 2) \ 69 V(NumberEqual, Operator::kCommutative, 2) \
69 V(NumberLessThan, Operator::kNoProperties, 2) \ 70 V(NumberLessThan, Operator::kNoProperties, 2) \
70 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \ 71 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \
71 V(NumberAdd, Operator::kCommutative, 2) \ 72 V(NumberAdd, Operator::kCommutative, 2) \
72 V(NumberSubtract, Operator::kNoProperties, 2) \ 73 V(NumberSubtract, Operator::kNoProperties, 2) \
73 V(NumberMultiply, Operator::kCommutative, 2) \ 74 V(NumberMultiply, Operator::kCommutative, 2) \
74 V(NumberDivide, Operator::kNoProperties, 2) \ 75 V(NumberDivide, Operator::kNoProperties, 2) \
75 V(NumberModulus, Operator::kNoProperties, 2) \ 76 V(NumberModulus, Operator::kNoProperties, 2) \
76 V(NumberToInt32, Operator::kNoProperties, 1) \ 77 V(NumberToInt32, Operator::kNoProperties, 1) \
77 V(NumberToUint32, Operator::kNoProperties, 1) \ 78 V(NumberToUint32, Operator::kNoProperties, 1) \
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return new (zone()) \ 137 return new (zone()) \
137 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 138 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
138 input_count, output_count, #Name, access); \ 139 input_count, output_count, #Name, access); \
139 } 140 }
140 ACCESS_OP_LIST(ACCESS) 141 ACCESS_OP_LIST(ACCESS)
141 #undef ACCESS 142 #undef ACCESS
142 143
143 } // namespace compiler 144 } // namespace compiler
144 } // namespace internal 145 } // namespace internal
145 } // namespace v8 146 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698