| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 CallKind call_kind); | 513 CallKind call_kind); |
| 514 | 514 |
| 515 // Invoke the JavaScript function in the given register. Changes the | 515 // Invoke the JavaScript function in the given register. Changes the |
| 516 // current context to the context in the function before invoking. | 516 // current context to the context in the function before invoking. |
| 517 void InvokeFunction(Register function, | 517 void InvokeFunction(Register function, |
| 518 const ParameterCount& actual, | 518 const ParameterCount& actual, |
| 519 InvokeFlag flag, | 519 InvokeFlag flag, |
| 520 const CallWrapper& call_wrapper, | 520 const CallWrapper& call_wrapper, |
| 521 CallKind call_kind); | 521 CallKind call_kind); |
| 522 | 522 |
| 523 void InvokeFunction(JSFunction* function, | 523 void InvokeFunction(Handle<JSFunction> function, |
| 524 const ParameterCount& actual, | 524 const ParameterCount& actual, |
| 525 InvokeFlag flag, | 525 InvokeFlag flag, |
| 526 CallKind call_kind); | 526 CallKind call_kind); |
| 527 | 527 |
| 528 void IsObjectJSObjectType(Register heap_object, | 528 void IsObjectJSObjectType(Register heap_object, |
| 529 Register map, | 529 Register map, |
| 530 Register scratch, | 530 Register scratch, |
| 531 Label* fail); | 531 Label* fail); |
| 532 | 532 |
| 533 void IsInstanceJSObjectType(Register map, | 533 void IsInstanceJSObjectType(Register map, |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 void CountLeadingZeros(Register zeros, | 919 void CountLeadingZeros(Register zeros, |
| 920 Register source, | 920 Register source, |
| 921 Register scratch); | 921 Register scratch); |
| 922 | 922 |
| 923 // --------------------------------------------------------------------------- | 923 // --------------------------------------------------------------------------- |
| 924 // Runtime calls | 924 // Runtime calls |
| 925 | 925 |
| 926 // Call a code stub. | 926 // Call a code stub. |
| 927 void CallStub(CodeStub* stub, Condition cond = al); | 927 void CallStub(CodeStub* stub, Condition cond = al); |
| 928 | 928 |
| 929 // Call a code stub and return the code object called. Try to generate | |
| 930 // the code if necessary. Do not perform a GC but instead return a retry | |
| 931 // after GC failure. | |
| 932 MUST_USE_RESULT MaybeObject* TryCallStub(CodeStub* stub, Condition cond = al); | |
| 933 | |
| 934 // Call a code stub. | 929 // Call a code stub. |
| 935 void TailCallStub(CodeStub* stub, Condition cond = al); | 930 void TailCallStub(CodeStub* stub, Condition cond = al); |
| 936 | 931 |
| 937 // Tail call a code stub (jump) and return the code object called. Try to | |
| 938 // generate the code if necessary. Do not perform a GC but instead return | |
| 939 // a retry after GC failure. | |
| 940 MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub, | |
| 941 Condition cond = al); | |
| 942 | |
| 943 // Call a runtime routine. | 932 // Call a runtime routine. |
| 944 void CallRuntime(const Runtime::Function* f, int num_arguments); | 933 void CallRuntime(const Runtime::Function* f, int num_arguments); |
| 945 void CallRuntimeSaveDoubles(Runtime::FunctionId id); | 934 void CallRuntimeSaveDoubles(Runtime::FunctionId id); |
| 946 | 935 |
| 947 // Convenience function: Same as above, but takes the fid instead. | 936 // Convenience function: Same as above, but takes the fid instead. |
| 948 void CallRuntime(Runtime::FunctionId fid, int num_arguments); | 937 void CallRuntime(Runtime::FunctionId fid, int num_arguments); |
| 949 | 938 |
| 950 // Convenience function: call an external reference. | 939 // Convenience function: call an external reference. |
| 951 void CallExternalReference(const ExternalReference& ext, | 940 void CallExternalReference(const ExternalReference& ext, |
| 952 int num_arguments); | 941 int num_arguments); |
| 953 | 942 |
| 954 // Tail call of a runtime routine (jump). | 943 // Tail call of a runtime routine (jump). |
| 955 // Like JumpToExternalReference, but also takes care of passing the number | 944 // Like JumpToExternalReference, but also takes care of passing the number |
| 956 // of parameters. | 945 // of parameters. |
| 957 void TailCallExternalReference(const ExternalReference& ext, | 946 void TailCallExternalReference(const ExternalReference& ext, |
| 958 int num_arguments, | 947 int num_arguments, |
| 959 int result_size); | 948 int result_size); |
| 960 | 949 |
| 961 // Tail call of a runtime routine (jump). Try to generate the code if | |
| 962 // necessary. Do not perform a GC but instead return a retry after GC | |
| 963 // failure. | |
| 964 MUST_USE_RESULT MaybeObject* TryTailCallExternalReference( | |
| 965 const ExternalReference& ext, int num_arguments, int result_size); | |
| 966 | |
| 967 // Convenience function: tail call a runtime routine (jump). | 950 // Convenience function: tail call a runtime routine (jump). |
| 968 void TailCallRuntime(Runtime::FunctionId fid, | 951 void TailCallRuntime(Runtime::FunctionId fid, |
| 969 int num_arguments, | 952 int num_arguments, |
| 970 int result_size); | 953 int result_size); |
| 971 | 954 |
| 972 int CalculateStackPassedWords(int num_reg_arguments, | 955 int CalculateStackPassedWords(int num_reg_arguments, |
| 973 int num_double_arguments); | 956 int num_double_arguments); |
| 974 | 957 |
| 975 // Before calling a C-function from generated code, align arguments on stack. | 958 // Before calling a C-function from generated code, align arguments on stack. |
| 976 // After aligning the frame, non-register arguments must be stored in | 959 // After aligning the frame, non-register arguments must be stored in |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1005 void CallCFunction(Register function, int num_arguments); | 988 void CallCFunction(Register function, int num_arguments); |
| 1006 void CallCFunction(ExternalReference function, | 989 void CallCFunction(ExternalReference function, |
| 1007 int num_reg_arguments, | 990 int num_reg_arguments, |
| 1008 int num_double_arguments); | 991 int num_double_arguments); |
| 1009 void CallCFunction(Register function, | 992 void CallCFunction(Register function, |
| 1010 int num_reg_arguments, | 993 int num_reg_arguments, |
| 1011 int num_double_arguments); | 994 int num_double_arguments); |
| 1012 | 995 |
| 1013 void GetCFunctionDoubleResult(const DoubleRegister dst); | 996 void GetCFunctionDoubleResult(const DoubleRegister dst); |
| 1014 | 997 |
| 1015 // Calls an API function. Allocates HandleScope, extracts returned value | 998 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1016 // from handle and propagates exceptions. Restores context. | 999 // from handle and propagates exceptions. Restores context. stack_space |
| 1017 // stack_space - space to be unwound on exit (includes the call js | 1000 // - space to be unwound on exit (includes the call js arguments space and |
| 1018 // arguments space and the additional space allocated for the fast call). | 1001 // the additional space allocated for the fast call). |
| 1019 MaybeObject* TryCallApiFunctionAndReturn(ExternalReference function, | 1002 void CallApiFunctionAndReturn(ExternalReference function, int stack_space); |
| 1020 int stack_space); | |
| 1021 | 1003 |
| 1022 // Jump to a runtime routine. | 1004 // Jump to a runtime routine. |
| 1023 void JumpToExternalReference(const ExternalReference& builtin); | 1005 void JumpToExternalReference(const ExternalReference& builtin); |
| 1024 | 1006 |
| 1025 MaybeObject* TryJumpToExternalReference(const ExternalReference& ext); | |
| 1026 | |
| 1027 // Invoke specified builtin JavaScript function. Adds an entry to | 1007 // Invoke specified builtin JavaScript function. Adds an entry to |
| 1028 // the unresolved list if the name does not resolve. | 1008 // the unresolved list if the name does not resolve. |
| 1029 void InvokeBuiltin(Builtins::JavaScript id, | 1009 void InvokeBuiltin(Builtins::JavaScript id, |
| 1030 InvokeFlag flag, | 1010 InvokeFlag flag, |
| 1031 const CallWrapper& call_wrapper = NullCallWrapper()); | 1011 const CallWrapper& call_wrapper = NullCallWrapper()); |
| 1032 | 1012 |
| 1033 // Store the code object for the given builtin in the target register and | 1013 // Store the code object for the given builtin in the target register and |
| 1034 // setup the function in r1. | 1014 // setup the function in r1. |
| 1035 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 1015 void GetBuiltinEntry(Register target, Builtins::JavaScript id); |
| 1036 | 1016 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1312 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1333 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1313 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1334 #else | 1314 #else |
| 1335 #define ACCESS_MASM(masm) masm-> | 1315 #define ACCESS_MASM(masm) masm-> |
| 1336 #endif | 1316 #endif |
| 1337 | 1317 |
| 1338 | 1318 |
| 1339 } } // namespace v8::internal | 1319 } } // namespace v8::internal |
| 1340 | 1320 |
| 1341 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1321 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |