| 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) { | 1353 if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) { |
| 1354 LookupResult lookup(isolate()); | 1354 LookupResult lookup(isolate()); |
| 1355 | 1355 |
| 1356 if (LookupForWrite(receiver, name, &lookup)) { | 1356 if (LookupForWrite(receiver, name, &lookup)) { |
| 1357 // Generate a stub for this store. | 1357 // Generate a stub for this store. |
| 1358 UpdateCaches(&lookup, state, strict_mode, receiver, name, value); | 1358 UpdateCaches(&lookup, state, strict_mode, receiver, name, value); |
| 1359 } else { | 1359 } else { |
| 1360 // Strict mode doesn't allow setting non-existent global property | 1360 // Strict mode doesn't allow setting non-existent global property |
| 1361 // or an assignment to a read only property. | 1361 // or an assignment to a read only property. |
| 1362 if (strict_mode == kStrictMode) { | 1362 if (strict_mode == kStrictMode) { |
| 1363 if (lookup.IsFound() && lookup.IsReadOnly()) { | 1363 if (lookup.IsProperty() && lookup.IsReadOnly()) { |
| 1364 return TypeError("strict_read_only_property", object, name); | 1364 return TypeError("strict_read_only_property", object, name); |
| 1365 } else if (IsContextual(object)) { | 1365 } else if (IsContextual(object)) { |
| 1366 return ReferenceError("not_defined", name); | 1366 return ReferenceError("not_defined", name); |
| 1367 } | 1367 } |
| 1368 } | 1368 } |
| 1369 } | 1369 } |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 if (receiver->IsJSGlobalProxy()) { | 1372 if (receiver->IsJSGlobalProxy()) { |
| 1373 // TODO(ulan): find out why we patch this site even with --no-use-ic | 1373 // TODO(ulan): find out why we patch this site even with --no-use-ic |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 #undef ADDR | 2563 #undef ADDR |
| 2564 }; | 2564 }; |
| 2565 | 2565 |
| 2566 | 2566 |
| 2567 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2567 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2568 return IC_utilities[id]; | 2568 return IC_utilities[id]; |
| 2569 } | 2569 } |
| 2570 | 2570 |
| 2571 | 2571 |
| 2572 } } // namespace v8::internal | 2572 } } // namespace v8::internal |
| OLD | NEW |