OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) { | 916 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) { |
917 const Runtime::Function* function = expr->function(); | 917 const Runtime::Function* function = expr->function(); |
918 ASSERT(function != NULL); | 918 ASSERT(function != NULL); |
919 ASSERT(function->intrinsic_type == Runtime::INLINE); | 919 ASSERT(function->intrinsic_type == Runtime::INLINE); |
920 InlineFunctionGenerator generator = | 920 InlineFunctionGenerator generator = |
921 FindInlineFunctionGenerator(function->function_id); | 921 FindInlineFunctionGenerator(function->function_id); |
922 ((*this).*(generator))(expr); | 922 ((*this).*(generator))(expr); |
923 } | 923 } |
924 | 924 |
925 | 925 |
| 926 void FullCodeGenerator::EmitGeneratorSend(CallRuntime* expr) { |
| 927 ZoneList<Expression*>* args = expr->arguments(); |
| 928 ASSERT(args->length() == 2); |
| 929 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::SEND); |
| 930 } |
| 931 |
| 932 |
| 933 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) { |
| 934 ZoneList<Expression*>* args = expr->arguments(); |
| 935 ASSERT(args->length() == 2); |
| 936 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); |
| 937 } |
| 938 |
| 939 |
926 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 940 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
927 switch (expr->op()) { | 941 switch (expr->op()) { |
928 case Token::COMMA: | 942 case Token::COMMA: |
929 return VisitComma(expr); | 943 return VisitComma(expr); |
930 case Token::OR: | 944 case Token::OR: |
931 case Token::AND: | 945 case Token::AND: |
932 return VisitLogicalExpression(expr); | 946 return VisitLogicalExpression(expr); |
933 default: | 947 default: |
934 return VisitArithmeticExpression(expr); | 948 return VisitArithmeticExpression(expr); |
935 } | 949 } |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 } | 1600 } |
1587 | 1601 |
1588 return false; | 1602 return false; |
1589 } | 1603 } |
1590 | 1604 |
1591 | 1605 |
1592 #undef __ | 1606 #undef __ |
1593 | 1607 |
1594 | 1608 |
1595 } } // namespace v8::internal | 1609 } } // namespace v8::internal |
OLD | NEW |