OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5170 return result; | 5170 return result; |
5171 } | 5171 } |
5172 | 5172 |
5173 | 5173 |
5174 MaybeObject* Heap::AllocateJSArray( | 5174 MaybeObject* Heap::AllocateJSArray( |
5175 ElementsKind elements_kind, | 5175 ElementsKind elements_kind, |
5176 PretenureFlag pretenure) { | 5176 PretenureFlag pretenure) { |
5177 Context* native_context = isolate()->context()->native_context(); | 5177 Context* native_context = isolate()->context()->native_context(); |
5178 JSFunction* array_function = native_context->array_function(); | 5178 JSFunction* array_function = native_context->array_function(); |
5179 Map* map = array_function->initial_map(); | 5179 Map* map = array_function->initial_map(); |
5180 Object* maybe_map_array = native_context->js_array_maps(); | 5180 Map* transition_map = isolate()->get_initial_js_array_map(elements_kind); |
5181 if (!maybe_map_array->IsUndefined()) { | 5181 if (transition_map != NULL) map = transition_map; |
5182 Object* maybe_transitioned_map = | |
5183 FixedArray::cast(maybe_map_array)->get(elements_kind); | |
5184 if (!maybe_transitioned_map->IsUndefined()) { | |
5185 map = Map::cast(maybe_transitioned_map); | |
5186 } | |
5187 } | |
5188 | |
5189 return AllocateJSObjectFromMap(map, pretenure); | 5182 return AllocateJSObjectFromMap(map, pretenure); |
5190 } | 5183 } |
5191 | 5184 |
5192 | 5185 |
5193 MaybeObject* Heap::AllocateJSArrayWithAllocationSite( | 5186 MaybeObject* Heap::AllocateJSArrayWithAllocationSite( |
5194 ElementsKind elements_kind, | 5187 ElementsKind elements_kind, |
5195 Handle<Object> allocation_site_info_payload) { | 5188 Handle<Object> allocation_site_info_payload) { |
5196 Context* native_context = isolate()->context()->native_context(); | 5189 Context* native_context = isolate()->context()->native_context(); |
5197 JSFunction* array_function = native_context->array_function(); | 5190 JSFunction* array_function = native_context->array_function(); |
5198 Map* map = array_function->initial_map(); | 5191 Map* map = array_function->initial_map(); |
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7883 if (FLAG_parallel_recompilation) { | 7876 if (FLAG_parallel_recompilation) { |
7884 heap_->relocation_mutex_->Lock(); | 7877 heap_->relocation_mutex_->Lock(); |
7885 #ifdef DEBUG | 7878 #ifdef DEBUG |
7886 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7879 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7887 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7880 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7888 #endif // DEBUG | 7881 #endif // DEBUG |
7889 } | 7882 } |
7890 } | 7883 } |
7891 | 7884 |
7892 } } // namespace v8::internal | 7885 } } // namespace v8::internal |
OLD | NEW |