| 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 7544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7555 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); | 7555 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); |
| 7556 return copy; | 7556 return copy; |
| 7557 } | 7557 } |
| 7558 | 7558 |
| 7559 | 7559 |
| 7560 Handle<Map> Map::CopyForFreeze(Handle<Map> map) { | 7560 Handle<Map> Map::CopyForFreeze(Handle<Map> map) { |
| 7561 int num_descriptors = map->NumberOfOwnDescriptors(); | 7561 int num_descriptors = map->NumberOfOwnDescriptors(); |
| 7562 Isolate* isolate = map->GetIsolate(); | 7562 Isolate* isolate = map->GetIsolate(); |
| 7563 Handle<DescriptorArray> new_desc = DescriptorArray::CopyUpToAddAttributes( | 7563 Handle<DescriptorArray> new_desc = DescriptorArray::CopyUpToAddAttributes( |
| 7564 handle(map->instance_descriptors(), isolate), num_descriptors, FROZEN); | 7564 handle(map->instance_descriptors(), isolate), num_descriptors, FROZEN); |
| 7565 Handle<Map> new_map = Map::CopyReplaceDescriptors( | 7565 Handle<Map> new_map = CopyReplaceDescriptors( |
| 7566 map, new_desc, INSERT_TRANSITION, isolate->factory()->frozen_symbol()); | 7566 map, new_desc, INSERT_TRANSITION, isolate->factory()->frozen_symbol()); |
| 7567 new_map->freeze(); | 7567 new_map->freeze(); |
| 7568 new_map->set_is_extensible(false); | 7568 new_map->set_is_extensible(false); |
| 7569 new_map->set_elements_kind(DICTIONARY_ELEMENTS); | 7569 new_map->set_elements_kind(DICTIONARY_ELEMENTS); |
| 7570 return new_map; | 7570 return new_map; |
| 7571 } | 7571 } |
| 7572 | 7572 |
| 7573 | 7573 |
| 7574 Handle<Map> Map::CopyAddDescriptor(Handle<Map> map, | 7574 Handle<Map> Map::CopyAddDescriptor(Handle<Map> map, |
| 7575 Descriptor* descriptor, | 7575 Descriptor* descriptor, |
| (...skipping 9700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17276 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17276 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 17277 static const char* error_messages_[] = { | 17277 static const char* error_messages_[] = { |
| 17278 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17278 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 17279 }; | 17279 }; |
| 17280 #undef ERROR_MESSAGES_TEXTS | 17280 #undef ERROR_MESSAGES_TEXTS |
| 17281 return error_messages_[reason]; | 17281 return error_messages_[reason]; |
| 17282 } | 17282 } |
| 17283 | 17283 |
| 17284 | 17284 |
| 17285 } } // namespace v8::internal | 17285 } } // namespace v8::internal |
| OLD | NEW |