OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
874 // Check for supported calls | 874 // Check for supported calls |
875 if (var != NULL && var->is_possibly_eval()) { | 875 if (var != NULL && var->is_possibly_eval()) { |
876 BAILOUT("call to the identifier 'eval'"); | 876 BAILOUT("call to the identifier 'eval'"); |
877 } else if (var != NULL && !var->is_this() && var->is_global()) { | 877 } else if (var != NULL && !var->is_this() && var->is_global()) { |
878 // Calls to global variables are supported. | 878 // Calls to global variables are supported. |
879 } else if (var != NULL && var->slot() != NULL && | 879 } else if (var != NULL && var->slot() != NULL && |
880 var->slot()->type() == Slot::LOOKUP) { | 880 var->slot()->type() == Slot::LOOKUP) { |
881 BAILOUT("call to a lookup slot"); | 881 BAILOUT("call to a lookup slot"); |
882 } else if (fun->AsProperty() != NULL) { | 882 } else if (fun->AsProperty() != NULL) { |
883 Property* prop = fun->AsProperty(); | 883 Property* prop = fun->AsProperty(); |
884 Literal* literal_key = prop->key()->AsLiteral(); | |
885 Visit(prop->obj()); | 884 Visit(prop->obj()); |
886 CHECK_BAILOUT; | 885 CHECK_BAILOUT; |
887 Visit(prop->key()); | 886 Visit(prop->key()); |
888 CHECK_BAILOUT; | 887 CHECK_BAILOUT; |
889 } else { | 888 } else { |
890 // Otherwise the call is supported if the function expression is. | 889 // Otherwise the call is supported if the function expression is. |
891 Visit(fun); | 890 Visit(fun); |
892 } | 891 } |
893 // Check all arguments to the call. | 892 // Check all arguments to the call. |
894 for (int i = 0; i < args->length(); i++) { | 893 for (int i = 0; i < args->length(); i++) { |
(...skipping 29 matching lines...) Expand all Loading... | |
924 } | 923 } |
925 | 924 |
926 | 925 |
927 void CodeGenSelector::VisitUnaryOperation(UnaryOperation* expr) { | 926 void CodeGenSelector::VisitUnaryOperation(UnaryOperation* expr) { |
928 switch (expr->op()) { | 927 switch (expr->op()) { |
929 case Token::VOID: | 928 case Token::VOID: |
930 case Token::NOT: | 929 case Token::NOT: |
931 case Token::TYPEOF: | 930 case Token::TYPEOF: |
932 Visit(expr->expression()); | 931 Visit(expr->expression()); |
933 break; | 932 break; |
934 case BIT_NOT: | 933 case Token::BIT_NOT: |
935 BAILOUT("UnaryOperataion: BIT_NOT"); | 934 BAILOUT("UnaryOperataion: BIT_NOT"); |
fschneider
2010/01/19 19:06:59
Typo here -> "UnaryOperation". As well at the othe
| |
936 case DELETE: | 935 case Token::DELETE: |
937 BAILOUT("UnaryOperataion: DELETE"); | 936 BAILOUT("UnaryOperataion: DELETE"); |
937 case Token::ADD: | |
938 BAILOUT("UnaryOperataion: ADD"); | |
939 case Token::SUB: | |
940 BAILOUT("UnaryOperataion: SUB"); | |
938 default: | 941 default: |
939 UNREACHABLE(); | 942 UNREACHABLE(); |
940 } | 943 } |
941 } | 944 } |
942 | 945 |
943 | 946 |
944 void CodeGenSelector::VisitCountOperation(CountOperation* expr) { | 947 void CodeGenSelector::VisitCountOperation(CountOperation* expr) { |
945 Variable* var = expr->expression()->AsVariableProxy()->AsVariable(); | 948 Variable* var = expr->expression()->AsVariableProxy()->AsVariable(); |
946 Property* prop = expr->expression()->AsProperty(); | 949 Property* prop = expr->expression()->AsProperty(); |
947 ASSERT(var == NULL || prop == NULL); | 950 ASSERT(var == NULL || prop == NULL); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
980 } | 983 } |
981 | 984 |
982 | 985 |
983 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) {} | 986 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) {} |
984 | 987 |
985 #undef BAILOUT | 988 #undef BAILOUT |
986 #undef CHECK_BAILOUT | 989 #undef CHECK_BAILOUT |
987 | 990 |
988 | 991 |
989 } } // namespace v8::internal | 992 } } // namespace v8::internal |
OLD | NEW |