OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 8117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8128 HInstruction* instr = BuildBinaryOperation(expr, left, right); | 8128 HInstruction* instr = BuildBinaryOperation(expr, left, right); |
8129 instr->set_position(expr->position()); | 8129 instr->set_position(expr->position()); |
8130 return ast_context()->ReturnInstruction(instr, expr->id()); | 8130 return ast_context()->ReturnInstruction(instr, expr->id()); |
8131 } | 8131 } |
8132 | 8132 |
8133 | 8133 |
8134 void HOptimizedGraphBuilder::HandleLiteralCompareTypeof(CompareOperation* expr, | 8134 void HOptimizedGraphBuilder::HandleLiteralCompareTypeof(CompareOperation* expr, |
8135 Expression* sub_expr, | 8135 Expression* sub_expr, |
8136 Handle<String> check) { | 8136 Handle<String> check) { |
8137 CHECK_ALIVE(VisitForValue(sub_expr)); | 8137 CHECK_ALIVE(VisitForValue(sub_expr)); |
8138 HValue* value = Pop(); | 8138 HTypeof* htypeof = HTypeof::cast(Pop()); |
| 8139 HValue* value = htypeof->value(); |
8139 HTypeofIsAndBranch* instr = new(zone()) HTypeofIsAndBranch(value, check); | 8140 HTypeofIsAndBranch* instr = new(zone()) HTypeofIsAndBranch(value, check); |
8140 instr->set_position(expr->position()); | 8141 instr->set_position(expr->position()); |
8141 return ast_context()->ReturnControl(instr, expr->id()); | 8142 return ast_context()->ReturnControl(instr, expr->id()); |
8142 } | 8143 } |
8143 | 8144 |
8144 | 8145 |
8145 static bool IsLiteralCompareBool(HValue* left, | 8146 static bool IsLiteralCompareBool(HValue* left, |
8146 Token::Value op, | 8147 Token::Value op, |
8147 HValue* right) { | 8148 HValue* right) { |
8148 return op == Token::EQ_STRICT && | 8149 return op == Token::EQ_STRICT && |
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9989 if (ShouldProduceTraceOutput()) { | 9990 if (ShouldProduceTraceOutput()) { |
9990 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9991 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9991 } | 9992 } |
9992 | 9993 |
9993 #ifdef DEBUG | 9994 #ifdef DEBUG |
9994 graph_->Verify(false); // No full verify. | 9995 graph_->Verify(false); // No full verify. |
9995 #endif | 9996 #endif |
9996 } | 9997 } |
9997 | 9998 |
9998 } } // namespace v8::internal | 9999 } } // namespace v8::internal |
OLD | NEW |