| 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 5906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5917 // It is safe to use [[Put]] here because the boilerplate already | 5917 // It is safe to use [[Put]] here because the boilerplate already |
| 5918 // contains computed properties with an uninitialized value. | 5918 // contains computed properties with an uninitialized value. |
| 5919 if (key->value()->IsInternalizedString()) { | 5919 if (key->value()->IsInternalizedString()) { |
| 5920 if (property->emit_store()) { | 5920 if (property->emit_store()) { |
| 5921 CHECK_ALIVE(VisitForValue(value)); | 5921 CHECK_ALIVE(VisitForValue(value)); |
| 5922 HValue* value = Pop(); | 5922 HValue* value = Pop(); |
| 5923 | 5923 |
| 5924 Handle<Map> map = property->GetReceiverType(); | 5924 Handle<Map> map = property->GetReceiverType(); |
| 5925 Handle<String> name = key->AsPropertyName(); | 5925 Handle<String> name = key->AsPropertyName(); |
| 5926 HValue* store; | 5926 HValue* store; |
| 5927 FeedbackVectorICSlot slot = property->GetSlot(); | 5927 FeedbackVectorSlot slot = property->GetSlot(); |
| 5928 if (map.is_null()) { | 5928 if (map.is_null()) { |
| 5929 // If we don't know the monomorphic type, do a generic store. | 5929 // If we don't know the monomorphic type, do a generic store. |
| 5930 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, literal, | 5930 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, literal, |
| 5931 name, value)); | 5931 name, value)); |
| 5932 } else { | 5932 } else { |
| 5933 PropertyAccessInfo info(this, STORE, map, name); | 5933 PropertyAccessInfo info(this, STORE, map, name); |
| 5934 if (info.CanAccessMonomorphic()) { | 5934 if (info.CanAccessMonomorphic()) { |
| 5935 HValue* checked_literal = Add<HCheckMaps>(literal, map); | 5935 HValue* checked_literal = Add<HCheckMaps>(literal, map); |
| 5936 DCHECK(!info.IsAccessorConstant()); | 5936 DCHECK(!info.IsAccessorConstant()); |
| 5937 store = BuildMonomorphicAccess( | 5937 store = BuildMonomorphicAccess( |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6597 DCHECK(info->IsDataConstant()); | 6597 DCHECK(info->IsDataConstant()); |
| 6598 if (info->IsLoad()) { | 6598 if (info->IsLoad()) { |
| 6599 return New<HConstant>(info->constant()); | 6599 return New<HConstant>(info->constant()); |
| 6600 } else { | 6600 } else { |
| 6601 return New<HCheckValue>(value, Handle<JSFunction>::cast(info->constant())); | 6601 return New<HCheckValue>(value, Handle<JSFunction>::cast(info->constant())); |
| 6602 } | 6602 } |
| 6603 } | 6603 } |
| 6604 | 6604 |
| 6605 | 6605 |
| 6606 void HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess( | 6606 void HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess( |
| 6607 PropertyAccessType access_type, Expression* expr, FeedbackVectorICSlot slot, | 6607 PropertyAccessType access_type, Expression* expr, FeedbackVectorSlot slot, |
| 6608 BailoutId ast_id, BailoutId return_id, HValue* object, HValue* value, | 6608 BailoutId ast_id, BailoutId return_id, HValue* object, HValue* value, |
| 6609 SmallMapList* maps, Handle<String> name) { | 6609 SmallMapList* maps, Handle<String> name) { |
| 6610 // Something did not match; must use a polymorphic load. | 6610 // Something did not match; must use a polymorphic load. |
| 6611 int count = 0; | 6611 int count = 0; |
| 6612 HBasicBlock* join = NULL; | 6612 HBasicBlock* join = NULL; |
| 6613 HBasicBlock* number_block = NULL; | 6613 HBasicBlock* number_block = NULL; |
| 6614 bool handled_string = false; | 6614 bool handled_string = false; |
| 6615 | 6615 |
| 6616 bool handle_smi = false; | 6616 bool handle_smi = false; |
| 6617 STATIC_ASSERT(kMaxLoadPolymorphism == kMaxStorePolymorphism); | 6617 STATIC_ASSERT(kMaxLoadPolymorphism == kMaxStorePolymorphism); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6767 | 6767 |
| 6768 static bool AreStringTypes(SmallMapList* maps) { | 6768 static bool AreStringTypes(SmallMapList* maps) { |
| 6769 for (int i = 0; i < maps->length(); i++) { | 6769 for (int i = 0; i < maps->length(); i++) { |
| 6770 if (maps->at(i)->instance_type() >= FIRST_NONSTRING_TYPE) return false; | 6770 if (maps->at(i)->instance_type() >= FIRST_NONSTRING_TYPE) return false; |
| 6771 } | 6771 } |
| 6772 return true; | 6772 return true; |
| 6773 } | 6773 } |
| 6774 | 6774 |
| 6775 | 6775 |
| 6776 void HOptimizedGraphBuilder::BuildStore(Expression* expr, Property* prop, | 6776 void HOptimizedGraphBuilder::BuildStore(Expression* expr, Property* prop, |
| 6777 FeedbackVectorICSlot slot, | 6777 FeedbackVectorSlot slot, |
| 6778 BailoutId ast_id, BailoutId return_id, | 6778 BailoutId ast_id, BailoutId return_id, |
| 6779 bool is_uninitialized) { | 6779 bool is_uninitialized) { |
| 6780 if (!prop->key()->IsPropertyName()) { | 6780 if (!prop->key()->IsPropertyName()) { |
| 6781 // Keyed store. | 6781 // Keyed store. |
| 6782 HValue* value = Pop(); | 6782 HValue* value = Pop(); |
| 6783 HValue* key = Pop(); | 6783 HValue* key = Pop(); |
| 6784 HValue* object = Pop(); | 6784 HValue* object = Pop(); |
| 6785 bool has_side_effects = false; | 6785 bool has_side_effects = false; |
| 6786 HValue* result = | 6786 HValue* result = |
| 6787 HandleKeyedElementAccess(object, key, value, expr, slot, ast_id, | 6787 HandleKeyedElementAccess(object, key, value, expr, slot, ast_id, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6827 CHECK_ALIVE(VisitForValue(expr->value())); | 6827 CHECK_ALIVE(VisitForValue(expr->value())); |
| 6828 BuildStore(expr, prop, expr->AssignmentSlot(), expr->id(), | 6828 BuildStore(expr, prop, expr->AssignmentSlot(), expr->id(), |
| 6829 expr->AssignmentId(), expr->IsUninitialized()); | 6829 expr->AssignmentId(), expr->IsUninitialized()); |
| 6830 } | 6830 } |
| 6831 | 6831 |
| 6832 | 6832 |
| 6833 // Because not every expression has a position and there is not common | 6833 // Because not every expression has a position and there is not common |
| 6834 // superclass of Assignment and CountOperation, we cannot just pass the | 6834 // superclass of Assignment and CountOperation, we cannot just pass the |
| 6835 // owning expression instead of position and ast_id separately. | 6835 // owning expression instead of position and ast_id separately. |
| 6836 void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( | 6836 void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( |
| 6837 Variable* var, HValue* value, FeedbackVectorICSlot ic_slot, | 6837 Variable* var, HValue* value, FeedbackVectorSlot slot, BailoutId ast_id) { |
| 6838 BailoutId ast_id) { | |
| 6839 Handle<GlobalObject> global(current_info()->global_object()); | 6838 Handle<GlobalObject> global(current_info()->global_object()); |
| 6840 | 6839 |
| 6841 // Lookup in script contexts. | 6840 // Lookup in script contexts. |
| 6842 { | 6841 { |
| 6843 Handle<ScriptContextTable> script_contexts( | 6842 Handle<ScriptContextTable> script_contexts( |
| 6844 global->native_context()->script_context_table()); | 6843 global->native_context()->script_context_table()); |
| 6845 ScriptContextTable::LookupResult lookup; | 6844 ScriptContextTable::LookupResult lookup; |
| 6846 if (ScriptContextTable::Lookup(script_contexts, var->name(), &lookup)) { | 6845 if (ScriptContextTable::Lookup(script_contexts, var->name(), &lookup)) { |
| 6847 if (lookup.mode == CONST) { | 6846 if (lookup.mode == CONST) { |
| 6848 return Bailout(kNonInitializerAssignmentToConst); | 6847 return Bailout(kNonInitializerAssignmentToConst); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6938 } else { | 6937 } else { |
| 6939 HValue* global_object = Add<HLoadNamedField>( | 6938 HValue* global_object = Add<HLoadNamedField>( |
| 6940 context(), nullptr, | 6939 context(), nullptr, |
| 6941 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); | 6940 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); |
| 6942 HStoreNamedGeneric* instr = | 6941 HStoreNamedGeneric* instr = |
| 6943 Add<HStoreNamedGeneric>(global_object, var->name(), value, | 6942 Add<HStoreNamedGeneric>(global_object, var->name(), value, |
| 6944 function_language_mode(), PREMONOMORPHIC); | 6943 function_language_mode(), PREMONOMORPHIC); |
| 6945 if (FLAG_vector_stores) { | 6944 if (FLAG_vector_stores) { |
| 6946 Handle<TypeFeedbackVector> vector = | 6945 Handle<TypeFeedbackVector> vector = |
| 6947 handle(current_feedback_vector(), isolate()); | 6946 handle(current_feedback_vector(), isolate()); |
| 6948 instr->SetVectorAndSlot(vector, ic_slot); | 6947 instr->SetVectorAndSlot(vector, slot); |
| 6949 } | 6948 } |
| 6950 USE(instr); | 6949 USE(instr); |
| 6951 DCHECK(instr->HasObservableSideEffects()); | 6950 DCHECK(instr->HasObservableSideEffects()); |
| 6952 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); | 6951 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); |
| 6953 } | 6952 } |
| 6954 } | 6953 } |
| 6955 | 6954 |
| 6956 | 6955 |
| 6957 void HOptimizedGraphBuilder::HandleCompoundAssignment(Assignment* expr) { | 6956 void HOptimizedGraphBuilder::HandleCompoundAssignment(Assignment* expr) { |
| 6958 Expression* target = expr->target(); | 6957 Expression* target = expr->target(); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7241 if (c_string->HasStringValue()) { | 7240 if (c_string->HasStringValue()) { |
| 7242 return New<HConstant>(c_string->StringValue()->length()); | 7241 return New<HConstant>(c_string->StringValue()->length()); |
| 7243 } | 7242 } |
| 7244 } | 7243 } |
| 7245 return New<HLoadNamedField>(string, nullptr, | 7244 return New<HLoadNamedField>(string, nullptr, |
| 7246 HObjectAccess::ForStringLength()); | 7245 HObjectAccess::ForStringLength()); |
| 7247 } | 7246 } |
| 7248 | 7247 |
| 7249 | 7248 |
| 7250 HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric( | 7249 HInstruction* HOptimizedGraphBuilder::BuildNamedGeneric( |
| 7251 PropertyAccessType access_type, Expression* expr, FeedbackVectorICSlot slot, | 7250 PropertyAccessType access_type, Expression* expr, FeedbackVectorSlot slot, |
| 7252 HValue* object, Handle<Name> name, HValue* value, bool is_uninitialized) { | 7251 HValue* object, Handle<Name> name, HValue* value, bool is_uninitialized) { |
| 7253 if (is_uninitialized) { | 7252 if (is_uninitialized) { |
| 7254 Add<HDeoptimize>( | 7253 Add<HDeoptimize>( |
| 7255 Deoptimizer::kInsufficientTypeFeedbackForGenericNamedAccess, | 7254 Deoptimizer::kInsufficientTypeFeedbackForGenericNamedAccess, |
| 7256 Deoptimizer::SOFT); | 7255 Deoptimizer::SOFT); |
| 7257 } | 7256 } |
| 7258 if (access_type == LOAD) { | 7257 if (access_type == LOAD) { |
| 7259 Handle<TypeFeedbackVector> vector = | 7258 Handle<TypeFeedbackVector> vector = |
| 7260 handle(current_feedback_vector(), isolate()); | 7259 handle(current_feedback_vector(), isolate()); |
| 7261 | 7260 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7298 Handle<TypeFeedbackVector> vector = | 7297 Handle<TypeFeedbackVector> vector = |
| 7299 handle(current_feedback_vector(), isolate()); | 7298 handle(current_feedback_vector(), isolate()); |
| 7300 result->SetVectorAndSlot(vector, slot); | 7299 result->SetVectorAndSlot(vector, slot); |
| 7301 } | 7300 } |
| 7302 return result; | 7301 return result; |
| 7303 } | 7302 } |
| 7304 } | 7303 } |
| 7305 | 7304 |
| 7306 | 7305 |
| 7307 HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric( | 7306 HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric( |
| 7308 PropertyAccessType access_type, Expression* expr, FeedbackVectorICSlot slot, | 7307 PropertyAccessType access_type, Expression* expr, FeedbackVectorSlot slot, |
| 7309 HValue* object, HValue* key, HValue* value) { | 7308 HValue* object, HValue* key, HValue* value) { |
| 7310 if (access_type == LOAD) { | 7309 if (access_type == LOAD) { |
| 7311 InlineCacheState initial_state = expr->AsProperty()->GetInlineCacheState(); | 7310 InlineCacheState initial_state = expr->AsProperty()->GetInlineCacheState(); |
| 7312 HLoadKeyedGeneric* result = New<HLoadKeyedGeneric>( | 7311 HLoadKeyedGeneric* result = New<HLoadKeyedGeneric>( |
| 7313 object, key, function_language_mode(), initial_state); | 7312 object, key, function_language_mode(), initial_state); |
| 7314 // HLoadKeyedGeneric with vector ics benefits from being encoded as | 7313 // HLoadKeyedGeneric with vector ics benefits from being encoded as |
| 7315 // MEGAMORPHIC because the vector/slot combo becomes unnecessary. | 7314 // MEGAMORPHIC because the vector/slot combo becomes unnecessary. |
| 7316 if (initial_state != MEGAMORPHIC) { | 7315 if (initial_state != MEGAMORPHIC) { |
| 7317 // We need to pass vector information. | 7316 // We need to pass vector information. |
| 7318 Handle<TypeFeedbackVector> vector = | 7317 Handle<TypeFeedbackVector> vector = |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7492 } | 7491 } |
| 7493 HInstruction* instr = BuildUncheckedMonomorphicElementAccess( | 7492 HInstruction* instr = BuildUncheckedMonomorphicElementAccess( |
| 7494 checked_object, key, val, | 7493 checked_object, key, val, |
| 7495 most_general_consolidated_map->instance_type() == JS_ARRAY_TYPE, | 7494 most_general_consolidated_map->instance_type() == JS_ARRAY_TYPE, |
| 7496 consolidated_elements_kind, LOAD, load_mode, STANDARD_STORE); | 7495 consolidated_elements_kind, LOAD, load_mode, STANDARD_STORE); |
| 7497 return instr; | 7496 return instr; |
| 7498 } | 7497 } |
| 7499 | 7498 |
| 7500 | 7499 |
| 7501 HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( | 7500 HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( |
| 7502 Expression* expr, FeedbackVectorICSlot slot, HValue* object, HValue* key, | 7501 Expression* expr, FeedbackVectorSlot slot, HValue* object, HValue* key, |
| 7503 HValue* val, SmallMapList* maps, PropertyAccessType access_type, | 7502 HValue* val, SmallMapList* maps, PropertyAccessType access_type, |
| 7504 KeyedAccessStoreMode store_mode, bool* has_side_effects) { | 7503 KeyedAccessStoreMode store_mode, bool* has_side_effects) { |
| 7505 *has_side_effects = false; | 7504 *has_side_effects = false; |
| 7506 BuildCheckHeapObject(object); | 7505 BuildCheckHeapObject(object); |
| 7507 | 7506 |
| 7508 if (access_type == LOAD) { | 7507 if (access_type == LOAD) { |
| 7509 HInstruction* consolidated_load = | 7508 HInstruction* consolidated_load = |
| 7510 TryBuildConsolidatedElementLoad(object, key, val, maps); | 7509 TryBuildConsolidatedElementLoad(object, key, val, maps); |
| 7511 if (consolidated_load != NULL) { | 7510 if (consolidated_load != NULL) { |
| 7512 *has_side_effects |= consolidated_load->HasObservableSideEffects(); | 7511 *has_side_effects |= consolidated_load->HasObservableSideEffects(); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7625 NoObservableSideEffectsScope scope(this); | 7624 NoObservableSideEffectsScope scope(this); |
| 7626 FinishExitWithHardDeoptimization( | 7625 FinishExitWithHardDeoptimization( |
| 7627 Deoptimizer::kUnknownMapInPolymorphicElementAccess); | 7626 Deoptimizer::kUnknownMapInPolymorphicElementAccess); |
| 7628 set_current_block(join); | 7627 set_current_block(join); |
| 7629 return access_type == STORE ? val : Pop(); | 7628 return access_type == STORE ? val : Pop(); |
| 7630 } | 7629 } |
| 7631 | 7630 |
| 7632 | 7631 |
| 7633 HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess( | 7632 HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess( |
| 7634 HValue* obj, HValue* key, HValue* val, Expression* expr, | 7633 HValue* obj, HValue* key, HValue* val, Expression* expr, |
| 7635 FeedbackVectorICSlot slot, BailoutId ast_id, BailoutId return_id, | 7634 FeedbackVectorSlot slot, BailoutId ast_id, BailoutId return_id, |
| 7636 PropertyAccessType access_type, bool* has_side_effects) { | 7635 PropertyAccessType access_type, bool* has_side_effects) { |
| 7637 if (key->ActualValue()->IsConstant()) { | 7636 if (key->ActualValue()->IsConstant()) { |
| 7638 Handle<Object> constant = | 7637 Handle<Object> constant = |
| 7639 HConstant::cast(key->ActualValue())->handle(isolate()); | 7638 HConstant::cast(key->ActualValue())->handle(isolate()); |
| 7640 uint32_t array_index; | 7639 uint32_t array_index; |
| 7641 if (constant->IsString() && | 7640 if (constant->IsString() && |
| 7642 !Handle<String>::cast(constant)->AsArrayIndex(&array_index)) { | 7641 !Handle<String>::cast(constant)->AsArrayIndex(&array_index)) { |
| 7643 if (!constant->IsUniqueName()) { | 7642 if (!constant->IsUniqueName()) { |
| 7644 constant = isolate()->factory()->InternalizeString( | 7643 constant = isolate()->factory()->InternalizeString( |
| 7645 Handle<String>::cast(constant)); | 7644 Handle<String>::cast(constant)); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7810 result = New<HAccessArgumentsAt>(elements, length, checked_key); | 7809 result = New<HAccessArgumentsAt>(elements, length, checked_key); |
| 7811 } | 7810 } |
| 7812 } | 7811 } |
| 7813 ast_context()->ReturnInstruction(result, expr->id()); | 7812 ast_context()->ReturnInstruction(result, expr->id()); |
| 7814 return true; | 7813 return true; |
| 7815 } | 7814 } |
| 7816 | 7815 |
| 7817 | 7816 |
| 7818 HValue* HOptimizedGraphBuilder::BuildNamedAccess( | 7817 HValue* HOptimizedGraphBuilder::BuildNamedAccess( |
| 7819 PropertyAccessType access, BailoutId ast_id, BailoutId return_id, | 7818 PropertyAccessType access, BailoutId ast_id, BailoutId return_id, |
| 7820 Expression* expr, FeedbackVectorICSlot slot, HValue* object, | 7819 Expression* expr, FeedbackVectorSlot slot, HValue* object, |
| 7821 Handle<String> name, HValue* value, bool is_uninitialized) { | 7820 Handle<String> name, HValue* value, bool is_uninitialized) { |
| 7822 SmallMapList* maps; | 7821 SmallMapList* maps; |
| 7823 ComputeReceiverTypes(expr, object, &maps, zone()); | 7822 ComputeReceiverTypes(expr, object, &maps, zone()); |
| 7824 DCHECK(maps != NULL); | 7823 DCHECK(maps != NULL); |
| 7825 | 7824 |
| 7826 if (maps->length() > 0) { | 7825 if (maps->length() > 0) { |
| 7827 PropertyAccessInfo info(this, access, maps->first(), name); | 7826 PropertyAccessInfo info(this, access, maps->first(), name); |
| 7828 if (!info.CanAccessAsMonomorphic(maps)) { | 7827 if (!info.CanAccessAsMonomorphic(maps)) { |
| 7829 HandlePolymorphicNamedFieldAccess(access, expr, slot, ast_id, return_id, | 7828 HandlePolymorphicNamedFieldAccess(access, expr, slot, ast_id, return_id, |
| 7830 object, value, maps, name); | 7829 object, value, maps, name); |
| (...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9759 PushArgumentsFromEnvironment(argument_count); | 9758 PushArgumentsFromEnvironment(argument_count); |
| 9760 HCallFunction* call_function = | 9759 HCallFunction* call_function = |
| 9761 New<HCallFunction>(function, argument_count); | 9760 New<HCallFunction>(function, argument_count); |
| 9762 call = call_function; | 9761 call = call_function; |
| 9763 if (expr->is_uninitialized() && | 9762 if (expr->is_uninitialized() && |
| 9764 expr->IsUsingCallFeedbackICSlot(isolate())) { | 9763 expr->IsUsingCallFeedbackICSlot(isolate())) { |
| 9765 // We've never seen this call before, so let's have Crankshaft learn | 9764 // We've never seen this call before, so let's have Crankshaft learn |
| 9766 // through the type vector. | 9765 // through the type vector. |
| 9767 Handle<TypeFeedbackVector> vector = | 9766 Handle<TypeFeedbackVector> vector = |
| 9768 handle(current_feedback_vector(), isolate()); | 9767 handle(current_feedback_vector(), isolate()); |
| 9769 FeedbackVectorICSlot slot = expr->CallFeedbackICSlot(); | 9768 FeedbackVectorSlot slot = expr->CallFeedbackICSlot(); |
| 9770 call_function->SetVectorAndSlot(vector, slot); | 9769 call_function->SetVectorAndSlot(vector, slot); |
| 9771 } | 9770 } |
| 9772 } | 9771 } |
| 9773 } | 9772 } |
| 9774 | 9773 |
| 9775 Drop(1); // Drop the function. | 9774 Drop(1); // Drop the function. |
| 9776 return ast_context()->ReturnInstruction(call, expr->id()); | 9775 return ast_context()->ReturnInstruction(call, expr->id()); |
| 9777 } | 9776 } |
| 9778 | 9777 |
| 9779 | 9778 |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10616 instr->ClearAllSideEffects(); | 10615 instr->ClearAllSideEffects(); |
| 10617 } else { | 10616 } else { |
| 10618 Add<HSimulate>(expr->ToNumberId(), REMOVABLE_SIMULATE); | 10617 Add<HSimulate>(expr->ToNumberId(), REMOVABLE_SIMULATE); |
| 10619 } | 10618 } |
| 10620 instr->SetFlag(HInstruction::kCannotBeTagged); | 10619 instr->SetFlag(HInstruction::kCannotBeTagged); |
| 10621 return instr; | 10620 return instr; |
| 10622 } | 10621 } |
| 10623 | 10622 |
| 10624 | 10623 |
| 10625 void HOptimizedGraphBuilder::BuildStoreForEffect( | 10624 void HOptimizedGraphBuilder::BuildStoreForEffect( |
| 10626 Expression* expr, Property* prop, FeedbackVectorICSlot slot, | 10625 Expression* expr, Property* prop, FeedbackVectorSlot slot, BailoutId ast_id, |
| 10627 BailoutId ast_id, BailoutId return_id, HValue* object, HValue* key, | 10626 BailoutId return_id, HValue* object, HValue* key, HValue* value) { |
| 10628 HValue* value) { | |
| 10629 EffectContext for_effect(this); | 10627 EffectContext for_effect(this); |
| 10630 Push(object); | 10628 Push(object); |
| 10631 if (key != NULL) Push(key); | 10629 if (key != NULL) Push(key); |
| 10632 Push(value); | 10630 Push(value); |
| 10633 BuildStore(expr, prop, slot, ast_id, return_id); | 10631 BuildStore(expr, prop, slot, ast_id, return_id); |
| 10634 } | 10632 } |
| 10635 | 10633 |
| 10636 | 10634 |
| 10637 void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) { | 10635 void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) { |
| 10638 DCHECK(!HasStackOverflow()); | 10636 DCHECK(!HasStackOverflow()); |
| (...skipping 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13646 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13644 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13647 } | 13645 } |
| 13648 | 13646 |
| 13649 #ifdef DEBUG | 13647 #ifdef DEBUG |
| 13650 graph_->Verify(false); // No full verify. | 13648 graph_->Verify(false); // No full verify. |
| 13651 #endif | 13649 #endif |
| 13652 } | 13650 } |
| 13653 | 13651 |
| 13654 } // namespace internal | 13652 } // namespace internal |
| 13655 } // namespace v8 | 13653 } // namespace v8 |
| OLD | NEW |