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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 2080113002: [turbofan] Introduce CheckUnless. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/effect-control-linearizer.cc ('k') | src/compiler/opcodes.h » ('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-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 Node* check = 566 Node* check =
567 graph()->NewNode(simplified()->ReferenceEqual(Type::Any()), 567 graph()->NewNode(simplified()->ReferenceEqual(Type::Any()),
568 receiver_map, jsgraph()->Constant(map)); 568 receiver_map, jsgraph()->Constant(map));
569 if (--num_classes == 0 && num_transitions == 0 && 569 if (--num_classes == 0 && num_transitions == 0 &&
570 j == access_infos.size() - 1) { 570 j == access_infos.size() - 1) {
571 // Last map check on the fallthrough control path, do a conditional 571 // Last map check on the fallthrough control path, do a conditional
572 // eager deoptimization exit here. 572 // eager deoptimization exit here.
573 // TODO(turbofan): This is ugly as hell! We should probably introduce 573 // TODO(turbofan): This is ugly as hell! We should probably introduce
574 // macro-ish operators for property access that encapsulate this whole 574 // macro-ish operators for property access that encapsulate this whole
575 // mess. 575 // mess.
576 Node* deoptimize = 576 Node* deoptimize = graph()->NewNode(
577 graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state, 577 simplified()->CheckUnless(), check, effect, fallthrough_control);
578 effect, fallthrough_control); 578 this_controls.push_back(fallthrough_control);
579 this_controls.push_back(deoptimize);
580 this_effects.push_back(deoptimize); 579 this_effects.push_back(deoptimize);
581 fallthrough_control = nullptr; 580 fallthrough_control = nullptr;
582 } else { 581 } else {
583 Node* branch = 582 Node* branch =
584 graph()->NewNode(common()->Branch(), check, fallthrough_control); 583 graph()->NewNode(common()->Branch(), check, fallthrough_control);
585 this_controls.push_back(graph()->NewNode(common()->IfTrue(), branch)); 584 this_controls.push_back(graph()->NewNode(common()->IfTrue(), branch));
586 this_effects.push_back(effect); 585 this_effects.push_back(effect);
587 fallthrough_control = graph()->NewNode(common()->IfFalse(), branch); 586 fallthrough_control = graph()->NewNode(common()->IfFalse(), branch);
588 } 587 }
589 if (!map->IsJSArrayMap()) receiver_is_jsarray = false; 588 if (!map->IsJSArrayMap()) receiver_is_jsarray = false;
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } 1090 }
1092 1091
1093 1092
1094 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1093 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1095 return jsgraph()->simplified(); 1094 return jsgraph()->simplified();
1096 } 1095 }
1097 1096
1098 } // namespace compiler 1097 } // namespace compiler
1099 } // namespace internal 1098 } // namespace internal
1100 } // namespace v8 1099 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698