| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 // The original subject is in the previous stack frame. Therefore we have to | 2644 // The original subject is in the previous stack frame. Therefore we have to |
| 2645 // use rbp, which points exactly to one pointer size below the previous rsp. | 2645 // use rbp, which points exactly to one pointer size below the previous rsp. |
| 2646 // (Because creating a new stack frame pushes the previous rbp onto the stack | 2646 // (Because creating a new stack frame pushes the previous rbp onto the stack |
| 2647 // and thereby moves up rsp by one kPointerSize.) | 2647 // and thereby moves up rsp by one kPointerSize.) |
| 2648 __ movq(arg_reg_1, r15); | 2648 __ movq(arg_reg_1, r15); |
| 2649 | 2649 |
| 2650 // Locate the code entry and call it. | 2650 // Locate the code entry and call it. |
| 2651 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 2651 __ addq(r11, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 2652 __ call(r11); | 2652 __ call(r11); |
| 2653 | 2653 |
| 2654 __ LeaveApiExitFrame(); | 2654 __ LeaveApiExitFrame(true); |
| 2655 | 2655 |
| 2656 // Check the result. | 2656 // Check the result. |
| 2657 Label success; | 2657 Label success; |
| 2658 Label exception; | 2658 Label exception; |
| 2659 __ cmpl(rax, Immediate(1)); | 2659 __ cmpl(rax, Immediate(1)); |
| 2660 // We expect exactly one result since we force the called regexp to behave | 2660 // We expect exactly one result since we force the called regexp to behave |
| 2661 // as non-global. | 2661 // as non-global. |
| 2662 __ j(equal, &success, Label::kNear); | 2662 __ j(equal, &success, Label::kNear); |
| 2663 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); | 2663 __ cmpl(rax, Immediate(NativeRegExpMacroAssembler::EXCEPTION)); |
| 2664 __ j(equal, &exception); | 2664 __ j(equal, &exception); |
| (...skipping 3958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6623 __ bind(&fast_elements_case); | 6623 __ bind(&fast_elements_case); |
| 6624 GenerateCase(masm, FAST_ELEMENTS); | 6624 GenerateCase(masm, FAST_ELEMENTS); |
| 6625 } | 6625 } |
| 6626 | 6626 |
| 6627 | 6627 |
| 6628 #undef __ | 6628 #undef __ |
| 6629 | 6629 |
| 6630 } } // namespace v8::internal | 6630 } } // namespace v8::internal |
| 6631 | 6631 |
| 6632 #endif // V8_TARGET_ARCH_X64 | 6632 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |