OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4318 // function without changing the state. | 4318 // function without changing the state. |
4319 __ cmp(ecx, Operand(edi)); | 4319 __ cmp(ecx, Operand(edi)); |
4320 __ j(equal, &call, Label::kNear); | 4320 __ j(equal, &call, Label::kNear); |
4321 __ cmp(Operand(ecx), Immediate(MegamorphicSentinel(isolate))); | 4321 __ cmp(Operand(ecx), Immediate(MegamorphicSentinel(isolate))); |
4322 __ j(equal, &call, Label::kNear); | 4322 __ j(equal, &call, Label::kNear); |
4323 | 4323 |
4324 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 4324 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
4325 // megamorphic. | 4325 // megamorphic. |
4326 __ cmp(Operand(ecx), Immediate(UninitializedSentinel(isolate))); | 4326 __ cmp(Operand(ecx), Immediate(UninitializedSentinel(isolate))); |
4327 __ j(equal, &initialize, Label::kNear); | 4327 __ j(equal, &initialize, Label::kNear); |
| 4328 // MegamorphicSentinel is a root so no write-barrier is needed. |
4328 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), | 4329 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), |
4329 Immediate(MegamorphicSentinel(isolate))); | 4330 Immediate(MegamorphicSentinel(isolate))); |
4330 __ jmp(&call, Label::kNear); | 4331 __ jmp(&call, Label::kNear); |
4331 | 4332 |
4332 // An uninitialized cache is patched with the function. | 4333 // An uninitialized cache is patched with the function. |
4333 __ bind(&initialize); | 4334 __ bind(&initialize); |
4334 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), edi); | 4335 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), edi); |
| 4336 __ mov(ecx, edi); |
| 4337 __ RecordWriteField(ebx, |
| 4338 JSGlobalPropertyCell::kValueOffset, |
| 4339 ecx, |
| 4340 edx, |
| 4341 kDontSaveFPRegs, |
| 4342 OMIT_REMEMBERED_SET, // Cells are rescanned. |
| 4343 OMIT_SMI_CHECK); |
4335 | 4344 |
4336 __ bind(&call); | 4345 __ bind(&call); |
4337 } | 4346 } |
4338 | 4347 |
4339 // Fast-case: Just invoke the function. | 4348 // Fast-case: Just invoke the function. |
4340 ParameterCount actual(argc_); | 4349 ParameterCount actual(argc_); |
4341 | 4350 |
4342 if (ReceiverMightBeImplicit()) { | 4351 if (ReceiverMightBeImplicit()) { |
4343 Label call_as_function; | 4352 Label call_as_function; |
4344 __ cmp(eax, isolate->factory()->the_hole_value()); | 4353 __ cmp(eax, isolate->factory()->the_hole_value()); |
(...skipping 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6913 | 6922 |
6914 // Fall through when we need to inform the incremental marker. | 6923 // Fall through when we need to inform the incremental marker. |
6915 } | 6924 } |
6916 | 6925 |
6917 | 6926 |
6918 #undef __ | 6927 #undef __ |
6919 | 6928 |
6920 } } // namespace v8::internal | 6929 } } // namespace v8::internal |
6921 | 6930 |
6922 #endif // V8_TARGET_ARCH_IA32 | 6931 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |