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 4531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4542 { MaybeObject* maybe_initial_map = AllocateInitialMap(constructor); | 4542 { MaybeObject* maybe_initial_map = AllocateInitialMap(constructor); |
4543 if (!maybe_initial_map->ToObject(&initial_map)) return maybe_initial_map; | 4543 if (!maybe_initial_map->ToObject(&initial_map)) return maybe_initial_map; |
4544 } | 4544 } |
4545 constructor->set_initial_map(Map::cast(initial_map)); | 4545 constructor->set_initial_map(Map::cast(initial_map)); |
4546 Map::cast(initial_map)->set_constructor(constructor); | 4546 Map::cast(initial_map)->set_constructor(constructor); |
4547 } | 4547 } |
4548 // Allocate the object based on the constructors initial map, or the payload | 4548 // Allocate the object based on the constructors initial map, or the payload |
4549 // advice | 4549 // advice |
4550 Map* initial_map = constructor->initial_map(); | 4550 Map* initial_map = constructor->initial_map(); |
4551 | 4551 |
4552 Smi* smi = Smi::cast(allocation_site->payload()); | 4552 Smi* smi = Smi::cast(allocation_site->transition_info()); |
4553 ElementsKind to_kind = static_cast<ElementsKind>(smi->value()); | 4553 ElementsKind to_kind = static_cast<ElementsKind>(smi->value()); |
4554 AllocationSiteMode mode = TRACK_ALLOCATION_SITE; | 4554 AllocationSiteMode mode = TRACK_ALLOCATION_SITE; |
4555 if (to_kind != initial_map->elements_kind()) { | 4555 if (to_kind != initial_map->elements_kind()) { |
4556 MaybeObject* maybe_new_map = initial_map->AsElementsKind(to_kind); | 4556 MaybeObject* maybe_new_map = initial_map->AsElementsKind(to_kind); |
4557 if (!maybe_new_map->To(&initial_map)) return maybe_new_map; | 4557 if (!maybe_new_map->To(&initial_map)) return maybe_new_map; |
4558 // Possibly alter the mode, since we found an updated elements kind | 4558 // Possibly alter the mode, since we found an updated elements kind |
4559 // in the type info cell. | 4559 // in the type info cell. |
4560 mode = AllocationSite::GetMode(to_kind); | 4560 mode = AllocationSite::GetMode(to_kind); |
4561 } | 4561 } |
4562 | 4562 |
(...skipping 3573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8136 if (FLAG_parallel_recompilation) { | 8136 if (FLAG_parallel_recompilation) { |
8137 heap_->relocation_mutex_->Lock(); | 8137 heap_->relocation_mutex_->Lock(); |
8138 #ifdef DEBUG | 8138 #ifdef DEBUG |
8139 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8139 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8140 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8140 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8141 #endif // DEBUG | 8141 #endif // DEBUG |
8142 } | 8142 } |
8143 } | 8143 } |
8144 | 8144 |
8145 } } // namespace v8::internal | 8145 } } // namespace v8::internal |
OLD | NEW |