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 4670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4681 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { | 4681 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { |
4682 // Cache the called function in a global property cell. Cache states | 4682 // Cache the called function in a global property cell. Cache states |
4683 // are uninitialized, monomorphic (indicated by a JSFunction), and | 4683 // are uninitialized, monomorphic (indicated by a JSFunction), and |
4684 // megamorphic. | 4684 // megamorphic. |
4685 // ebx : cache cell for call target | 4685 // ebx : cache cell for call target |
4686 // edi : the function to call | 4686 // edi : the function to call |
4687 Isolate* isolate = masm->isolate(); | 4687 Isolate* isolate = masm->isolate(); |
4688 Label initialize, done; | 4688 Label initialize, done; |
4689 | 4689 |
4690 // Load the cache state into ecx. | 4690 // Load the cache state into ecx. |
4691 __ mov(ecx, FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset)); | 4691 __ mov(ecx, FieldOperand(ebx, PropertyCell::kValueOffset)); |
4692 | 4692 |
4693 // A monomorphic cache hit or an already megamorphic state: invoke the | 4693 // A monomorphic cache hit or an already megamorphic state: invoke the |
4694 // function without changing the state. | 4694 // function without changing the state. |
4695 __ cmp(ecx, edi); | 4695 __ cmp(ecx, edi); |
4696 __ j(equal, &done, Label::kNear); | 4696 __ j(equal, &done, Label::kNear); |
4697 __ cmp(ecx, Immediate(TypeFeedbackCells::MegamorphicSentinel(isolate))); | 4697 __ cmp(ecx, Immediate(TypeFeedbackCells::MegamorphicSentinel(isolate))); |
4698 __ j(equal, &done, Label::kNear); | 4698 __ j(equal, &done, Label::kNear); |
4699 | 4699 |
4700 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 4700 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
4701 // megamorphic. | 4701 // megamorphic. |
(...skipping 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 8089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
8090 } | 8090 } |
8091 } | 8091 } |
8092 | 8092 |
8093 | 8093 |
8094 #undef __ | 8094 #undef __ |
8095 | 8095 |
8096 } } // namespace v8::internal | 8096 } } // namespace v8::internal |
8097 | 8097 |
8098 #endif // V8_TARGET_ARCH_IA32 | 8098 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |