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

Unified Diff: src/compiler/js-type-feedback.cc

Issue 1384953002: [turbofan] Move global constant optimization to AstGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/ast-graph-builder.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-type-feedback.cc
diff --git a/src/compiler/js-type-feedback.cc b/src/compiler/js-type-feedback.cc
index b1b4828fee1fe09d56cec7ad3c0b7a0ceb583d90..bae1572361a3b9a472ceb0cf486322f01683e074 100644
--- a/src/compiler/js-type-feedback.cc
+++ b/src/compiler/js-type-feedback.cc
@@ -191,16 +191,6 @@ Reduction JSTypeFeedbackSpecializer::ReduceJSLoadGlobal(Node* node) {
DCHECK(node->opcode() == IrOpcode::kJSLoadGlobal);
Handle<String> name =
Handle<String>::cast(LoadGlobalParametersOf(node->op()).name());
- // Try to optimize loads from the global object.
- Handle<Object> constant_value =
- jsgraph()->isolate()->factory()->GlobalConstantFor(name);
- if (!constant_value.is_null()) {
- // Always optimize global constants.
- Node* constant = jsgraph()->Constant(constant_value);
- ReplaceWithValue(node, constant);
- return Replace(constant);
- }
-
if (global_object_.is_null()) {
// Nothing else can be done if we don't have a global object.
return NoChange();
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698