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

Unified Diff: src/compiler/simplified-lowering.h

Issue 1901803002: [turbofan] Remove phase ordering problem in JSToNumber lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.h
diff --git a/src/compiler/simplified-lowering.h b/src/compiler/simplified-lowering.h
index efb4f22c9206e95be11f2716849af278f27921b3..baffe206ff6a9a34ef8bfa37aa1d8dd2f2354164 100644
--- a/src/compiler/simplified-lowering.h
+++ b/src/compiler/simplified-lowering.h
@@ -21,6 +21,7 @@ namespace compiler {
// Forward declarations.
class RepresentationChanger;
+class RepresentationSelector;
class SourcePositionTable;
class SimplifiedLowering final {
@@ -31,6 +32,10 @@ class SimplifiedLowering final {
void LowerAllNodes();
+ void DoJSToNumberTruncatesToFloat64(Node* node,
+ RepresentationSelector* selector);
+ void DoJSToNumberTruncatesToWord32(Node* node,
+ RepresentationSelector* selector);
// TODO(turbofan): The representation can be removed once the result of the
// representation analysis is stored in the node bounds.
void DoLoadBuffer(Node* node, MachineRepresentation rep,
@@ -42,6 +47,8 @@ class SimplifiedLowering final {
JSGraph* const jsgraph_;
Zone* const zone_;
TypeCache const& type_cache_;
+ SetOncePointer<Node> to_number_code_;
+ SetOncePointer<Operator const> to_number_operator_;
// TODO(danno): SimplifiedLowering shouldn't know anything about the source
// positions table, but must for now since there currently is no other way to
@@ -59,6 +66,9 @@ class SimplifiedLowering final {
Node* Uint32Div(Node* const node);
Node* Uint32Mod(Node* const node);
+ Node* ToNumberCode();
+ Operator const* ToNumberOperator();
+
friend class RepresentationSelector;
Isolate* isolate() { return jsgraph_->isolate(); }
@@ -67,6 +77,7 @@ class SimplifiedLowering final {
Graph* graph() { return jsgraph()->graph(); }
CommonOperatorBuilder* common() { return jsgraph()->common(); }
MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
+ SimplifiedOperatorBuilder* simplified() { return jsgraph()->simplified(); }
};
} // namespace compiler
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698