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 6096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6107 name_.is_identical_to(isolate()->factory()->prototype_string())) { | 6107 name_.is_identical_to(isolate()->factory()->prototype_string())) { |
6108 return IsLoad(); | 6108 return IsLoad(); |
6109 } | 6109 } |
6110 if (!LookupDescriptor()) return false; | 6110 if (!LookupDescriptor()) return false; |
6111 if (IsFound()) return IsLoad() || !IsReadOnly(); | 6111 if (IsFound()) return IsLoad() || !IsReadOnly(); |
6112 if (!LookupInPrototypes()) return false; | 6112 if (!LookupInPrototypes()) return false; |
6113 if (IsLoad()) return true; | 6113 if (IsLoad()) return true; |
6114 | 6114 |
6115 if (IsAccessor()) return true; | 6115 if (IsAccessor()) return true; |
6116 Handle<Map> map = this->map(); | 6116 Handle<Map> map = this->map(); |
6117 map->LookupTransition(NULL, *name_, &lookup_); | 6117 map->LookupTransition(NULL, *name_, NONE, &lookup_); |
6118 if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) { | 6118 if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) { |
6119 // Construct the object field access. | 6119 // Construct the object field access. |
6120 int descriptor = transition()->LastAdded(); | 6120 int descriptor = transition()->LastAdded(); |
6121 int index = | 6121 int index = |
6122 transition()->instance_descriptors()->GetFieldIndex(descriptor) - | 6122 transition()->instance_descriptors()->GetFieldIndex(descriptor) - |
6123 map->inobject_properties(); | 6123 map->inobject_properties(); |
6124 PropertyDetails details = | 6124 PropertyDetails details = |
6125 transition()->instance_descriptors()->GetDetails(descriptor); | 6125 transition()->instance_descriptors()->GetDetails(descriptor); |
6126 Representation representation = details.representation(); | 6126 Representation representation = details.representation(); |
6127 access_ = HObjectAccess::ForField(map, index, representation, name_); | 6127 access_ = HObjectAccess::ForField(map, index, representation, name_); |
(...skipping 6544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12672 if (ShouldProduceTraceOutput()) { | 12672 if (ShouldProduceTraceOutput()) { |
12673 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12673 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12674 } | 12674 } |
12675 | 12675 |
12676 #ifdef DEBUG | 12676 #ifdef DEBUG |
12677 graph_->Verify(false); // No full verify. | 12677 graph_->Verify(false); // No full verify. |
12678 #endif | 12678 #endif |
12679 } | 12679 } |
12680 | 12680 |
12681 } } // namespace v8::internal | 12681 } } // namespace v8::internal |
OLD | NEW |