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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 Label* label, | 767 Label* label, |
768 Handle<Name> name) { | 768 Handle<Name> name) { |
769 if (!label->is_unused()) { | 769 if (!label->is_unused()) { |
770 __ bind(label); | 770 __ bind(label); |
771 __ Move(this->name(), name); | 771 __ Move(this->name(), name); |
772 } | 772 } |
773 } | 773 } |
774 | 774 |
775 | 775 |
776 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm, | 776 void StubCompiler::GenerateCheckPropertyCell(MacroAssembler* masm, |
777 Handle<GlobalObject> global, | 777 Handle<JSGlobalObject> global, |
778 Handle<Name> name, | 778 Handle<Name> name, |
779 Register scratch, | 779 Register scratch, |
780 Label* miss) { | 780 Label* miss) { |
781 Handle<PropertyCell> cell = | 781 Handle<PropertyCell> cell = |
782 GlobalObject::EnsurePropertyCell(global, name); | 782 JSGlobalObject::EnsurePropertyCell(global, name); |
783 ASSERT(cell->value()->IsTheHole()); | 783 ASSERT(cell->value()->IsTheHole()); |
784 __ Move(scratch, cell); | 784 __ Move(scratch, cell); |
785 __ Cmp(FieldOperand(scratch, Cell::kValueOffset), | 785 __ Cmp(FieldOperand(scratch, Cell::kValueOffset), |
786 masm->isolate()->factory()->the_hole_value()); | 786 masm->isolate()->factory()->the_hole_value()); |
787 __ j(not_equal, miss); | 787 __ j(not_equal, miss); |
788 } | 788 } |
789 | 789 |
790 | 790 |
791 void StoreStubCompiler::GenerateNegativeHolderLookup( | 791 void StoreStubCompiler::GenerateNegativeHolderLookup( |
792 MacroAssembler* masm, | 792 MacroAssembler* masm, |
793 Handle<JSObject> holder, | 793 Handle<JSObject> holder, |
794 Register holder_reg, | 794 Register holder_reg, |
795 Handle<Name> name, | 795 Handle<Name> name, |
796 Label* miss) { | 796 Label* miss) { |
797 if (holder->IsJSGlobalObject()) { | 797 if (holder->IsJSGlobalObject()) { |
798 GenerateCheckPropertyCell( | 798 GenerateCheckPropertyCell( |
799 masm, Handle<GlobalObject>::cast(holder), name, scratch1(), miss); | 799 masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss); |
800 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { | 800 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { |
801 GenerateDictionaryNegativeLookup( | 801 GenerateDictionaryNegativeLookup( |
802 masm, miss, holder_reg, name, scratch1(), scratch2()); | 802 masm, miss, holder_reg, name, scratch1(), scratch2()); |
803 } | 803 } |
804 } | 804 } |
805 | 805 |
806 | 806 |
807 // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if | 807 // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if |
808 // store is successful. | 808 // store is successful. |
809 void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, | 809 void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | 1048 |
1049 | 1049 |
1050 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm, | 1050 void StubCompiler::GenerateCheckPropertyCells(MacroAssembler* masm, |
1051 Handle<JSObject> object, | 1051 Handle<JSObject> object, |
1052 Handle<JSObject> holder, | 1052 Handle<JSObject> holder, |
1053 Handle<Name> name, | 1053 Handle<Name> name, |
1054 Register scratch, | 1054 Register scratch, |
1055 Label* miss) { | 1055 Label* miss) { |
1056 Handle<JSObject> current = object; | 1056 Handle<JSObject> current = object; |
1057 while (!current.is_identical_to(holder)) { | 1057 while (!current.is_identical_to(holder)) { |
1058 if (current->IsGlobalObject()) { | 1058 if (current->IsJSGlobalObject()) { |
1059 GenerateCheckPropertyCell(masm, | 1059 GenerateCheckPropertyCell(masm, |
1060 Handle<GlobalObject>::cast(current), | 1060 Handle<JSGlobalObject>::cast(current), |
1061 name, | 1061 name, |
1062 scratch, | 1062 scratch, |
1063 miss); | 1063 miss); |
1064 } | 1064 } |
1065 current = Handle<JSObject>(JSObject::cast(current->GetPrototype())); | 1065 current = Handle<JSObject>(JSObject::cast(current->GetPrototype())); |
1066 } | 1066 } |
1067 } | 1067 } |
1068 | 1068 |
1069 | 1069 |
1070 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 1070 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2921 // Return the generated code. | 2921 // Return the generated code. |
2922 return GetICCode( | 2922 return GetICCode( |
2923 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 2923 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
2924 } | 2924 } |
2925 | 2925 |
2926 | 2926 |
2927 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( | 2927 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( |
2928 Handle<JSObject> object, | 2928 Handle<JSObject> object, |
2929 Handle<JSObject> last, | 2929 Handle<JSObject> last, |
2930 Handle<Name> name, | 2930 Handle<Name> name, |
2931 Handle<GlobalObject> global) { | 2931 Handle<JSGlobalObject> global) { |
2932 Label success; | 2932 Label success; |
2933 | 2933 |
2934 NonexistentHandlerFrontend(object, last, name, &success, global); | 2934 NonexistentHandlerFrontend(object, last, name, &success, global); |
2935 | 2935 |
2936 __ bind(&success); | 2936 __ bind(&success); |
2937 // Return undefined if maps of the full prototype chain are still the | 2937 // Return undefined if maps of the full prototype chain are still the |
2938 // same and no global property with this name contains a value. | 2938 // same and no global property with this name contains a value. |
2939 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); | 2939 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
2940 __ ret(0); | 2940 __ ret(0); |
2941 | 2941 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3150 // ----------------------------------- | 3150 // ----------------------------------- |
3151 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3151 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3152 } | 3152 } |
3153 | 3153 |
3154 | 3154 |
3155 #undef __ | 3155 #undef __ |
3156 | 3156 |
3157 } } // namespace v8::internal | 3157 } } // namespace v8::internal |
3158 | 3158 |
3159 #endif // V8_TARGET_ARCH_X64 | 3159 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |