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

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

Issue 598963002: Add support for Float32 representation changes. (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/js-graph.h ('k') | src/compiler/js-typed-lowering.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/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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 Node* JSGraph::NumberConstant(double value) { 159 Node* JSGraph::NumberConstant(double value) {
160 Node** loc = cache_.FindNumberConstant(value); 160 Node** loc = cache_.FindNumberConstant(value);
161 if (*loc == NULL) { 161 if (*loc == NULL) {
162 *loc = NewNode(common()->NumberConstant(value)); 162 *loc = NewNode(common()->NumberConstant(value));
163 } 163 }
164 return *loc; 164 return *loc;
165 } 165 }
166 166
167 167
168 Node* JSGraph::Float32Constant(float value) {
169 // TODO(turbofan): cache float32 constants.
170 return NewNode(common()->Float32Constant(value));
171 }
172
173
168 Node* JSGraph::Float64Constant(double value) { 174 Node* JSGraph::Float64Constant(double value) {
169 Node** loc = cache_.FindFloat64Constant(value); 175 Node** loc = cache_.FindFloat64Constant(value);
170 if (*loc == NULL) { 176 if (*loc == NULL) {
171 *loc = NewNode(common()->Float64Constant(value)); 177 *loc = NewNode(common()->Float64Constant(value));
172 } 178 }
173 return *loc; 179 return *loc;
174 } 180 }
175 181
176 182
177 Node* JSGraph::ExternalConstant(ExternalReference reference) { 183 Node* JSGraph::ExternalConstant(ExternalReference reference) {
178 Node** loc = cache_.FindExternalConstant(reference); 184 Node** loc = cache_.FindExternalConstant(reference);
179 if (*loc == NULL) { 185 if (*loc == NULL) {
180 *loc = NewNode(common()->ExternalConstant(reference)); 186 *loc = NewNode(common()->ExternalConstant(reference));
181 } 187 }
182 return *loc; 188 return *loc;
183 } 189 }
184 } // namespace compiler 190 } // namespace compiler
185 } // namespace internal 191 } // namespace internal
186 } // namespace v8 192 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698