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

Unified Diff: src/hydrogen.cc

Issue 10697015: Separating transitions from descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Using WhitenessWitness in TransitionArray code. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/handles.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index a1ec78eda4c2859295a69bdde6f5ca8e18e26bfd..43fe1d812fda43f3561d5ce3ebaf815c944d41e3 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4918,17 +4918,18 @@ static bool ComputeLoadStoreField(Handle<Map> type,
Handle<String> name,
LookupResult* lookup,
bool is_store) {
- type->LookupInDescriptors(NULL, *name, lookup);
+ type->LookupTransitionOrDescriptor(NULL, *name, lookup);
if (lookup->IsField()) return true;
- return is_store && lookup->IsMapTransition() &&
- (type->unused_property_fields() > 0);
+ return is_store &&
+ lookup->IsTransitionToField(*type) &&
+ (type->unused_property_fields() > 0);
}
static int ComputeLoadStoreFieldIndex(Handle<Map> type,
Handle<String> name,
LookupResult* lookup) {
- ASSERT(lookup->IsField() || lookup->type() == MAP_TRANSITION);
+ ASSERT(lookup->IsField() || lookup->IsTransitionToField(*type));
if (lookup->IsField()) {
return lookup->GetLocalFieldIndexFromMap(*type);
} else {
@@ -4989,7 +4990,7 @@ HInstruction* HGraphBuilder::BuildStoreNamedField(HValue* object,
}
HStoreNamedField* instr =
new(zone()) HStoreNamedField(object, name, value, is_in_object, offset);
- if (lookup->type() == MAP_TRANSITION) {
+ if (lookup->IsTransitionToField(*type)) {
Handle<Map> transition(lookup->GetTransitionMapFromMap(*type));
instr->set_transition(transition);
// TODO(fschneider): Record the new map type of the object in the IR to
@@ -5627,7 +5628,7 @@ HInstruction* HGraphBuilder::BuildLoadNamed(HValue* obj,
Handle<Map> map,
Handle<String> name) {
LookupResult lookup(isolate());
- map->LookupInDescriptors(NULL, *name, &lookup);
+ map->LookupDescriptor(NULL, *name, &lookup);
if (lookup.IsField()) {
return BuildLoadNamedField(obj,
expr,
« no previous file with comments | « src/handles.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698