Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: src/heap.cc

Issue 55933002: Inline array constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added comment to CreateArrayDispatchOneArgument Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/elements-kind.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4580 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 } 4591 }
4592 4592
4593 4593
4594 MaybeObject* Heap::AllocateJSObjectWithAllocationSite(JSFunction* constructor, 4594 MaybeObject* Heap::AllocateJSObjectWithAllocationSite(JSFunction* constructor,
4595 Handle<AllocationSite> allocation_site) { 4595 Handle<AllocationSite> allocation_site) {
4596 ASSERT(constructor->has_initial_map()); 4596 ASSERT(constructor->has_initial_map());
4597 // Allocate the object based on the constructors initial map, or the payload 4597 // Allocate the object based on the constructors initial map, or the payload
4598 // advice 4598 // advice
4599 Map* initial_map = constructor->initial_map(); 4599 Map* initial_map = constructor->initial_map();
4600 4600
4601 Smi* smi = Smi::cast(allocation_site->transition_info()); 4601 ElementsKind to_kind = allocation_site->GetElementsKind();
4602 ElementsKind to_kind = static_cast<ElementsKind>(smi->value());
4603 AllocationSiteMode mode = TRACK_ALLOCATION_SITE; 4602 AllocationSiteMode mode = TRACK_ALLOCATION_SITE;
4604 if (to_kind != initial_map->elements_kind()) { 4603 if (to_kind != initial_map->elements_kind()) {
4605 MaybeObject* maybe_new_map = initial_map->AsElementsKind(to_kind); 4604 MaybeObject* maybe_new_map = initial_map->AsElementsKind(to_kind);
4606 if (!maybe_new_map->To(&initial_map)) return maybe_new_map; 4605 if (!maybe_new_map->To(&initial_map)) return maybe_new_map;
4607 // Possibly alter the mode, since we found an updated elements kind 4606 // Possibly alter the mode, since we found an updated elements kind
4608 // in the type info cell. 4607 // in the type info cell.
4609 mode = AllocationSite::GetMode(to_kind); 4608 mode = AllocationSite::GetMode(to_kind);
4610 } 4609 }
4611 4610
4612 MaybeObject* result; 4611 MaybeObject* result;
(...skipping 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after
7924 if (FLAG_concurrent_recompilation) { 7923 if (FLAG_concurrent_recompilation) {
7925 heap_->relocation_mutex_->Lock(); 7924 heap_->relocation_mutex_->Lock();
7926 #ifdef DEBUG 7925 #ifdef DEBUG
7927 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7926 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7928 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7927 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7929 #endif // DEBUG 7928 #endif // DEBUG
7930 } 7929 }
7931 } 7930 }
7932 7931
7933 } } // namespace v8::internal 7932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698