| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 if (type == Slot::LOOKUP) { | 895 if (type == Slot::LOOKUP) { |
| 896 BAILOUT("Lookup slot"); | 896 BAILOUT("Lookup slot"); |
| 897 } | 897 } |
| 898 } | 898 } |
| 899 } else if (prop != NULL) { | 899 } else if (prop != NULL) { |
| 900 ProcessExpression(prop->obj(), Expression::kValue); | 900 ProcessExpression(prop->obj(), Expression::kValue); |
| 901 CHECK_BAILOUT; | 901 CHECK_BAILOUT; |
| 902 // We will only visit the key during code generation for keyed property | 902 // We will only visit the key during code generation for keyed property |
| 903 // stores. Leave its expression context uninitialized for named | 903 // stores. Leave its expression context uninitialized for named |
| 904 // property stores. | 904 // property stores. |
| 905 Literal* lit = prop->key()->AsLiteral(); | 905 if (!prop->key()->IsPropertyName()) { |
| 906 uint32_t ignored; | |
| 907 if (lit == NULL || | |
| 908 !lit->handle()->IsSymbol() || | |
| 909 String::cast(*(lit->handle()))->AsArrayIndex(&ignored)) { | |
| 910 ProcessExpression(prop->key(), Expression::kValue); | 906 ProcessExpression(prop->key(), Expression::kValue); |
| 911 CHECK_BAILOUT; | 907 CHECK_BAILOUT; |
| 912 } | 908 } |
| 913 } else { | 909 } else { |
| 914 // This is a throw reference error. | 910 // This is a throw reference error. |
| 915 BAILOUT("non-variable/non-property assignment"); | 911 BAILOUT("non-variable/non-property assignment"); |
| 916 } | 912 } |
| 917 | 913 |
| 918 ProcessExpression(expr->value(), Expression::kValue); | 914 ProcessExpression(expr->value(), Expression::kValue); |
| 919 } | 915 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 if (type == Slot::LOOKUP) { | 1019 if (type == Slot::LOOKUP) { |
| 1024 BAILOUT("CountOperation with lookup slot"); | 1020 BAILOUT("CountOperation with lookup slot"); |
| 1025 } | 1021 } |
| 1026 } | 1022 } |
| 1027 } else if (prop != NULL) { | 1023 } else if (prop != NULL) { |
| 1028 ProcessExpression(prop->obj(), Expression::kValue); | 1024 ProcessExpression(prop->obj(), Expression::kValue); |
| 1029 CHECK_BAILOUT; | 1025 CHECK_BAILOUT; |
| 1030 // We will only visit the key during code generation for keyed property | 1026 // We will only visit the key during code generation for keyed property |
| 1031 // stores. Leave its expression context uninitialized for named | 1027 // stores. Leave its expression context uninitialized for named |
| 1032 // property stores. | 1028 // property stores. |
| 1033 Literal* lit = prop->key()->AsLiteral(); | 1029 if (!prop->key()->IsPropertyName()) { |
| 1034 uint32_t ignored; | |
| 1035 if (lit == NULL || | |
| 1036 !lit->handle()->IsSymbol() || | |
| 1037 String::cast(*(lit->handle()))->AsArrayIndex(&ignored)) { | |
| 1038 ProcessExpression(prop->key(), Expression::kValue); | 1030 ProcessExpression(prop->key(), Expression::kValue); |
| 1039 CHECK_BAILOUT; | 1031 CHECK_BAILOUT; |
| 1040 } | 1032 } |
| 1041 } else { | 1033 } else { |
| 1042 // This is a throw reference error. | 1034 // This is a throw reference error. |
| 1043 BAILOUT("CountOperation non-variable/non-property expression"); | 1035 BAILOUT("CountOperation non-variable/non-property expression"); |
| 1044 } | 1036 } |
| 1045 } | 1037 } |
| 1046 | 1038 |
| 1047 | 1039 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 | 1120 |
| 1129 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { | 1121 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { |
| 1130 // ThisFunction is supported. | 1122 // ThisFunction is supported. |
| 1131 } | 1123 } |
| 1132 | 1124 |
| 1133 #undef BAILOUT | 1125 #undef BAILOUT |
| 1134 #undef CHECK_BAILOUT | 1126 #undef CHECK_BAILOUT |
| 1135 | 1127 |
| 1136 | 1128 |
| 1137 } } // namespace v8::internal | 1129 } } // namespace v8::internal |
| OLD | NEW |