| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "accessors.h" | 7 #include "accessors.h" |
| 8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
| 9 #include "api.h" | 9 #include "api.h" |
| 10 #include "arguments.h" | 10 #include "arguments.h" |
| (...skipping 16706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16717 Handle<DeclaredAccessorDescriptor> value = | 16717 Handle<DeclaredAccessorDescriptor> value = |
| 16718 isolate->factory()->NewDeclaredAccessorDescriptor(); | 16718 isolate->factory()->NewDeclaredAccessorDescriptor(); |
| 16719 value->set_serialized_data(*serialized_descriptor); | 16719 value->set_serialized_data(*serialized_descriptor); |
| 16720 // Copy in the data. | 16720 // Copy in the data. |
| 16721 { | 16721 { |
| 16722 DisallowHeapAllocation no_allocation; | 16722 DisallowHeapAllocation no_allocation; |
| 16723 uint8_t* array = serialized_descriptor->GetDataStartAddress(); | 16723 uint8_t* array = serialized_descriptor->GetDataStartAddress(); |
| 16724 if (previous_length != 0) { | 16724 if (previous_length != 0) { |
| 16725 uint8_t* previous_array = | 16725 uint8_t* previous_array = |
| 16726 previous->serialized_data()->GetDataStartAddress(); | 16726 previous->serialized_data()->GetDataStartAddress(); |
| 16727 MemCopy(array, previous_array, previous_length); | 16727 OS::MemCopy(array, previous_array, previous_length); |
| 16728 array += previous_length; | 16728 array += previous_length; |
| 16729 } | 16729 } |
| 16730 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); | 16730 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); |
| 16731 DeclaredAccessorDescriptorData* data = | 16731 DeclaredAccessorDescriptorData* data = |
| 16732 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); | 16732 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); |
| 16733 *data = descriptor; | 16733 *data = descriptor; |
| 16734 } | 16734 } |
| 16735 return value; | 16735 return value; |
| 16736 } | 16736 } |
| 16737 | 16737 |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17269 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17269 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 17270 static const char* error_messages_[] = { | 17270 static const char* error_messages_[] = { |
| 17271 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17271 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 17272 }; | 17272 }; |
| 17273 #undef ERROR_MESSAGES_TEXTS | 17273 #undef ERROR_MESSAGES_TEXTS |
| 17274 return error_messages_[reason]; | 17274 return error_messages_[reason]; |
| 17275 } | 17275 } |
| 17276 | 17276 |
| 17277 | 17277 |
| 17278 } } // namespace v8::internal | 17278 } } // namespace v8::internal |
| OLD | NEW |