OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4199 name, value, attributes, value_type, mode, extensibility_check); | 4199 name, value, attributes, value_type, mode, extensibility_check); |
4200 } | 4200 } |
4201 | 4201 |
4202 if (lookup.IsFound() && | 4202 if (lookup.IsFound() && |
4203 (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) { | 4203 (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) { |
4204 object->LocalLookupRealNamedProperty(*name, &lookup); | 4204 object->LocalLookupRealNamedProperty(*name, &lookup); |
4205 } | 4205 } |
4206 | 4206 |
4207 // Check for accessor in prototype chain removed here in clone. | 4207 // Check for accessor in prototype chain removed here in clone. |
4208 if (!lookup.IsFound()) { | 4208 if (!lookup.IsFound()) { |
| 4209 object->map()->LookupTransition(*object, *name, &lookup); |
| 4210 TransitionFlag flag = lookup.IsFound() |
| 4211 ? OMIT_TRANSITION : INSERT_TRANSITION; |
4209 // Neither properties nor transitions found. | 4212 // Neither properties nor transitions found. |
4210 return AddProperty(object, name, value, attributes, kNonStrictMode, | 4213 return AddProperty(object, name, value, attributes, kNonStrictMode, |
4211 MAY_BE_STORE_FROM_KEYED, extensibility_check, value_type, mode); | 4214 MAY_BE_STORE_FROM_KEYED, extensibility_check, value_type, mode, flag); |
4212 } | 4215 } |
4213 | 4216 |
4214 Handle<Object> old_value = isolate->factory()->the_hole_value(); | 4217 Handle<Object> old_value = isolate->factory()->the_hole_value(); |
4215 PropertyAttributes old_attributes = ABSENT; | 4218 PropertyAttributes old_attributes = ABSENT; |
4216 bool is_observed = FLAG_harmony_observation && | 4219 bool is_observed = FLAG_harmony_observation && |
4217 object->map()->is_observed() && | 4220 object->map()->is_observed() && |
4218 *name != isolate->heap()->hidden_string(); | 4221 *name != isolate->heap()->hidden_string(); |
4219 if (is_observed && lookup.IsProperty()) { | 4222 if (is_observed && lookup.IsProperty()) { |
4220 if (lookup.IsDataProperty()) old_value = | 4223 if (lookup.IsDataProperty()) old_value = |
4221 Object::GetProperty(object, name); | 4224 Object::GetProperty(object, name); |
(...skipping 12442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16664 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16667 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16665 static const char* error_messages_[] = { | 16668 static const char* error_messages_[] = { |
16666 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16669 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16667 }; | 16670 }; |
16668 #undef ERROR_MESSAGES_TEXTS | 16671 #undef ERROR_MESSAGES_TEXTS |
16669 return error_messages_[reason]; | 16672 return error_messages_[reason]; |
16670 } | 16673 } |
16671 | 16674 |
16672 | 16675 |
16673 } } // namespace v8::internal | 16676 } } // namespace v8::internal |
OLD | NEW |