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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 ASSERT(args->length() == 2); | 945 ASSERT(args->length() == 2); |
946 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); | 946 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); |
947 } | 947 } |
948 | 948 |
949 | 949 |
950 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { | 950 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { |
951 context()->Plug(handle(Smi::FromInt(0), isolate())); | 951 context()->Plug(handle(Smi::FromInt(0), isolate())); |
952 } | 952 } |
953 | 953 |
954 | 954 |
955 void FullCodeGenerator::EmitDoubleHi(CallRuntime* expr) { | |
956 ZoneList<Expression*>* args = expr->arguments(); | |
957 ASSERT(args->length() == 1); | |
958 VisitForStackValue(args->at(0)); | |
959 masm()->CallRuntime(Runtime::kDoubleHi, 1); | |
960 context()->Plug(result_register()); | |
961 } | |
962 | |
963 | |
964 void FullCodeGenerator::EmitDoubleLo(CallRuntime* expr) { | |
965 ZoneList<Expression*>* args = expr->arguments(); | |
966 ASSERT(args->length() == 1); | |
967 VisitForStackValue(args->at(0)); | |
968 masm()->CallRuntime(Runtime::kDoubleLo, 1); | |
969 context()->Plug(result_register()); | |
970 } | |
971 | |
972 | |
973 void FullCodeGenerator::EmitConstructDouble(CallRuntime* expr) { | |
974 ZoneList<Expression*>* args = expr->arguments(); | |
975 ASSERT(args->length() == 2); | |
976 VisitForStackValue(args->at(0)); | |
977 VisitForStackValue(args->at(1)); | |
978 masm()->CallRuntime(Runtime::kConstructDouble, 2); | |
979 context()->Plug(result_register()); | |
980 } | |
981 | |
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 | |
1008 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { | 955 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { |
1009 switch (expr->op()) { | 956 switch (expr->op()) { |
1010 case Token::COMMA: | 957 case Token::COMMA: |
1011 return VisitComma(expr); | 958 return VisitComma(expr); |
1012 case Token::OR: | 959 case Token::OR: |
1013 case Token::AND: | 960 case Token::AND: |
1014 return VisitLogicalExpression(expr); | 961 return VisitLogicalExpression(expr); |
1015 default: | 962 default: |
1016 return VisitArithmeticExpression(expr); | 963 return VisitArithmeticExpression(expr); |
1017 } | 964 } |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1783 } | 1730 } |
1784 return true; | 1731 return true; |
1785 } | 1732 } |
1786 #endif // DEBUG | 1733 #endif // DEBUG |
1787 | 1734 |
1788 | 1735 |
1789 #undef __ | 1736 #undef __ |
1790 | 1737 |
1791 | 1738 |
1792 } } // namespace v8::internal | 1739 } } // namespace v8::internal |
OLD | NEW |