OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4757 switch (property->kind()) { | 4757 switch (property->kind()) { |
4758 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 4758 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
4759 ASSERT(!CompileTimeValue::IsCompileTimeValue(value)); | 4759 ASSERT(!CompileTimeValue::IsCompileTimeValue(value)); |
4760 // Fall through. | 4760 // Fall through. |
4761 case ObjectLiteral::Property::COMPUTED: | 4761 case ObjectLiteral::Property::COMPUTED: |
4762 if (key->handle()->IsSymbol()) { | 4762 if (key->handle()->IsSymbol()) { |
4763 if (property->emit_store()) { | 4763 if (property->emit_store()) { |
4764 property->RecordTypeFeedback(oracle()); | 4764 property->RecordTypeFeedback(oracle()); |
4765 CHECK_ALIVE(VisitForValue(value)); | 4765 CHECK_ALIVE(VisitForValue(value)); |
4766 HValue* value = Pop(); | 4766 HValue* value = Pop(); |
| 4767 Handle<Map> map = property->GetReceiverType(); |
4767 Handle<String> name = property->key()->AsPropertyName(); | 4768 Handle<String> name = property->key()->AsPropertyName(); |
4768 HInstruction* store; | 4769 HInstruction* store; |
4769 CHECK_ALIVE(store = BuildStoreNamed(literal, | 4770 if (map.is_null()) { |
4770 name, | 4771 // If we don't know the monomorphic type, do a generic store. |
4771 value, | 4772 CHECK_ALIVE(store = BuildStoreNamedGeneric(literal, name, value)); |
4772 property->GetReceiverType())); | 4773 } else { |
| 4774 CHECK_ALIVE(store = BuildStoreNamedMonomorphic(literal, |
| 4775 name, |
| 4776 value, |
| 4777 map)); |
| 4778 } |
4773 AddInstruction(store); | 4779 AddInstruction(store); |
4774 if (store->HasObservableSideEffects()) AddSimulate(key->id()); | 4780 if (store->HasObservableSideEffects()) AddSimulate(key->id()); |
4775 } else { | 4781 } else { |
4776 CHECK_ALIVE(VisitForEffect(value)); | 4782 CHECK_ALIVE(VisitForEffect(value)); |
4777 } | 4783 } |
4778 break; | 4784 break; |
4779 } | 4785 } |
4780 // Fall through. | 4786 // Fall through. |
4781 case ObjectLiteral::Property::PROTOTYPE: | 4787 case ObjectLiteral::Property::PROTOTYPE: |
4782 case ObjectLiteral::Property::SETTER: | 4788 case ObjectLiteral::Property::SETTER: |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5032 Handle<AccessorPair> accessors, | 5038 Handle<AccessorPair> accessors, |
5033 Handle<JSObject> holder) { | 5039 Handle<JSObject> holder) { |
5034 Handle<JSFunction> setter(JSFunction::cast(accessors->setter())); | 5040 Handle<JSFunction> setter(JSFunction::cast(accessors->setter())); |
5035 AddCheckConstantFunction(holder, object, map, true); | 5041 AddCheckConstantFunction(holder, object, map, true); |
5036 AddInstruction(new(zone()) HPushArgument(object)); | 5042 AddInstruction(new(zone()) HPushArgument(object)); |
5037 AddInstruction(new(zone()) HPushArgument(value)); | 5043 AddInstruction(new(zone()) HPushArgument(value)); |
5038 return new(zone()) HCallConstantFunction(setter, 2); | 5044 return new(zone()) HCallConstantFunction(setter, 2); |
5039 } | 5045 } |
5040 | 5046 |
5041 | 5047 |
5042 HInstruction* HGraphBuilder::BuildStoreNamed(HValue* object, | 5048 HInstruction* HGraphBuilder::BuildStoreNamedMonomorphic(HValue* object, |
5043 Handle<String> name, | 5049 Handle<String> name, |
5044 HValue* value, | 5050 HValue* value, |
5045 Handle<Map> map) { | 5051 Handle<Map> map) { |
5046 // If we don't know the monomorphic type, do a generic store. | |
5047 if (map.is_null()) return BuildStoreNamedGeneric(object, name, value); | |
5048 | |
5049 // Handle a store to a known field. | 5052 // Handle a store to a known field. |
5050 LookupResult lookup(isolate()); | 5053 LookupResult lookup(isolate()); |
5051 if (ComputeLoadStoreField(map, name, &lookup, true)) { | 5054 if (ComputeLoadStoreField(map, name, &lookup, true)) { |
5052 // true = needs smi and map check. | 5055 // true = needs smi and map check. |
5053 return BuildStoreNamedField(object, name, value, map, &lookup, true); | 5056 return BuildStoreNamedField(object, name, value, map, &lookup, true); |
5054 } | 5057 } |
5055 | 5058 |
5056 // Handle a known setter directly in the receiver. | 5059 // Handle a known setter directly in the receiver. |
5057 map->LookupDescriptor(NULL, *name, &lookup); | 5060 map->LookupDescriptor(NULL, *name, &lookup); |
5058 if (lookup.IsPropertyCallbacks()) { | 5061 if (lookup.IsPropertyCallbacks()) { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5226 CHECK_ALIVE(VisitForValue(expr->value())); | 5229 CHECK_ALIVE(VisitForValue(expr->value())); |
5227 value = Pop(); | 5230 value = Pop(); |
5228 HValue* object = Pop(); | 5231 HValue* object = Pop(); |
5229 | 5232 |
5230 Literal* key = prop->key()->AsLiteral(); | 5233 Literal* key = prop->key()->AsLiteral(); |
5231 Handle<String> name = Handle<String>::cast(key->handle()); | 5234 Handle<String> name = Handle<String>::cast(key->handle()); |
5232 ASSERT(!name.is_null()); | 5235 ASSERT(!name.is_null()); |
5233 | 5236 |
5234 SmallMapList* types = expr->GetReceiverTypes(); | 5237 SmallMapList* types = expr->GetReceiverTypes(); |
5235 if (expr->IsMonomorphic()) { | 5238 if (expr->IsMonomorphic()) { |
5236 CHECK_ALIVE(instr = BuildStoreNamed(object, | 5239 Handle<Map> map = types->first(); |
5237 name, | 5240 CHECK_ALIVE(instr = BuildStoreNamedMonomorphic(object, name, value, map)); |
5238 value, | |
5239 types->first())); | |
5240 | |
5241 } else if (types != NULL && types->length() > 1) { | 5241 } else if (types != NULL && types->length() > 1) { |
5242 HandlePolymorphicStoreNamedField(expr, object, value, types, name); | 5242 HandlePolymorphicStoreNamedField(expr, object, value, types, name); |
5243 return; | 5243 return; |
5244 | 5244 |
5245 } else { | 5245 } else { |
5246 instr = BuildStoreNamedGeneric(object, name, value); | 5246 instr = BuildStoreNamedGeneric(object, name, value); |
5247 } | 5247 } |
5248 | 5248 |
5249 } else { | 5249 } else { |
5250 // Keyed store. | 5250 // Keyed store. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5394 if (prop->key()->IsPropertyName()) { | 5394 if (prop->key()->IsPropertyName()) { |
5395 // Named property. | 5395 // Named property. |
5396 CHECK_ALIVE(VisitForValue(prop->obj())); | 5396 CHECK_ALIVE(VisitForValue(prop->obj())); |
5397 HValue* object = Top(); | 5397 HValue* object = Top(); |
5398 | 5398 |
5399 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName(); | 5399 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName(); |
5400 Handle<Map> map; | 5400 Handle<Map> map; |
5401 HInstruction* load; | 5401 HInstruction* load; |
5402 if (prop->IsMonomorphic()) { | 5402 if (prop->IsMonomorphic()) { |
5403 map = prop->GetReceiverTypes()->first(); | 5403 map = prop->GetReceiverTypes()->first(); |
5404 load = BuildLoadNamed(object, name, prop, map); | 5404 load = BuildLoadNamedMonomorphic(object, name, prop, map); |
5405 } else { | 5405 } else { |
5406 load = BuildLoadNamedGeneric(object, name, prop); | 5406 load = BuildLoadNamedGeneric(object, name, prop); |
5407 } | 5407 } |
5408 PushAndAdd(load); | 5408 PushAndAdd(load); |
5409 if (load->HasObservableSideEffects()) AddSimulate(expr->CompoundLoadId()); | 5409 if (load->HasObservableSideEffects()) AddSimulate(expr->CompoundLoadId()); |
5410 | 5410 |
5411 CHECK_ALIVE(VisitForValue(expr->value())); | 5411 CHECK_ALIVE(VisitForValue(expr->value())); |
5412 HValue* right = Pop(); | 5412 HValue* right = Pop(); |
5413 HValue* left = Pop(); | 5413 HValue* left = Pop(); |
5414 | 5414 |
5415 HInstruction* instr = BuildBinaryOperation(operation, left, right); | 5415 HInstruction* instr = BuildBinaryOperation(operation, left, right); |
5416 PushAndAdd(instr); | 5416 PushAndAdd(instr); |
5417 if (instr->HasObservableSideEffects()) AddSimulate(operation->id()); | 5417 if (instr->HasObservableSideEffects()) AddSimulate(operation->id()); |
5418 | 5418 |
5419 HInstruction* store; | 5419 HInstruction* store; |
5420 CHECK_ALIVE(store = BuildStoreNamed(object, name, instr, map)); | 5420 if (map.is_null()) { |
| 5421 // If we don't know the monomorphic type, do a generic store. |
| 5422 CHECK_ALIVE(store = BuildStoreNamedGeneric(object, name, instr)); |
| 5423 } else { |
| 5424 CHECK_ALIVE(store = BuildStoreNamedMonomorphic(object, |
| 5425 name, |
| 5426 instr, |
| 5427 map)); |
| 5428 } |
5421 AddInstruction(store); | 5429 AddInstruction(store); |
5422 // Drop the simulated receiver and value. Return the value. | 5430 // Drop the simulated receiver and value. Return the value. |
5423 Drop(2); | 5431 Drop(2); |
5424 Push(instr); | 5432 Push(instr); |
5425 if (store->HasObservableSideEffects()) AddSimulate(expr->AssignmentId()); | 5433 if (store->HasObservableSideEffects()) AddSimulate(expr->AssignmentId()); |
5426 return ast_context()->ReturnValue(Pop()); | 5434 return ast_context()->ReturnValue(Pop()); |
5427 | 5435 |
5428 } else { | 5436 } else { |
5429 // Keyed property. | 5437 // Keyed property. |
5430 CHECK_ALIVE(VisitForValue(prop->obj())); | 5438 CHECK_ALIVE(VisitForValue(prop->obj())); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5633 int offset = (index * kPointerSize) + map->instance_size(); | 5641 int offset = (index * kPointerSize) + map->instance_size(); |
5634 return new(zone()) HLoadNamedField(object, true, offset); | 5642 return new(zone()) HLoadNamedField(object, true, offset); |
5635 } else { | 5643 } else { |
5636 // Non-negative property indices are in the properties array. | 5644 // Non-negative property indices are in the properties array. |
5637 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; | 5645 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; |
5638 return new(zone()) HLoadNamedField(object, false, offset); | 5646 return new(zone()) HLoadNamedField(object, false, offset); |
5639 } | 5647 } |
5640 } | 5648 } |
5641 | 5649 |
5642 | 5650 |
5643 HInstruction* HGraphBuilder::BuildLoadNamedGeneric(HValue* obj, | 5651 HInstruction* HGraphBuilder::BuildLoadNamedGeneric(HValue* object, |
5644 Handle<String> name, | 5652 Handle<String> name, |
5645 Property* expr) { | 5653 Property* expr) { |
5646 if (expr->IsUninitialized() && !FLAG_always_opt) { | 5654 if (expr->IsUninitialized() && !FLAG_always_opt) { |
5647 AddInstruction(new(zone()) HSoftDeoptimize); | 5655 AddInstruction(new(zone()) HSoftDeoptimize); |
5648 current_block()->MarkAsDeoptimizing(); | 5656 current_block()->MarkAsDeoptimizing(); |
5649 } | 5657 } |
5650 HValue* context = environment()->LookupContext(); | 5658 HValue* context = environment()->LookupContext(); |
5651 return new(zone()) HLoadNamedGeneric(context, obj, name); | 5659 return new(zone()) HLoadNamedGeneric(context, object, name); |
5652 } | 5660 } |
5653 | 5661 |
5654 | 5662 |
5655 HInstruction* HGraphBuilder::BuildCallGetter(HValue* object, | 5663 HInstruction* HGraphBuilder::BuildCallGetter(HValue* object, |
5656 Handle<Map> map, | 5664 Handle<Map> map, |
5657 Handle<AccessorPair> accessors, | 5665 Handle<AccessorPair> accessors, |
5658 Handle<JSObject> holder) { | 5666 Handle<JSObject> holder) { |
5659 Handle<JSFunction> getter(JSFunction::cast(accessors->getter())); | 5667 Handle<JSFunction> getter(JSFunction::cast(accessors->getter())); |
5660 AddCheckConstantFunction(holder, object, map, true); | 5668 AddCheckConstantFunction(holder, object, map, true); |
5661 AddInstruction(new(zone()) HPushArgument(object)); | 5669 AddInstruction(new(zone()) HPushArgument(object)); |
5662 return new(zone()) HCallConstantFunction(getter, 1); | 5670 return new(zone()) HCallConstantFunction(getter, 1); |
5663 } | 5671 } |
5664 | 5672 |
5665 | 5673 |
5666 HInstruction* HGraphBuilder::BuildLoadNamed(HValue* object, | 5674 HInstruction* HGraphBuilder::BuildLoadNamedMonomorphic(HValue* object, |
5667 Handle<String> name, | 5675 Handle<String> name, |
5668 Property* expr, | 5676 Property* expr, |
5669 Handle<Map> map) { | 5677 Handle<Map> map) { |
| 5678 // Handle a load from a known field. |
5670 LookupResult lookup(isolate()); | 5679 LookupResult lookup(isolate()); |
5671 map->LookupDescriptor(NULL, *name, &lookup); | 5680 map->LookupDescriptor(NULL, *name, &lookup); |
5672 if (lookup.IsField()) { | 5681 if (lookup.IsField()) { |
5673 return BuildLoadNamedField(object, map, &lookup, true); | 5682 return BuildLoadNamedField(object, map, &lookup, true); |
5674 } else if (lookup.IsConstantFunction()) { | 5683 } |
| 5684 |
| 5685 // Handle a load of a constant known function. |
| 5686 if (lookup.IsConstantFunction()) { |
5675 AddInstruction(new(zone()) HCheckNonSmi(object)); | 5687 AddInstruction(new(zone()) HCheckNonSmi(object)); |
5676 AddInstruction(HCheckMaps::NewWithTransitions(object, map, zone())); | 5688 AddInstruction(HCheckMaps::NewWithTransitions(object, map, zone())); |
5677 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*map)); | 5689 Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*map)); |
5678 return new(zone()) HConstant(function, Representation::Tagged()); | 5690 return new(zone()) HConstant(function, Representation::Tagged()); |
5679 } else if (lookup.IsPropertyCallbacks()) { | 5691 } |
| 5692 |
| 5693 // Handle a known getter directly in the receiver. |
| 5694 if (lookup.IsPropertyCallbacks()) { |
5680 Handle<Object> callback(lookup.GetValueFromMap(*map)); | 5695 Handle<Object> callback(lookup.GetValueFromMap(*map)); |
5681 Handle<JSObject> holder; | 5696 Handle<JSObject> holder; |
5682 if (!callback->IsAccessorPair()) { | 5697 if (!callback->IsAccessorPair()) { |
5683 return BuildLoadNamedGeneric(object, name, expr); | 5698 return BuildLoadNamedGeneric(object, name, expr); |
5684 } | 5699 } |
5685 Handle<AccessorPair> accessors = Handle<AccessorPair>::cast(callback); | 5700 Handle<AccessorPair> accessors = Handle<AccessorPair>::cast(callback); |
5686 return BuildCallGetter(object, map, accessors, holder); | 5701 return BuildCallGetter(object, map, accessors, holder); |
5687 } else { | 5702 } |
5688 LookupInPrototypes(map, name, &lookup); | 5703 |
5689 if (lookup.IsPropertyCallbacks()) { | 5704 // Handle a known getter somewhere in the prototype chain. |
5690 Handle<Object> callback(lookup.GetValue()); | 5705 LookupInPrototypes(map, name, &lookup); |
| 5706 if (lookup.IsPropertyCallbacks()) { |
| 5707 Handle<Object> callback(lookup.GetValue()); |
5691 Handle<JSObject> holder(lookup.holder()); | 5708 Handle<JSObject> holder(lookup.holder()); |
5692 if (!callback->IsAccessorPair()) { | 5709 if (!callback->IsAccessorPair()) { |
5693 return BuildLoadNamedGeneric(object, name, expr); | 5710 return BuildLoadNamedGeneric(object, name, expr); |
5694 } | 5711 } |
5695 Handle<AccessorPair> accessors = Handle<AccessorPair>::cast(callback); | 5712 Handle<AccessorPair> accessors = Handle<AccessorPair>::cast(callback); |
5696 return BuildCallGetter(object, map, accessors, holder); | 5713 return BuildCallGetter(object, map, accessors, holder); |
5697 } | |
5698 return BuildLoadNamedGeneric(object, name, expr); | |
5699 } | 5714 } |
| 5715 |
| 5716 // No luck, do a generic load. |
| 5717 return BuildLoadNamedGeneric(object, name, expr); |
5700 } | 5718 } |
5701 | 5719 |
5702 | 5720 |
5703 HInstruction* HGraphBuilder::BuildLoadKeyedGeneric(HValue* object, | 5721 HInstruction* HGraphBuilder::BuildLoadKeyedGeneric(HValue* object, |
5704 HValue* key) { | 5722 HValue* key) { |
5705 HValue* context = environment()->LookupContext(); | 5723 HValue* context = environment()->LookupContext(); |
5706 return new(zone()) HLoadKeyedGeneric(context, object, key); | 5724 return new(zone()) HLoadKeyedGeneric(context, object, key); |
5707 } | 5725 } |
5708 | 5726 |
5709 | 5727 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6308 HValue* function = Pop(); | 6326 HValue* function = Pop(); |
6309 AddInstruction(new(zone()) HCheckNonSmi(function)); | 6327 AddInstruction(new(zone()) HCheckNonSmi(function)); |
6310 instr = new(zone()) HLoadFunctionPrototype(function); | 6328 instr = new(zone()) HLoadFunctionPrototype(function); |
6311 | 6329 |
6312 } else if (expr->key()->IsPropertyName()) { | 6330 } else if (expr->key()->IsPropertyName()) { |
6313 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName(); | 6331 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName(); |
6314 SmallMapList* types = expr->GetReceiverTypes(); | 6332 SmallMapList* types = expr->GetReceiverTypes(); |
6315 | 6333 |
6316 HValue* obj = Pop(); | 6334 HValue* obj = Pop(); |
6317 if (expr->IsMonomorphic()) { | 6335 if (expr->IsMonomorphic()) { |
6318 instr = BuildLoadNamed(obj, name, expr, types->first()); | 6336 instr = BuildLoadNamedMonomorphic(obj, name, expr, types->first()); |
6319 } else if (types != NULL && types->length() > 1) { | 6337 } else if (types != NULL && types->length() > 1) { |
6320 AddInstruction(new(zone()) HCheckNonSmi(obj)); | 6338 AddInstruction(new(zone()) HCheckNonSmi(obj)); |
6321 HandlePolymorphicLoadNamedField(expr, obj, types, name); | 6339 HandlePolymorphicLoadNamedField(expr, obj, types, name); |
6322 return; | 6340 return; |
6323 } else { | 6341 } else { |
6324 instr = BuildLoadNamedGeneric(obj, name, expr); | 6342 instr = BuildLoadNamedGeneric(obj, name, expr); |
6325 } | 6343 } |
6326 | 6344 |
6327 } else { | 6345 } else { |
6328 CHECK_ALIVE(VisitForValue(expr->key())); | 6346 CHECK_ALIVE(VisitForValue(expr->key())); |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7791 } else { | 7809 } else { |
7792 // Argument of the count operation is a property. | 7810 // Argument of the count operation is a property. |
7793 ASSERT(prop != NULL); | 7811 ASSERT(prop != NULL); |
7794 prop->RecordTypeFeedback(oracle(), zone()); | 7812 prop->RecordTypeFeedback(oracle(), zone()); |
7795 | 7813 |
7796 if (prop->key()->IsPropertyName()) { | 7814 if (prop->key()->IsPropertyName()) { |
7797 // Named property. | 7815 // Named property. |
7798 if (returns_original_input) Push(graph_->GetConstantUndefined()); | 7816 if (returns_original_input) Push(graph_->GetConstantUndefined()); |
7799 | 7817 |
7800 CHECK_ALIVE(VisitForValue(prop->obj())); | 7818 CHECK_ALIVE(VisitForValue(prop->obj())); |
7801 HValue* obj = Top(); | 7819 HValue* object = Top(); |
7802 | 7820 |
7803 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName(); | 7821 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName(); |
7804 Handle<Map> map; | 7822 Handle<Map> map; |
7805 HInstruction* load; | 7823 HInstruction* load; |
7806 if (prop->IsMonomorphic()) { | 7824 if (prop->IsMonomorphic()) { |
7807 map = prop->GetReceiverTypes()->first(); | 7825 map = prop->GetReceiverTypes()->first(); |
7808 load = BuildLoadNamed(obj, name, prop, map); | 7826 load = BuildLoadNamedMonomorphic(object, name, prop, map); |
7809 } else { | 7827 } else { |
7810 load = BuildLoadNamedGeneric(obj, name, prop); | 7828 load = BuildLoadNamedGeneric(object, name, prop); |
7811 } | 7829 } |
7812 PushAndAdd(load); | 7830 PushAndAdd(load); |
7813 if (load->HasObservableSideEffects()) AddSimulate(expr->CountId()); | 7831 if (load->HasObservableSideEffects()) AddSimulate(expr->CountId()); |
7814 | 7832 |
7815 after = BuildIncrement(returns_original_input, expr); | 7833 after = BuildIncrement(returns_original_input, expr); |
7816 input = Pop(); | 7834 input = Pop(); |
7817 | 7835 |
7818 HInstruction* store; | 7836 HInstruction* store; |
7819 CHECK_ALIVE(store = BuildStoreNamed(obj, name, after, map)); | 7837 if (map.is_null()) { |
| 7838 // If we don't know the monomorphic type, do a generic store. |
| 7839 CHECK_ALIVE(store = BuildStoreNamedGeneric(object, name, after)); |
| 7840 } else { |
| 7841 CHECK_ALIVE(store = BuildStoreNamedMonomorphic(object, |
| 7842 name, |
| 7843 after, |
| 7844 map)); |
| 7845 } |
7820 AddInstruction(store); | 7846 AddInstruction(store); |
7821 | 7847 |
7822 // Overwrite the receiver in the bailout environment with the result | 7848 // Overwrite the receiver in the bailout environment with the result |
7823 // of the operation, and the placeholder with the original value if | 7849 // of the operation, and the placeholder with the original value if |
7824 // necessary. | 7850 // necessary. |
7825 environment()->SetExpressionStackAt(0, after); | 7851 environment()->SetExpressionStackAt(0, after); |
7826 if (returns_original_input) environment()->SetExpressionStackAt(1, input); | 7852 if (returns_original_input) environment()->SetExpressionStackAt(1, input); |
7827 if (store->HasObservableSideEffects()) AddSimulate(expr->AssignmentId()); | 7853 if (store->HasObservableSideEffects()) AddSimulate(expr->AssignmentId()); |
7828 | 7854 |
7829 } else { | 7855 } else { |
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9585 } | 9611 } |
9586 } | 9612 } |
9587 | 9613 |
9588 #ifdef DEBUG | 9614 #ifdef DEBUG |
9589 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 9615 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
9590 if (allocator_ != NULL) allocator_->Verify(); | 9616 if (allocator_ != NULL) allocator_->Verify(); |
9591 #endif | 9617 #endif |
9592 } | 9618 } |
9593 | 9619 |
9594 } } // namespace v8::internal | 9620 } } // namespace v8::internal |
OLD | NEW |