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

Side by Side Diff: src/hydrogen.h

Issue 980573002: Simplify and compact transitions storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix -Werror=pedantic ( rebase Created 5 years, 9 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/json-parser.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 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 2546
2547 void LookupDescriptor(Map* map, Name* name) { 2547 void LookupDescriptor(Map* map, Name* name) {
2548 DescriptorArray* descriptors = map->instance_descriptors(); 2548 DescriptorArray* descriptors = map->instance_descriptors();
2549 int number = descriptors->SearchWithCache(name, map); 2549 int number = descriptors->SearchWithCache(name, map);
2550 if (number == DescriptorArray::kNotFound) return NotFound(); 2550 if (number == DescriptorArray::kNotFound) return NotFound();
2551 lookup_type_ = DESCRIPTOR_TYPE; 2551 lookup_type_ = DESCRIPTOR_TYPE;
2552 details_ = descriptors->GetDetails(number); 2552 details_ = descriptors->GetDetails(number);
2553 number_ = number; 2553 number_ = number;
2554 } 2554 }
2555 void LookupTransition(Map* map, Name* name, PropertyAttributes attributes) { 2555 void LookupTransition(Map* map, Name* name, PropertyAttributes attributes) {
2556 int transition_index = map->SearchTransition(kData, name, attributes); 2556 Map* target =
2557 if (transition_index == TransitionArray::kNotFound) return NotFound(); 2557 TransitionArray::SearchTransition(map, kData, name, attributes);
2558 if (target == NULL) return NotFound();
2558 lookup_type_ = TRANSITION_TYPE; 2559 lookup_type_ = TRANSITION_TYPE;
2559 transition_ = handle(map->GetTransition(transition_index)); 2560 transition_ = handle(target);
2560 number_ = transition_->LastAdded(); 2561 number_ = transition_->LastAdded();
2561 details_ = transition_->instance_descriptors()->GetDetails(number_); 2562 details_ = transition_->instance_descriptors()->GetDetails(number_);
2562 } 2563 }
2563 void NotFound() { 2564 void NotFound() {
2564 lookup_type_ = NOT_FOUND; 2565 lookup_type_ = NOT_FOUND;
2565 details_ = PropertyDetails(NONE, DATA, 0); 2566 details_ = PropertyDetails(NONE, DATA, 0);
2566 } 2567 }
2567 Representation representation() const { 2568 Representation representation() const {
2568 DCHECK(IsFound()); 2569 DCHECK(IsFound());
2569 return details_.representation(); 2570 return details_.representation();
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 } 2964 }
2964 2965
2965 private: 2966 private:
2966 HGraphBuilder* builder_; 2967 HGraphBuilder* builder_;
2967 }; 2968 };
2968 2969
2969 2970
2970 } } // namespace v8::internal 2971 } } // namespace v8::internal
2971 2972
2972 #endif // V8_HYDROGEN_H_ 2973 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698