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

Side by Side Diff: src/hydrogen.h

Issue 1276533003: [runtime] Store constructor function index on primitive maps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm failures Created 5 years, 4 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/heap/objects-visiting-inl.h ('k') | src/hydrogen.cc » ('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 #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
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
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_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698