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 16689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16700 Handle<DeclaredAccessorDescriptor> value = | 16700 Handle<DeclaredAccessorDescriptor> value = |
16701 isolate->factory()->NewDeclaredAccessorDescriptor(); | 16701 isolate->factory()->NewDeclaredAccessorDescriptor(); |
16702 value->set_serialized_data(*serialized_descriptor); | 16702 value->set_serialized_data(*serialized_descriptor); |
16703 // Copy in the data. | 16703 // Copy in the data. |
16704 { | 16704 { |
16705 DisallowHeapAllocation no_allocation; | 16705 DisallowHeapAllocation no_allocation; |
16706 uint8_t* array = serialized_descriptor->GetDataStartAddress(); | 16706 uint8_t* array = serialized_descriptor->GetDataStartAddress(); |
16707 if (previous_length != 0) { | 16707 if (previous_length != 0) { |
16708 uint8_t* previous_array = | 16708 uint8_t* previous_array = |
16709 previous->serialized_data()->GetDataStartAddress(); | 16709 previous->serialized_data()->GetDataStartAddress(); |
16710 OS::MemCopy(array, previous_array, previous_length); | 16710 MemCopy(array, previous_array, previous_length); |
16711 array += previous_length; | 16711 array += previous_length; |
16712 } | 16712 } |
16713 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); | 16713 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); |
16714 DeclaredAccessorDescriptorData* data = | 16714 DeclaredAccessorDescriptorData* data = |
16715 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); | 16715 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); |
16716 *data = descriptor; | 16716 *data = descriptor; |
16717 } | 16717 } |
16718 return value; | 16718 return value; |
16719 } | 16719 } |
16720 | 16720 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17252 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17252 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17253 static const char* error_messages_[] = { | 17253 static const char* error_messages_[] = { |
17254 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17254 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17255 }; | 17255 }; |
17256 #undef ERROR_MESSAGES_TEXTS | 17256 #undef ERROR_MESSAGES_TEXTS |
17257 return error_messages_[reason]; | 17257 return error_messages_[reason]; |
17258 } | 17258 } |
17259 | 17259 |
17260 | 17260 |
17261 } } // namespace v8::internal | 17261 } } // namespace v8::internal |
OLD | NEW |