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

Side by Side Diff: src/objects-inl.h

Issue 935033003: Move LookupResult into crankshaft as that's now the only place where it's still used (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « src/objects.cc ('k') | src/property.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 // 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 3008 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 3019
3020 return number; 3020 return number;
3021 } 3021 }
3022 3022
3023 3023
3024 PropertyDetails Map::GetLastDescriptorDetails() { 3024 PropertyDetails Map::GetLastDescriptorDetails() {
3025 return instance_descriptors()->GetDetails(LastAdded()); 3025 return instance_descriptors()->GetDetails(LastAdded());
3026 } 3026 }
3027 3027
3028 3028
3029 void Map::LookupDescriptor(Name* name, LookupResult* result) {
3030 DescriptorArray* descriptors = this->instance_descriptors();
3031 int number = descriptors->SearchWithCache(name, this);
3032 if (number == DescriptorArray::kNotFound) return result->NotFound();
3033 result->DescriptorResult(descriptors->GetDetails(number), number);
3034 }
3035
3036
3037 void Map::LookupTransition(Name* name, PropertyAttributes attributes,
3038 LookupResult* result) {
3039 int transition_index = this->SearchTransition(kData, name, attributes);
3040 if (transition_index == TransitionArray::kNotFound) return result->NotFound();
3041 result->TransitionResult(this->GetTransition(transition_index));
3042 }
3043
3044
3045 FixedArrayBase* Map::GetInitialElements() { 3029 FixedArrayBase* Map::GetInitialElements() {
3046 if (has_fast_smi_or_object_elements() || 3030 if (has_fast_smi_or_object_elements() ||
3047 has_fast_double_elements()) { 3031 has_fast_double_elements()) {
3048 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); 3032 DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array()));
3049 return GetHeap()->empty_fixed_array(); 3033 return GetHeap()->empty_fixed_array();
3050 } else if (has_external_array_elements()) { 3034 } else if (has_external_array_elements()) {
3051 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); 3035 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this);
3052 DCHECK(!GetHeap()->InNewSpace(empty_array)); 3036 DCHECK(!GetHeap()->InNewSpace(empty_array));
3053 return empty_array; 3037 return empty_array;
3054 } else if (has_fixed_typed_array_elements()) { 3038 } else if (has_fixed_typed_array_elements()) {
(...skipping 4575 matching lines...) Expand 10 before | Expand all | Expand 10 after
7630 #undef READ_SHORT_FIELD 7614 #undef READ_SHORT_FIELD
7631 #undef WRITE_SHORT_FIELD 7615 #undef WRITE_SHORT_FIELD
7632 #undef READ_BYTE_FIELD 7616 #undef READ_BYTE_FIELD
7633 #undef WRITE_BYTE_FIELD 7617 #undef WRITE_BYTE_FIELD
7634 #undef NOBARRIER_READ_BYTE_FIELD 7618 #undef NOBARRIER_READ_BYTE_FIELD
7635 #undef NOBARRIER_WRITE_BYTE_FIELD 7619 #undef NOBARRIER_WRITE_BYTE_FIELD
7636 7620
7637 } } // namespace v8::internal 7621 } } // namespace v8::internal
7638 7622
7639 #endif // V8_OBJECTS_INL_H_ 7623 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698