OLD | NEW |
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 #ifndef V8_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
7 | 7 |
8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 Handle<Map> GetFieldOwnerFromMap(Handle<Map> map) const { | 2630 Handle<Map> GetFieldOwnerFromMap(Handle<Map> map) const { |
2631 DCHECK(IsFound()); | 2631 DCHECK(IsFound()); |
2632 DCHECK(number_ < map->NumberOfOwnDescriptors()); | 2632 DCHECK(number_ < map->NumberOfOwnDescriptors()); |
2633 return handle(map->FindFieldOwner(number_)); | 2633 return handle(map->FindFieldOwner(number_)); |
2634 } | 2634 } |
2635 int GetLocalFieldIndexFromMap(Handle<Map> map) const { | 2635 int GetLocalFieldIndexFromMap(Handle<Map> map) const { |
2636 DCHECK(lookup_type_ == DESCRIPTOR_TYPE || | 2636 DCHECK(lookup_type_ == DESCRIPTOR_TYPE || |
2637 lookup_type_ == TRANSITION_TYPE); | 2637 lookup_type_ == TRANSITION_TYPE); |
2638 DCHECK(number_ < map->NumberOfOwnDescriptors()); | 2638 DCHECK(number_ < map->NumberOfOwnDescriptors()); |
2639 int field_index = map->instance_descriptors()->GetFieldIndex(number_); | 2639 int field_index = map->instance_descriptors()->GetFieldIndex(number_); |
2640 return field_index - map->inobject_properties(); | 2640 return field_index - map->GetInObjectProperties(); |
2641 } | 2641 } |
2642 | 2642 |
2643 void LookupDescriptor(Map* map, Name* name) { | 2643 void LookupDescriptor(Map* map, Name* name) { |
2644 DescriptorArray* descriptors = map->instance_descriptors(); | 2644 DescriptorArray* descriptors = map->instance_descriptors(); |
2645 int number = descriptors->SearchWithCache(name, map); | 2645 int number = descriptors->SearchWithCache(name, map); |
2646 if (number == DescriptorArray::kNotFound) return NotFound(); | 2646 if (number == DescriptorArray::kNotFound) return NotFound(); |
2647 lookup_type_ = DESCRIPTOR_TYPE; | 2647 lookup_type_ = DESCRIPTOR_TYPE; |
2648 details_ = descriptors->GetDetails(number); | 2648 details_ = descriptors->GetDetails(number); |
2649 number_ = number; | 2649 number_ = number; |
2650 } | 2650 } |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3041 } | 3041 } |
3042 | 3042 |
3043 private: | 3043 private: |
3044 HGraphBuilder* builder_; | 3044 HGraphBuilder* builder_; |
3045 }; | 3045 }; |
3046 | 3046 |
3047 | 3047 |
3048 } } // namespace v8::internal | 3048 } } // namespace v8::internal |
3049 | 3049 |
3050 #endif // V8_HYDROGEN_H_ | 3050 #endif // V8_HYDROGEN_H_ |
OLD | NEW |