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