OLD | NEW |
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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2183 // TODO(danno): RepresentationSelector shouldn't know anything about the | 2183 // TODO(danno): RepresentationSelector shouldn't know anything about the |
2184 // source positions table, but must for now since there currently is no other | 2184 // source positions table, but must for now since there currently is no other |
2185 // way to pass down source position information to nodes created during | 2185 // way to pass down source position information to nodes created during |
2186 // lowering. Once this phase becomes a vanilla reducer, it should get source | 2186 // lowering. Once this phase becomes a vanilla reducer, it should get source |
2187 // position information via the SourcePositionWrapper like all other reducers. | 2187 // position information via the SourcePositionWrapper like all other reducers. |
2188 SourcePositionTable* source_positions_; | 2188 SourcePositionTable* source_positions_; |
2189 TypeCache const& type_cache_; | 2189 TypeCache const& type_cache_; |
2190 OperationTyper op_typer_; // helper for the feedback typer | 2190 OperationTyper op_typer_; // helper for the feedback typer |
2191 | 2191 |
2192 NodeInfo* GetInfo(Node* node) { | 2192 NodeInfo* GetInfo(Node* node) { |
2193 DCHECK(node->id() >= 0); | |
2194 DCHECK(node->id() < count_); | 2193 DCHECK(node->id() < count_); |
2195 return &info_[node->id()]; | 2194 return &info_[node->id()]; |
2196 } | 2195 } |
2197 Zone* zone() { return zone_; } | 2196 Zone* zone() { return zone_; } |
2198 Zone* graph_zone() { return jsgraph_->zone(); } | 2197 Zone* graph_zone() { return jsgraph_->zone(); } |
2199 }; | 2198 }; |
2200 | 2199 |
2201 SimplifiedLowering::SimplifiedLowering(JSGraph* jsgraph, Zone* zone, | 2200 SimplifiedLowering::SimplifiedLowering(JSGraph* jsgraph, Zone* zone, |
2202 SourcePositionTable* source_positions, | 2201 SourcePositionTable* source_positions, |
2203 Flags flags) | 2202 Flags flags) |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3152 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3151 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3153 Operator::kNoProperties); | 3152 Operator::kNoProperties); |
3154 to_number_operator_.set(common()->Call(desc)); | 3153 to_number_operator_.set(common()->Call(desc)); |
3155 } | 3154 } |
3156 return to_number_operator_.get(); | 3155 return to_number_operator_.get(); |
3157 } | 3156 } |
3158 | 3157 |
3159 } // namespace compiler | 3158 } // namespace compiler |
3160 } // namespace internal | 3159 } // namespace internal |
3161 } // namespace v8 | 3160 } // namespace v8 |
OLD | NEW |