OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 6136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6147 name_.is_identical_to(isolate()->factory()->prototype_string())) { | 6147 name_.is_identical_to(isolate()->factory()->prototype_string())) { |
6148 return IsLoad(); | 6148 return IsLoad(); |
6149 } | 6149 } |
6150 if (!LookupDescriptor()) return false; | 6150 if (!LookupDescriptor()) return false; |
6151 if (IsFound()) return IsLoad() || !IsReadOnly(); | 6151 if (IsFound()) return IsLoad() || !IsReadOnly(); |
6152 if (!LookupInPrototypes()) return false; | 6152 if (!LookupInPrototypes()) return false; |
6153 if (IsLoad()) return true; | 6153 if (IsLoad()) return true; |
6154 | 6154 |
6155 if (IsAccessor()) return true; | 6155 if (IsAccessor()) return true; |
6156 Handle<Map> map = this->map(); | 6156 Handle<Map> map = this->map(); |
6157 map->LookupTransition(NULL, *name_, NONE, &lookup_); | 6157 map->LookupTransition(NULL, *name_, &lookup_); |
6158 if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) { | 6158 if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) { |
6159 // Construct the object field access. | 6159 // Construct the object field access. |
6160 int descriptor = transition()->LastAdded(); | 6160 int descriptor = transition()->LastAdded(); |
6161 int index = | 6161 int index = |
6162 transition()->instance_descriptors()->GetFieldIndex(descriptor) - | 6162 transition()->instance_descriptors()->GetFieldIndex(descriptor) - |
6163 map->inobject_properties(); | 6163 map->inobject_properties(); |
6164 PropertyDetails details = | 6164 PropertyDetails details = |
6165 transition()->instance_descriptors()->GetDetails(descriptor); | 6165 transition()->instance_descriptors()->GetDetails(descriptor); |
6166 Representation representation = details.representation(); | 6166 Representation representation = details.representation(); |
6167 access_ = HObjectAccess::ForField(map, index, representation, name_); | 6167 access_ = HObjectAccess::ForField(map, index, representation, name_); |
(...skipping 6571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12739 if (ShouldProduceTraceOutput()) { | 12739 if (ShouldProduceTraceOutput()) { |
12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12740 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12741 } | 12741 } |
12742 | 12742 |
12743 #ifdef DEBUG | 12743 #ifdef DEBUG |
12744 graph_->Verify(false); // No full verify. | 12744 graph_->Verify(false); // No full verify. |
12745 #endif | 12745 #endif |
12746 } | 12746 } |
12747 | 12747 |
12748 } } // namespace v8::internal | 12748 } } // namespace v8::internal |
OLD | NEW |