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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // -- r2 : name | 347 // -- r2 : name |
348 // ----------------------------------- | 348 // ----------------------------------- |
349 Label number, non_number, non_string, boolean, probe, miss; | 349 Label number, non_number, non_string, boolean, probe, miss; |
350 | 350 |
351 // Probe the stub cache. | 351 // Probe the stub cache. |
352 Code::Flags flags = Code::ComputeFlags(kind, | 352 Code::Flags flags = Code::ComputeFlags(kind, |
353 MONOMORPHIC, | 353 MONOMORPHIC, |
354 extra_state, | 354 extra_state, |
355 Code::NORMAL, | 355 Code::NORMAL, |
356 argc); | 356 argc); |
357 Isolate::Current()->stub_cache()->GenerateProbe( | 357 masm->isolate()->stub_cache()->GenerateProbe( |
358 masm, flags, r1, r2, r3, r4, r5, r6); | 358 masm, flags, r1, r2, r3, r4, r5, r6); |
359 | 359 |
360 // If the stub cache probing failed, the receiver might be a value. | 360 // If the stub cache probing failed, the receiver might be a value. |
361 // For value objects, we use the map of the prototype objects for | 361 // For value objects, we use the map of the prototype objects for |
362 // the corresponding JSValue for the cache and that is what we need | 362 // the corresponding JSValue for the cache and that is what we need |
363 // to probe. | 363 // to probe. |
364 // | 364 // |
365 // Check for number. | 365 // Check for number. |
366 __ JumpIfSmi(r1, &number); | 366 __ JumpIfSmi(r1, &number); |
367 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); | 367 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); |
(...skipping 18 matching lines...) Expand all Loading... |
386 __ b(eq, &boolean); | 386 __ b(eq, &boolean); |
387 __ LoadRoot(ip, Heap::kFalseValueRootIndex); | 387 __ LoadRoot(ip, Heap::kFalseValueRootIndex); |
388 __ cmp(r1, ip); | 388 __ cmp(r1, ip); |
389 __ b(ne, &miss); | 389 __ b(ne, &miss); |
390 __ bind(&boolean); | 390 __ bind(&boolean); |
391 StubCompiler::GenerateLoadGlobalFunctionPrototype( | 391 StubCompiler::GenerateLoadGlobalFunctionPrototype( |
392 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); | 392 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); |
393 | 393 |
394 // Probe the stub cache for the value object. | 394 // Probe the stub cache for the value object. |
395 __ bind(&probe); | 395 __ bind(&probe); |
396 Isolate::Current()->stub_cache()->GenerateProbe( | 396 masm->isolate()->stub_cache()->GenerateProbe( |
397 masm, flags, r1, r2, r3, r4, r5, r6); | 397 masm, flags, r1, r2, r3, r4, r5, r6); |
398 | 398 |
399 __ bind(&miss); | 399 __ bind(&miss); |
400 } | 400 } |
401 | 401 |
402 | 402 |
403 static void GenerateFunctionTailCall(MacroAssembler* masm, | 403 static void GenerateFunctionTailCall(MacroAssembler* masm, |
404 int argc, | 404 int argc, |
405 Label* miss, | 405 Label* miss, |
406 Register scratch) { | 406 Register scratch) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 // ----------- S t a t e ------------- | 651 // ----------- S t a t e ------------- |
652 // -- r2 : name | 652 // -- r2 : name |
653 // -- lr : return address | 653 // -- lr : return address |
654 // -- r0 : receiver | 654 // -- r0 : 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, r0, r2, r3, r4, r5, r6); | 662 masm, flags, r0, r2, r3, r4, r5, r6); |
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 // -- r2 : name | 671 // -- r2 : name |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 // -- r1 : receiver | 1483 // -- r1 : receiver |
1484 // -- r2 : name | 1484 // -- r2 : name |
1485 // -- lr : return address | 1485 // -- lr : return address |
1486 // ----------------------------------- | 1486 // ----------------------------------- |
1487 | 1487 |
1488 // Get the receiver from the stack and probe the stub cache. | 1488 // Get the receiver from the stack and probe the stub cache. |
1489 Code::Flags flags = Code::ComputeFlags( | 1489 Code::Flags flags = Code::ComputeFlags( |
1490 Code::STUB, MONOMORPHIC, strict_mode, | 1490 Code::STUB, MONOMORPHIC, strict_mode, |
1491 Code::NORMAL, Code::STORE_IC); | 1491 Code::NORMAL, Code::STORE_IC); |
1492 | 1492 |
1493 Isolate::Current()->stub_cache()->GenerateProbe( | 1493 masm->isolate()->stub_cache()->GenerateProbe( |
1494 masm, flags, r1, r2, r3, r4, r5, r6); | 1494 masm, flags, r1, r2, r3, r4, r5, r6); |
1495 | 1495 |
1496 // Cache miss: Jump to runtime. | 1496 // Cache miss: Jump to runtime. |
1497 GenerateMiss(masm); | 1497 GenerateMiss(masm); |
1498 } | 1498 } |
1499 | 1499 |
1500 | 1500 |
1501 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1501 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
1502 // ----------- S t a t e ------------- | 1502 // ----------- S t a t e ------------- |
1503 // -- r0 : value | 1503 // -- r0 : value |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 } else { | 1653 } else { |
1654 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1654 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1655 patcher.EmitCondition(eq); | 1655 patcher.EmitCondition(eq); |
1656 } | 1656 } |
1657 } | 1657 } |
1658 | 1658 |
1659 | 1659 |
1660 } } // namespace v8::internal | 1660 } } // namespace v8::internal |
1661 | 1661 |
1662 #endif // V8_TARGET_ARCH_ARM | 1662 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |