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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 void FullCodeGenerator::EmitConstructDouble(CallRuntime* expr) { | 973 void FullCodeGenerator::EmitConstructDouble(CallRuntime* expr) { |
974 ZoneList<Expression*>* args = expr->arguments(); | 974 ZoneList<Expression*>* args = expr->arguments(); |
975 ASSERT(args->length() == 2); | 975 ASSERT(args->length() == 2); |
976 VisitForStackValue(args->at(0)); | 976 VisitForStackValue(args->at(0)); |
977 VisitForStackValue(args->at(1)); | 977 VisitForStackValue(args->at(1)); |
978 masm()->CallRuntime(Runtime::kConstructDouble, 2); | 978 masm()->CallRuntime(Runtime::kConstructDouble, 2); |
979 context()->Plug(result_register()); | 979 context()->Plug(result_register()); |
980 } | 980 } |
981 | 981 |
982 | 982 |
| 983 void FullCodeGenerator::EmitTypedArrayInitialize(CallRuntime* expr) { |
| 984 ZoneList<Expression*>* args = expr->arguments(); |
| 985 ASSERT(args->length() == 5); |
| 986 for (int i = 0; i < 5; i++) VisitForStackValue(args->at(i)); |
| 987 masm()->CallRuntime(Runtime::kTypedArrayInitialize, 5); |
| 988 context()->Plug(result_register()); |
| 989 } |
| 990 |
| 991 |
| 992 void FullCodeGenerator::EmitDataViewInitialize(CallRuntime* expr) { |
| 993 ZoneList<Expression*>* args = expr->arguments(); |
| 994 ASSERT(args->length() == 4); |
| 995 for (int i = 0; i < 4; i++) VisitForStackValue(args->at(i)); |
| 996 masm()->CallRuntime(Runtime::kDataViewInitialize, 4); |
| 997 context()->Plug(result_register()); |
| 998 } |
| 999 |
| 1000 |
| 1001 void FullCodeGenerator::EmitMaxSmi(CallRuntime* expr) { |
| 1002 ASSERT(expr->arguments()->length() == 0); |
| 1003 masm()->CallRuntime(Runtime::kMaxSmi, 0); |
| 1004 context()->Plug(result_register()); |
| 1005 } |
| 1006 |
| 1007 |
983 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 1008 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
984 switch (expr->op()) { | 1009 switch (expr->op()) { |
985 case Token::COMMA: | 1010 case Token::COMMA: |
986 return VisitComma(expr); | 1011 return VisitComma(expr); |
987 case Token::OR: | 1012 case Token::OR: |
988 case Token::AND: | 1013 case Token::AND: |
989 return VisitLogicalExpression(expr); | 1014 return VisitLogicalExpression(expr); |
990 default: | 1015 default: |
991 return VisitArithmeticExpression(expr); | 1016 return VisitArithmeticExpression(expr); |
992 } | 1017 } |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 } | 1783 } |
1759 return true; | 1784 return true; |
1760 } | 1785 } |
1761 #endif // DEBUG | 1786 #endif // DEBUG |
1762 | 1787 |
1763 | 1788 |
1764 #undef __ | 1789 #undef __ |
1765 | 1790 |
1766 | 1791 |
1767 } } // namespace v8::internal | 1792 } } // namespace v8::internal |
OLD | NEW |