| 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/allocation-site-scopes.h" |      9 #include "src/allocation-site-scopes.h" | 
|     10 #include "src/ast-numbering.h" |     10 #include "src/ast-numbering.h" | 
| (...skipping 6400 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   6411   InstanceType instance_type = map_->instance_type(); |   6411   InstanceType instance_type = map_->instance_type(); | 
|   6412   return instance_type == JS_TYPED_ARRAY_TYPE && name_->IsString() && |   6412   return instance_type == JS_TYPED_ARRAY_TYPE && name_->IsString() && | 
|   6413          IsSpecialIndex(isolate()->unicode_cache(), String::cast(*name_)); |   6413          IsSpecialIndex(isolate()->unicode_cache(), String::cast(*name_)); | 
|   6414 } |   6414 } | 
|   6415  |   6415  | 
|   6416  |   6416  | 
|   6417 bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() { |   6417 bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() { | 
|   6418   if (!CanInlinePropertyAccess(map_)) return false; |   6418   if (!CanInlinePropertyAccess(map_)) return false; | 
|   6419   if (IsJSObjectFieldAccessor()) return IsLoad(); |   6419   if (IsJSObjectFieldAccessor()) return IsLoad(); | 
|   6420   if (IsJSArrayBufferViewFieldAccessor()) return IsLoad(); |   6420   if (IsJSArrayBufferViewFieldAccessor()) return IsLoad(); | 
|   6421   if (map_->IsJSFunctionMap() && map_->is_constructor() && |   6421   if (map_->function_with_prototype() && !map_->has_non_instance_prototype() && | 
|   6422       !map_->has_non_instance_prototype() && |  | 
|   6423       name_.is_identical_to(isolate()->factory()->prototype_string())) { |   6422       name_.is_identical_to(isolate()->factory()->prototype_string())) { | 
|   6424     return IsLoad(); |   6423     return IsLoad(); | 
|   6425   } |   6424   } | 
|   6426   if (!LookupDescriptor()) return false; |   6425   if (!LookupDescriptor()) return false; | 
|   6427   if (IsFound()) return IsLoad() || !IsReadOnly(); |   6426   if (IsFound()) return IsLoad() || !IsReadOnly(); | 
|   6428   if (IsIntegerIndexedExotic()) return false; |   6427   if (IsIntegerIndexedExotic()) return false; | 
|   6429   if (!LookupInPrototypes()) return false; |   6428   if (!LookupInPrototypes()) return false; | 
|   6430   if (IsLoad()) return true; |   6429   if (IsLoad()) return true; | 
|   6431  |   6430  | 
|   6432   if (IsAccessorConstant()) return true; |   6431   if (IsAccessorConstant()) return true; | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   6526     return New<HLoadNamedField>(object, checked_object, access); |   6525     return New<HLoadNamedField>(object, checked_object, access); | 
|   6527   } |   6526   } | 
|   6528  |   6527  | 
|   6529   if (info->GetJSArrayBufferViewFieldAccess(&access)) { |   6528   if (info->GetJSArrayBufferViewFieldAccess(&access)) { | 
|   6530     DCHECK(info->IsLoad()); |   6529     DCHECK(info->IsLoad()); | 
|   6531     checked_object = Add<HCheckArrayBufferNotNeutered>(checked_object); |   6530     checked_object = Add<HCheckArrayBufferNotNeutered>(checked_object); | 
|   6532     return New<HLoadNamedField>(object, checked_object, access); |   6531     return New<HLoadNamedField>(object, checked_object, access); | 
|   6533   } |   6532   } | 
|   6534  |   6533  | 
|   6535   if (info->name().is_identical_to(isolate()->factory()->prototype_string()) && |   6534   if (info->name().is_identical_to(isolate()->factory()->prototype_string()) && | 
|   6536       info->map()->IsJSFunctionMap() && info->map()->is_constructor()) { |   6535       info->map()->function_with_prototype()) { | 
|   6537     DCHECK(!info->map()->has_non_instance_prototype()); |   6536     DCHECK(!info->map()->has_non_instance_prototype()); | 
|   6538     return New<HLoadFunctionPrototype>(checked_object); |   6537     return New<HLoadFunctionPrototype>(checked_object); | 
|   6539   } |   6538   } | 
|   6540  |   6539  | 
|   6541   HValue* checked_holder = checked_object; |   6540   HValue* checked_holder = checked_object; | 
|   6542   if (info->has_holder()) { |   6541   if (info->has_holder()) { | 
|   6543     Handle<JSObject> prototype(JSObject::cast(info->map()->prototype())); |   6542     Handle<JSObject> prototype(JSObject::cast(info->map()->prototype())); | 
|   6544     checked_holder = BuildCheckPrototypeMaps(prototype, info->holder()); |   6543     checked_holder = BuildCheckPrototypeMaps(prototype, info->holder()); | 
|   6545   } |   6544   } | 
|   6546  |   6545  | 
| (...skipping 7074 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  13621     isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |  13620     isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 
|  13622   } |  13621   } | 
|  13623  |  13622  | 
|  13624 #ifdef DEBUG |  13623 #ifdef DEBUG | 
|  13625   graph_->Verify(false);  // No full verify. |  13624   graph_->Verify(false);  // No full verify. | 
|  13626 #endif |  13625 #endif | 
|  13627 } |  13626 } | 
|  13628  |  13627  | 
|  13629 }  // namespace internal |  13628 }  // namespace internal | 
|  13630 }  // namespace v8 |  13629 }  // namespace v8 | 
| OLD | NEW |