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 6843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6854 | 6854 |
6855 | 6855 |
6856 | 6856 |
6857 HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric( | 6857 HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric( |
6858 PropertyAccessType access_type, | 6858 PropertyAccessType access_type, |
6859 Expression* expr, | 6859 Expression* expr, |
6860 HValue* object, | 6860 HValue* object, |
6861 HValue* key, | 6861 HValue* key, |
6862 HValue* value) { | 6862 HValue* value) { |
6863 if (access_type == LOAD) { | 6863 if (access_type == LOAD) { |
6864 HLoadKeyedGeneric* result = New<HLoadKeyedGeneric>(object, key); | 6864 HLoadKeyedGeneric* result = |
| 6865 New<HLoadKeyedGeneric>(object, key, PREMONOMORPHIC); |
6865 if (FLAG_vector_ics) { | 6866 if (FLAG_vector_ics) { |
6866 Handle<SharedFunctionInfo> current_shared = | 6867 Handle<SharedFunctionInfo> current_shared = |
6867 function_state()->compilation_info()->shared_info(); | 6868 function_state()->compilation_info()->shared_info(); |
6868 Handle<TypeFeedbackVector> vector = | 6869 Handle<TypeFeedbackVector> vector = |
6869 handle(current_shared->feedback_vector(), isolate()); | 6870 handle(current_shared->feedback_vector(), isolate()); |
6870 FeedbackVectorICSlot slot = expr->AsProperty()->PropertyFeedbackSlot(); | 6871 FeedbackVectorICSlot slot = expr->AsProperty()->PropertyFeedbackSlot(); |
6871 result->SetVectorAndSlot(vector, slot); | 6872 result->SetVectorAndSlot(vector, slot); |
6872 } | 6873 } |
6873 return result; | 6874 return result; |
6874 } else { | 6875 } else { |
6875 return New<HStoreKeyedGeneric>(object, key, value, | 6876 return New<HStoreKeyedGeneric>(object, key, value, function_language_mode(), |
6876 function_language_mode()); | 6877 PREMONOMORPHIC); |
6877 } | 6878 } |
6878 } | 6879 } |
6879 | 6880 |
6880 | 6881 |
6881 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) { | 6882 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) { |
6882 // Loads from a "stock" fast holey double arrays can elide the hole check. | 6883 // Loads from a "stock" fast holey double arrays can elide the hole check. |
6883 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE; | 6884 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE; |
6884 if (*map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS) && | 6885 if (*map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS) && |
6885 isolate()->IsFastArrayConstructorPrototypeChainIntact()) { | 6886 isolate()->IsFastArrayConstructorPrototypeChainIntact()) { |
6886 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate()); | 6887 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate()); |
(...skipping 6551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13438 if (ShouldProduceTraceOutput()) { | 13439 if (ShouldProduceTraceOutput()) { |
13439 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13440 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13440 } | 13441 } |
13441 | 13442 |
13442 #ifdef DEBUG | 13443 #ifdef DEBUG |
13443 graph_->Verify(false); // No full verify. | 13444 graph_->Verify(false); // No full verify. |
13444 #endif | 13445 #endif |
13445 } | 13446 } |
13446 | 13447 |
13447 } } // namespace v8::internal | 13448 } } // namespace v8::internal |
OLD | NEW |