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

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

Issue 2646763003: [turbofan] Optimize typeof o === "object" checks. (Closed)
Patch Set: Address comment. Created 3 years, 11 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 NodeProperties::ChangeOp(node, 2508 NodeProperties::ChangeOp(node,
2509 simplified()->PlainPrimitiveToFloat64()); 2509 simplified()->PlainPrimitiveToFloat64());
2510 } 2510 }
2511 } 2511 }
2512 } else { 2512 } else {
2513 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 2513 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
2514 } 2514 }
2515 return; 2515 return;
2516 } 2516 }
2517 case IrOpcode::kObjectIsCallable: { 2517 case IrOpcode::kObjectIsCallable: {
2518 // TODO(turbofan): Add Type::Callable to optimize this? 2518 VisitObjectIs(node, Type::Callable(), lowering);
2519 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit); 2519 return;
2520 }
2521 case IrOpcode::kObjectIsNonCallable: {
2522 VisitObjectIs(node, Type::NonCallable(), lowering);
2520 return; 2523 return;
2521 } 2524 }
2522 case IrOpcode::kObjectIsNumber: { 2525 case IrOpcode::kObjectIsNumber: {
2523 VisitObjectIs(node, Type::Number(), lowering); 2526 VisitObjectIs(node, Type::Number(), lowering);
2524 return; 2527 return;
2525 } 2528 }
2526 case IrOpcode::kObjectIsReceiver: { 2529 case IrOpcode::kObjectIsReceiver: {
2527 VisitObjectIs(node, Type::Receiver(), lowering); 2530 VisitObjectIs(node, Type::Receiver(), lowering);
2528 return; 2531 return;
2529 } 2532 }
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
3503 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3506 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3504 Operator::kNoProperties); 3507 Operator::kNoProperties);
3505 to_number_operator_.set(common()->Call(desc)); 3508 to_number_operator_.set(common()->Call(desc));
3506 } 3509 }
3507 return to_number_operator_.get(); 3510 return to_number_operator_.get();
3508 } 3511 }
3509 3512
3510 } // namespace compiler 3513 } // namespace compiler
3511 } // namespace internal 3514 } // namespace internal
3512 } // namespace v8 3515 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698