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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 | 887 |
888 void InitializeRootRegister() { | 888 void InitializeRootRegister() { |
889 ExternalReference roots_array_start = | 889 ExternalReference roots_array_start = |
890 ExternalReference::roots_array_start(isolate()); | 890 ExternalReference::roots_array_start(isolate()); |
891 li(kRootRegister, Operand(roots_array_start)); | 891 li(kRootRegister, Operand(roots_array_start)); |
892 } | 892 } |
893 | 893 |
894 // ------------------------------------------------------------------------- | 894 // ------------------------------------------------------------------------- |
895 // JavaScript invokes. | 895 // JavaScript invokes. |
896 | 896 |
897 // Set up call kind marking in t1. The method takes t1 as an | |
898 // explicit first parameter to make the code more readable at the | |
899 // call sites. | |
900 void SetCallKind(Register dst, CallKind kind); | |
901 | |
902 // Invoke the JavaScript function code by either calling or jumping. | 897 // Invoke the JavaScript function code by either calling or jumping. |
903 void InvokeCode(Register code, | 898 void InvokeCode(Register code, |
904 const ParameterCount& expected, | 899 const ParameterCount& expected, |
905 const ParameterCount& actual, | 900 const ParameterCount& actual, |
906 InvokeFlag flag, | 901 InvokeFlag flag, |
907 const CallWrapper& call_wrapper, | 902 const CallWrapper& call_wrapper); |
908 CallKind call_kind); | |
909 | 903 |
910 void InvokeCode(Handle<Code> code, | 904 void InvokeCode(Handle<Code> code, |
911 const ParameterCount& expected, | 905 const ParameterCount& expected, |
912 const ParameterCount& actual, | 906 const ParameterCount& actual, |
913 RelocInfo::Mode rmode, | 907 RelocInfo::Mode rmode, |
914 InvokeFlag flag, | 908 InvokeFlag flag); |
915 CallKind call_kind); | |
916 | 909 |
917 // Invoke the JavaScript function in the given register. Changes the | 910 // Invoke the JavaScript function in the given register. Changes the |
918 // current context to the context in the function before invoking. | 911 // current context to the context in the function before invoking. |
919 void InvokeFunction(Register function, | 912 void InvokeFunction(Register function, |
920 const ParameterCount& actual, | 913 const ParameterCount& actual, |
921 InvokeFlag flag, | 914 InvokeFlag flag, |
922 const CallWrapper& call_wrapper, | 915 const CallWrapper& call_wrapper); |
923 CallKind call_kind); | |
924 | 916 |
925 void InvokeFunction(Register function, | 917 void InvokeFunction(Register function, |
926 const ParameterCount& expected, | 918 const ParameterCount& expected, |
927 const ParameterCount& actual, | 919 const ParameterCount& actual, |
928 InvokeFlag flag, | 920 InvokeFlag flag, |
929 const CallWrapper& call_wrapper, | 921 const CallWrapper& call_wrapper); |
930 CallKind call_kind); | |
931 | 922 |
932 void InvokeFunction(Handle<JSFunction> function, | 923 void InvokeFunction(Handle<JSFunction> function, |
933 const ParameterCount& expected, | 924 const ParameterCount& expected, |
934 const ParameterCount& actual, | 925 const ParameterCount& actual, |
935 InvokeFlag flag, | 926 InvokeFlag flag, |
936 const CallWrapper& call_wrapper, | 927 const CallWrapper& call_wrapper); |
937 CallKind call_kind); | |
938 | 928 |
939 | 929 |
940 void IsObjectJSObjectType(Register heap_object, | 930 void IsObjectJSObjectType(Register heap_object, |
941 Register map, | 931 Register map, |
942 Register scratch, | 932 Register scratch, |
943 Label* fail); | 933 Label* fail); |
944 | 934 |
945 void IsInstanceJSObjectType(Register map, | 935 void IsInstanceJSObjectType(Register map, |
946 Register scratch, | 936 Register scratch, |
947 Label* fail); | 937 Label* fail); |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 void Jalr(Label* L, BranchDelaySlot bdslot); | 1599 void Jalr(Label* L, BranchDelaySlot bdslot); |
1610 | 1600 |
1611 // Helper functions for generating invokes. | 1601 // Helper functions for generating invokes. |
1612 void InvokePrologue(const ParameterCount& expected, | 1602 void InvokePrologue(const ParameterCount& expected, |
1613 const ParameterCount& actual, | 1603 const ParameterCount& actual, |
1614 Handle<Code> code_constant, | 1604 Handle<Code> code_constant, |
1615 Register code_reg, | 1605 Register code_reg, |
1616 Label* done, | 1606 Label* done, |
1617 bool* definitely_mismatches, | 1607 bool* definitely_mismatches, |
1618 InvokeFlag flag, | 1608 InvokeFlag flag, |
1619 const CallWrapper& call_wrapper, | 1609 const CallWrapper& call_wrapper); |
1620 CallKind call_kind); | |
1621 | 1610 |
1622 // Get the code for the given builtin. Returns if able to resolve | 1611 // Get the code for the given builtin. Returns if able to resolve |
1623 // the function in the 'resolved' flag. | 1612 // the function in the 'resolved' flag. |
1624 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); | 1613 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); |
1625 | 1614 |
1626 void InitializeNewString(Register string, | 1615 void InitializeNewString(Register string, |
1627 Register length, | 1616 Register length, |
1628 Heap::RootListIndex map_index, | 1617 Heap::RootListIndex map_index, |
1629 Register scratch1, | 1618 Register scratch1, |
1630 Register scratch2); | 1619 Register scratch2); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1687 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1699 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1688 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1700 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1689 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1701 #else | 1690 #else |
1702 #define ACCESS_MASM(masm) masm-> | 1691 #define ACCESS_MASM(masm) masm-> |
1703 #endif | 1692 #endif |
1704 | 1693 |
1705 } } // namespace v8::internal | 1694 } } // namespace v8::internal |
1706 | 1695 |
1707 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1696 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |