OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 15897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15908 } | 15908 } |
15909 site->SetElementsKind(to_kind); | 15909 site->SetElementsKind(to_kind); |
15910 site->dependent_code()->DeoptimizeDependentCodeGroup( | 15910 site->dependent_code()->DeoptimizeDependentCodeGroup( |
15911 isolate, DependentCode::kAllocationSiteTransitionChangedGroup); | 15911 isolate, DependentCode::kAllocationSiteTransitionChangedGroup); |
15912 result = true; | 15912 result = true; |
15913 } | 15913 } |
15914 } | 15914 } |
15915 return result; | 15915 return result; |
15916 } | 15916 } |
15917 | 15917 |
| 15918 AllocationSiteMode AllocationSite::GetMode(ElementsKind from, ElementsKind to) { |
| 15919 if (IsFastSmiElementsKind(from) && |
| 15920 IsMoreGeneralElementsKindTransition(from, to)) { |
| 15921 return TRACK_ALLOCATION_SITE; |
| 15922 } |
| 15923 |
| 15924 return DONT_TRACK_ALLOCATION_SITE; |
| 15925 } |
15918 | 15926 |
15919 const char* AllocationSite::PretenureDecisionName(PretenureDecision decision) { | 15927 const char* AllocationSite::PretenureDecisionName(PretenureDecision decision) { |
15920 switch (decision) { | 15928 switch (decision) { |
15921 case kUndecided: return "undecided"; | 15929 case kUndecided: return "undecided"; |
15922 case kDontTenure: return "don't tenure"; | 15930 case kDontTenure: return "don't tenure"; |
15923 case kMaybeTenure: return "maybe tenure"; | 15931 case kMaybeTenure: return "maybe tenure"; |
15924 case kTenure: return "tenure"; | 15932 case kTenure: return "tenure"; |
15925 case kZombie: return "zombie"; | 15933 case kZombie: return "zombie"; |
15926 default: UNREACHABLE(); | 15934 default: UNREACHABLE(); |
15927 } | 15935 } |
(...skipping 4350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20278 // Check if the accessor uses a cached property. | 20286 // Check if the accessor uses a cached property. |
20279 if (!fti->cached_property_name()->IsTheHole(isolate)) { | 20287 if (!fti->cached_property_name()->IsTheHole(isolate)) { |
20280 return handle(Name::cast(fti->cached_property_name())); | 20288 return handle(Name::cast(fti->cached_property_name())); |
20281 } | 20289 } |
20282 } | 20290 } |
20283 return MaybeHandle<Name>(); | 20291 return MaybeHandle<Name>(); |
20284 } | 20292 } |
20285 | 20293 |
20286 } // namespace internal | 20294 } // namespace internal |
20287 } // namespace v8 | 20295 } // namespace v8 |
OLD | NEW |