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

Side by Side Diff: src/compiler/js-call-reducer.cc

Issue 2812233002: [turbofan] Use unreliable LOAD_IC feedback for Array.prototype.push. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/js-inlining.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-call-reducer.h" 5 #include "src/compiler/js-call-reducer.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 329
330 // ES6 section B.2.2.1.1 get Object.prototype.__proto__ 330 // ES6 section B.2.2.1.1 get Object.prototype.__proto__
331 Reduction JSCallReducer::ReduceObjectPrototypeGetProto(Node* node) { 331 Reduction JSCallReducer::ReduceObjectPrototypeGetProto(Node* node) {
332 DCHECK_EQ(IrOpcode::kJSCall, node->opcode()); 332 DCHECK_EQ(IrOpcode::kJSCall, node->opcode());
333 Node* receiver = NodeProperties::GetValueInput(node, 1); 333 Node* receiver = NodeProperties::GetValueInput(node, 1);
334 Node* effect = NodeProperties::GetEffectInput(node); 334 Node* effect = NodeProperties::GetEffectInput(node);
335 335
336 // Try to determine the {receiver} map. 336 // Try to determine the {receiver} map.
337 ZoneHandleSet<Map> receiver_maps; 337 ZoneHandleSet<Map> receiver_maps;
338 if (NodeProperties::InferReceiverMaps(receiver, effect, &receiver_maps)) { 338 NodeProperties::InferReceiverMapsResult result =
339 NodeProperties::InferReceiverMaps(receiver, effect, &receiver_maps);
340 if (result == NodeProperties::kReliableReceiverMaps) {
339 Handle<Map> candidate_map( 341 Handle<Map> candidate_map(
340 receiver_maps[0]->GetPrototypeChainRootMap(isolate())); 342 receiver_maps[0]->GetPrototypeChainRootMap(isolate()));
341 Handle<Object> candidate_prototype(candidate_map->prototype(), isolate()); 343 Handle<Object> candidate_prototype(candidate_map->prototype(), isolate());
342 344
343 // Check if we can constant-fold the {candidate_prototype}. 345 // Check if we can constant-fold the {candidate_prototype}.
344 for (size_t i = 0; i < receiver_maps.size(); ++i) { 346 for (size_t i = 0; i < receiver_maps.size(); ++i) {
345 Handle<Map> const receiver_map( 347 Handle<Map> const receiver_map(
346 receiver_maps[i]->GetPrototypeChainRootMap(isolate())); 348 receiver_maps[i]->GetPrototypeChainRootMap(isolate()));
347 if (receiver_map->IsJSProxyMap() || 349 if (receiver_map->IsJSProxyMap() ||
348 receiver_map->has_hidden_prototype() || 350 receiver_map->has_hidden_prototype() ||
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 return jsgraph()->javascript(); 867 return jsgraph()->javascript();
866 } 868 }
867 869
868 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { 870 SimplifiedOperatorBuilder* JSCallReducer::simplified() const {
869 return jsgraph()->simplified(); 871 return jsgraph()->simplified();
870 } 872 }
871 873
872 } // namespace compiler 874 } // namespace compiler
873 } // namespace internal 875 } // namespace internal
874 } // namespace v8 876 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698