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 12039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12050 } | 12050 } |
12051 | 12051 |
12052 | 12052 |
12053 Handle<Object> JSObject::SetElement(Handle<JSObject> object, | 12053 Handle<Object> JSObject::SetElement(Handle<JSObject> object, |
12054 uint32_t index, | 12054 uint32_t index, |
12055 Handle<Object> value, | 12055 Handle<Object> value, |
12056 PropertyAttributes attr, | 12056 PropertyAttributes attr, |
12057 StrictModeFlag strict_mode, | 12057 StrictModeFlag strict_mode, |
12058 SetPropertyMode set_mode) { | 12058 SetPropertyMode set_mode) { |
12059 if (object->HasExternalArrayElements()) { | 12059 if (object->HasExternalArrayElements()) { |
12060 if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) { | 12060 if (!value->IsNumber() && !value->IsUndefined()) { |
12061 bool has_exception; | 12061 bool has_exception; |
12062 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 12062 Handle<Object> number = Execution::ToNumber(value, &has_exception); |
12063 if (has_exception) return Handle<Object>(); | 12063 if (has_exception) return Handle<Object>(); |
12064 value = number; | 12064 value = number; |
12065 } | 12065 } |
12066 } | 12066 } |
12067 CALL_HEAP_FUNCTION( | 12067 CALL_HEAP_FUNCTION( |
12068 object->GetIsolate(), | 12068 object->GetIsolate(), |
12069 object->SetElement(index, *value, attr, strict_mode, true, set_mode), | 12069 object->SetElement(index, *value, attr, strict_mode, true, set_mode), |
12070 Object); | 12070 Object); |
(...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15814 return static_cast<Type*>(type_raw()); | 15814 return static_cast<Type*>(type_raw()); |
15815 } | 15815 } |
15816 | 15816 |
15817 | 15817 |
15818 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { | 15818 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
15819 set_type_raw(type, ignored); | 15819 set_type_raw(type, ignored); |
15820 } | 15820 } |
15821 | 15821 |
15822 | 15822 |
15823 } } // namespace v8::internal | 15823 } } // namespace v8::internal |
OLD | NEW |