| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // -- a2 : name | 352 // -- a2 : name |
| 353 // ----------------------------------- | 353 // ----------------------------------- |
| 354 Label number, non_number, non_string, boolean, probe, miss; | 354 Label number, non_number, non_string, boolean, probe, miss; |
| 355 | 355 |
| 356 // Probe the stub cache. | 356 // Probe the stub cache. |
| 357 Code::Flags flags = Code::ComputeFlags(kind, | 357 Code::Flags flags = Code::ComputeFlags(kind, |
| 358 MONOMORPHIC, | 358 MONOMORPHIC, |
| 359 extra_state, | 359 extra_state, |
| 360 Code::NORMAL, | 360 Code::NORMAL, |
| 361 argc); | 361 argc); |
| 362 Isolate::Current()->stub_cache()->GenerateProbe( | 362 masm->isolate()->stub_cache()->GenerateProbe( |
| 363 masm, flags, a1, a2, a3, t0, t1, t2); | 363 masm, flags, a1, a2, a3, t0, t1, t2); |
| 364 | 364 |
| 365 // If the stub cache probing failed, the receiver might be a value. | 365 // If the stub cache probing failed, the receiver might be a value. |
| 366 // For value objects, we use the map of the prototype objects for | 366 // For value objects, we use the map of the prototype objects for |
| 367 // the corresponding JSValue for the cache and that is what we need | 367 // the corresponding JSValue for the cache and that is what we need |
| 368 // to probe. | 368 // to probe. |
| 369 // | 369 // |
| 370 // Check for number. | 370 // Check for number. |
| 371 __ JumpIfSmi(a1, &number, t1); | 371 __ JumpIfSmi(a1, &number, t1); |
| 372 __ GetObjectType(a1, a3, a3); | 372 __ GetObjectType(a1, a3, a3); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 388 __ LoadRoot(t0, Heap::kTrueValueRootIndex); | 388 __ LoadRoot(t0, Heap::kTrueValueRootIndex); |
| 389 __ Branch(&boolean, eq, a1, Operand(t0)); | 389 __ Branch(&boolean, eq, a1, Operand(t0)); |
| 390 __ LoadRoot(t1, Heap::kFalseValueRootIndex); | 390 __ LoadRoot(t1, Heap::kFalseValueRootIndex); |
| 391 __ Branch(&miss, ne, a1, Operand(t1)); | 391 __ Branch(&miss, ne, a1, Operand(t1)); |
| 392 __ bind(&boolean); | 392 __ bind(&boolean); |
| 393 StubCompiler::GenerateLoadGlobalFunctionPrototype( | 393 StubCompiler::GenerateLoadGlobalFunctionPrototype( |
| 394 masm, Context::BOOLEAN_FUNCTION_INDEX, a1); | 394 masm, Context::BOOLEAN_FUNCTION_INDEX, a1); |
| 395 | 395 |
| 396 // Probe the stub cache for the value object. | 396 // Probe the stub cache for the value object. |
| 397 __ bind(&probe); | 397 __ bind(&probe); |
| 398 Isolate::Current()->stub_cache()->GenerateProbe( | 398 masm->isolate()->stub_cache()->GenerateProbe( |
| 399 masm, flags, a1, a2, a3, t0, t1, t2); | 399 masm, flags, a1, a2, a3, t0, t1, t2); |
| 400 | 400 |
| 401 __ bind(&miss); | 401 __ bind(&miss); |
| 402 } | 402 } |
| 403 | 403 |
| 404 | 404 |
| 405 static void GenerateFunctionTailCall(MacroAssembler* masm, | 405 static void GenerateFunctionTailCall(MacroAssembler* masm, |
| 406 int argc, | 406 int argc, |
| 407 Label* miss, | 407 Label* miss, |
| 408 Register scratch) { | 408 Register scratch) { |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 // ----------- S t a t e ------------- | 651 // ----------- S t a t e ------------- |
| 652 // -- a2 : name | 652 // -- a2 : name |
| 653 // -- ra : return address | 653 // -- ra : return address |
| 654 // -- a0 : receiver | 654 // -- a0 : receiver |
| 655 // ----------------------------------- | 655 // ----------------------------------- |
| 656 | 656 |
| 657 // Probe the stub cache. | 657 // Probe the stub cache. |
| 658 Code::Flags flags = Code::ComputeFlags( | 658 Code::Flags flags = Code::ComputeFlags( |
| 659 Code::STUB, MONOMORPHIC, Code::kNoExtraICState, | 659 Code::STUB, MONOMORPHIC, Code::kNoExtraICState, |
| 660 Code::NORMAL, Code::LOAD_IC); | 660 Code::NORMAL, Code::LOAD_IC); |
| 661 Isolate::Current()->stub_cache()->GenerateProbe( | 661 masm->isolate()->stub_cache()->GenerateProbe( |
| 662 masm, flags, a0, a2, a3, t0, t1, t2); | 662 masm, flags, a0, a2, a3, t0, t1, t2); |
| 663 | 663 |
| 664 // Cache miss: Jump to runtime. | 664 // Cache miss: Jump to runtime. |
| 665 GenerateMiss(masm); | 665 GenerateMiss(masm); |
| 666 } | 666 } |
| 667 | 667 |
| 668 | 668 |
| 669 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 669 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 670 // ----------- S t a t e ------------- | 670 // ----------- S t a t e ------------- |
| 671 // -- a2 : name | 671 // -- a2 : name |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 // -- a0 : value | 1491 // -- a0 : value |
| 1492 // -- a1 : receiver | 1492 // -- a1 : receiver |
| 1493 // -- a2 : name | 1493 // -- a2 : name |
| 1494 // -- ra : return address | 1494 // -- ra : return address |
| 1495 // ----------------------------------- | 1495 // ----------------------------------- |
| 1496 | 1496 |
| 1497 // Get the receiver from the stack and probe the stub cache. | 1497 // Get the receiver from the stack and probe the stub cache. |
| 1498 Code::Flags flags = Code::ComputeFlags( | 1498 Code::Flags flags = Code::ComputeFlags( |
| 1499 Code::STUB, MONOMORPHIC, strict_mode, | 1499 Code::STUB, MONOMORPHIC, strict_mode, |
| 1500 Code::NORMAL, Code::STORE_IC); | 1500 Code::NORMAL, Code::STORE_IC); |
| 1501 Isolate::Current()->stub_cache()->GenerateProbe( | 1501 masm->isolate()->stub_cache()->GenerateProbe( |
| 1502 masm, flags, a1, a2, a3, t0, t1, t2); | 1502 masm, flags, a1, a2, a3, t0, t1, t2); |
| 1503 | 1503 |
| 1504 // Cache miss: Jump to runtime. | 1504 // Cache miss: Jump to runtime. |
| 1505 GenerateMiss(masm); | 1505 GenerateMiss(masm); |
| 1506 } | 1506 } |
| 1507 | 1507 |
| 1508 | 1508 |
| 1509 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1509 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1510 // ----------- S t a t e ------------- | 1510 // ----------- S t a t e ------------- |
| 1511 // -- a0 : value | 1511 // -- a0 : value |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 } else { | 1659 } else { |
| 1660 ASSERT(Assembler::IsBne(branch_instr)); | 1660 ASSERT(Assembler::IsBne(branch_instr)); |
| 1661 patcher.ChangeBranchCondition(eq); | 1661 patcher.ChangeBranchCondition(eq); |
| 1662 } | 1662 } |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 | 1665 |
| 1666 } } // namespace v8::internal | 1666 } } // namespace v8::internal |
| 1667 | 1667 |
| 1668 #endif // V8_TARGET_ARCH_MIPS | 1668 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |