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/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
6 #include "src/compiler/node-properties-inl.h" | 6 #include "src/compiler/node-properties-inl.h" |
7 #include "src/compiler/typer.h" | 7 #include "src/compiler/typer.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 Node* JSGraph::Int32Constant(int32_t value) { | 151 Node* JSGraph::Int32Constant(int32_t value) { |
152 Node** loc = cache_.FindInt32Constant(value); | 152 Node** loc = cache_.FindInt32Constant(value); |
153 if (*loc == NULL) { | 153 if (*loc == NULL) { |
154 *loc = NewNode(common()->Int32Constant(value)); | 154 *loc = NewNode(common()->Int32Constant(value)); |
155 } | 155 } |
156 return *loc; | 156 return *loc; |
157 } | 157 } |
158 | 158 |
159 | 159 |
| 160 Node* JSGraph::Int64Constant(int64_t value) { |
| 161 Node** loc = cache_.FindInt64Constant(value); |
| 162 if (*loc == NULL) { |
| 163 *loc = NewNode(common()->Int64Constant(value)); |
| 164 } |
| 165 return *loc; |
| 166 } |
| 167 |
| 168 |
160 Node* JSGraph::NumberConstant(double value) { | 169 Node* JSGraph::NumberConstant(double value) { |
161 Node** loc = cache_.FindNumberConstant(value); | 170 Node** loc = cache_.FindNumberConstant(value); |
162 if (*loc == NULL) { | 171 if (*loc == NULL) { |
163 *loc = NewNode(common()->NumberConstant(value)); | 172 *loc = NewNode(common()->NumberConstant(value)); |
164 } | 173 } |
165 return *loc; | 174 return *loc; |
166 } | 175 } |
167 | 176 |
168 | 177 |
169 Node* JSGraph::Float32Constant(float value) { | 178 Node* JSGraph::Float32Constant(float value) { |
(...skipping 11 matching lines...) Expand all Loading... |
181 } | 190 } |
182 | 191 |
183 | 192 |
184 Node* JSGraph::ExternalConstant(ExternalReference reference) { | 193 Node* JSGraph::ExternalConstant(ExternalReference reference) { |
185 Node** loc = cache_.FindExternalConstant(reference); | 194 Node** loc = cache_.FindExternalConstant(reference); |
186 if (*loc == NULL) { | 195 if (*loc == NULL) { |
187 *loc = NewNode(common()->ExternalConstant(reference)); | 196 *loc = NewNode(common()->ExternalConstant(reference)); |
188 } | 197 } |
189 return *loc; | 198 return *loc; |
190 } | 199 } |
| 200 |
191 } // namespace compiler | 201 } // namespace compiler |
192 } // namespace internal | 202 } // namespace internal |
193 } // namespace v8 | 203 } // namespace v8 |
OLD | NEW |