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 5345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5356 | 5356 |
5357 // A monomorphic cache hit or an already megamorphic state: invoke the | 5357 // A monomorphic cache hit or an already megamorphic state: invoke the |
5358 // function without changing the state. | 5358 // function without changing the state. |
5359 __ Branch(&done, eq, a3, Operand(a1)); | 5359 __ Branch(&done, eq, a3, Operand(a1)); |
5360 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5360 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5361 __ Branch(&done, eq, a3, Operand(at)); | 5361 __ Branch(&done, eq, a3, Operand(at)); |
5362 | 5362 |
5363 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 5363 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
5364 // megamorphic. | 5364 // megamorphic. |
5365 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 5365 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
5366 __ Branch(&done, eq, a3, Operand(at)); | 5366 |
5367 __ Branch(USE_DELAY_SLOT, &done, eq, a3, Operand(at)); | |
5368 // An uninitialized cache is patched with the function. | |
5369 // Store a1 in the delay slot. This may or may not get overwritten depending | |
5370 // on the result of the comparison. | |
5371 __ sw(a1, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | |
5372 | |
5367 // MegamorphicSentinel is an immortal immovable object (undefined) so no | 5373 // MegamorphicSentinel is an immortal immovable object (undefined) so no |
5368 // write-barrier is needed. | 5374 // write-barrier is needed. |
5369 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5375 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5370 __ sw(at, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | 5376 __ sw(at, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); |
5371 __ Branch(&done); | 5377 __ Branch(&done); |
Michael Starzinger
2012/02/29 09:48:21
Removed this obsolete branch before landing.
| |
5372 | 5378 |
5373 // An uninitialized cache is patched with the function. | |
5374 __ sw(a1, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | |
5375 // No need for a write barrier here - cells are rescanned. | 5379 // No need for a write barrier here - cells are rescanned. |
5376 | 5380 |
5377 __ bind(&done); | 5381 __ bind(&done); |
5378 } | 5382 } |
5379 | 5383 |
5380 | 5384 |
5381 void CallFunctionStub::Generate(MacroAssembler* masm) { | 5385 void CallFunctionStub::Generate(MacroAssembler* masm) { |
5382 // a1 : the function to call | 5386 // a1 : the function to call |
5383 // a2 : cache cell for call target | 5387 // a2 : cache cell for call target |
5384 Label slow, non_function; | 5388 Label slow, non_function; |
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7652 __ Ret(USE_DELAY_SLOT); | 7656 __ Ret(USE_DELAY_SLOT); |
7653 __ mov(v0, a0); | 7657 __ mov(v0, a0); |
7654 } | 7658 } |
7655 | 7659 |
7656 | 7660 |
7657 #undef __ | 7661 #undef __ |
7658 | 7662 |
7659 } } // namespace v8::internal | 7663 } } // namespace v8::internal |
7660 | 7664 |
7661 #endif // V8_TARGET_ARCH_MIPS | 7665 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |