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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 2196653002: [turbofan] Introduce a dedicated CheckMaps simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_JSNativeContextSpecialization_NonElementKeyedAccess
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types.h" 10 #include "src/types.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 switch (mode) { 500 switch (mode) {
501 case CheckForMinusZeroMode::kCheckForMinusZero: 501 case CheckForMinusZeroMode::kCheckForMinusZero:
502 return &cache_.kCheckedInt32MulCheckForMinusZeroOperator; 502 return &cache_.kCheckedInt32MulCheckForMinusZeroOperator;
503 case CheckForMinusZeroMode::kDontCheckForMinusZero: 503 case CheckForMinusZeroMode::kDontCheckForMinusZero:
504 return &cache_.kCheckedInt32MulDontCheckForMinusZeroOperator; 504 return &cache_.kCheckedInt32MulDontCheckForMinusZeroOperator;
505 } 505 }
506 UNREACHABLE(); 506 UNREACHABLE();
507 return nullptr; 507 return nullptr;
508 } 508 }
509 509
510 const Operator* SimplifiedOperatorBuilder::CheckMaps(int map_input_count) {
511 // TODO(bmeurer): Cache the most important versions of this operator.
512 DCHECK_LT(0, map_input_count);
513 int const value_input_count = 1 + map_input_count;
514 return new (zone()) Operator1<int>( // --
515 IrOpcode::kCheckMaps, // opcode
516 Operator::kNoThrow | Operator::kNoWrite, // flags
517 "CheckMaps", // name
518 value_input_count, 1, 1, 0, 1, 0, // counts
519 map_input_count); // parameter
520 }
521
510 const Operator* SimplifiedOperatorBuilder::CheckFloat64Hole( 522 const Operator* SimplifiedOperatorBuilder::CheckFloat64Hole(
511 CheckFloat64HoleMode mode) { 523 CheckFloat64HoleMode mode) {
512 switch (mode) { 524 switch (mode) {
513 case CheckFloat64HoleMode::kAllowReturnHole: 525 case CheckFloat64HoleMode::kAllowReturnHole:
514 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator; 526 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator;
515 case CheckFloat64HoleMode::kNeverReturnHole: 527 case CheckFloat64HoleMode::kNeverReturnHole:
516 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator; 528 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator;
517 } 529 }
518 UNREACHABLE(); 530 UNREACHABLE();
519 return nullptr; 531 return nullptr;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 Operator::kNoDeopt | Operator::kNoThrow | properties, \ 644 Operator::kNoDeopt | Operator::kNoThrow | properties, \
633 #Name, value_input_count, 1, control_input_count, \ 645 #Name, value_input_count, 1, control_input_count, \
634 output_count, 1, 0, access); \ 646 output_count, 1, 0, access); \
635 } 647 }
636 ACCESS_OP_LIST(ACCESS) 648 ACCESS_OP_LIST(ACCESS)
637 #undef ACCESS 649 #undef ACCESS
638 650
639 } // namespace compiler 651 } // namespace compiler
640 } // namespace internal 652 } // namespace internal
641 } // namespace v8 653 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698