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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 1086303002: [turbofan] Typed lowering requires typed nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 906df7933246bd467ea8dea34e6f2a50afe32e59..1c7a8dce22ca6702c64f71831bb4743499c2d351 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -747,14 +747,10 @@ Reduction JSTypedLowering::ReduceJSToString(Node* node) {
}
-static bool IsGlobalObject(Node* node) {
- return NodeProperties::IsTyped(node) &&
- NodeProperties::GetBounds(node).upper->Is(Type::GlobalObject());
-}
-
-
Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) {
- if (IsGlobalObject(node->InputAt(0))) {
+ Node* object = NodeProperties::GetValueInput(node, 0);
+ Type* object_type = NodeProperties::GetBounds(object).upper;
+ if (object_type->Is(Type::GlobalObject())) {
// Optimize global constants like "undefined", "Infinity", and "NaN".
Handle<Name> name = LoadNamedParametersOf(node->op()).name().handle();
Handle<Object> constant_value = factory()->GlobalConstantFor(name);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698