Index: src/ast/ast-numbering.cc |
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc |
index 1c2ce3ccfd151f271889563430d5f53975f63d8a..100814691f8cb1a3428aab1fcc5b0a9d7756c7de 100644 |
--- a/src/ast/ast-numbering.cc |
+++ b/src/ast/ast-numbering.cc |
@@ -19,9 +19,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> { |
yield_count_(0), |
properties_(zone), |
slot_cache_(zone), |
- slot_cache_inside_typeof_(zone), |
dont_optimize_reason_(kNoReason), |
- typeof_mode_(NOT_INSIDE_TYPEOF), |
catch_prediction_(HandlerTable::UNCAUGHT) { |
InitializeAstVisitor(isolate); |
} |
@@ -64,9 +62,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> { |
template <typename Node> |
void ReserveFeedbackSlots(Node* node) { |
node->AssignFeedbackVectorSlots(isolate_, properties_.get_spec(), |
- typeof_mode_ == INSIDE_TYPEOF |
- ? &slot_cache_inside_typeof_ |
- : &slot_cache_); |
+ &slot_cache_); |
} |
BailoutReason dont_optimize_reason() const { return dont_optimize_reason_; } |
@@ -78,9 +74,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> { |
AstProperties properties_; |
// The slot cache allows us to reuse certain feedback vector slots. |
FeedbackVectorSlotCache slot_cache_; |
- FeedbackVectorSlotCache slot_cache_inside_typeof_; |
BailoutReason dont_optimize_reason_; |
- TypeofMode typeof_mode_; |
HandlerTable::CatchPrediction catch_prediction_; |
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
@@ -222,13 +216,9 @@ void AstNumberingVisitor::VisitThrow(Throw* node) { |
void AstNumberingVisitor::VisitUnaryOperation(UnaryOperation* node) { |
- Token::Value op = node->op(); |
- TypeofMode old_typeof_mode = typeof_mode_; |
IncrementNodeCount(); |
- if (op == Token::TYPEOF) typeof_mode_ = INSIDE_TYPEOF; |
node->set_base_id(ReserveIdRange(UnaryOperation::num_ids())); |
Visit(node->expression()); |
- typeof_mode_ = old_typeof_mode; |
} |