sync the repo
[hiphop-php.git] / hphp / runtime / vm / jit / irgen-func-prologue.h
blob7b90556ea6344c9ab4d4fb2cc402be4799d0b4b5
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #pragma once
19 #include "hphp/runtime/vm/func.h"
20 #include "hphp/runtime/vm/jit/types.h"
22 #include <cstdint>
24 namespace HPHP::jit {
26 struct SSATmp;
28 namespace irgen {
30 struct IRGS;
32 ///////////////////////////////////////////////////////////////////////////////
35 * Check for presence, count and wildcard match of generics.
37 * If `pushed' is true, generics are on the stack. Otherwise, generics may or
38 * may not be above the stack, depending on the prologueFlags.
40 * After this check, generics will be on the stack iff the function has reified
41 * generics.
43 void emitCalleeGenericsChecks(IRGS& env, const Func* callee,
44 SSATmp* prologueFlags, bool pushed);
46 void emitCalleeArgumentArityChecks(IRGS& env, const Func* callee,
47 uint32_t& argc);
49 void emitCalleeArgumentTypeChecks(IRGS& env, const Func* callee,
50 uint32_t argc, SSATmp* prologueCtx);
52 void emitCalleeDynamicCallChecks(IRGS& env, const Func* callee,
53 SSATmp* prologueFlags);
55 void emitCalleeCoeffectChecks(IRGS& env, const Func* callee,
56 SSATmp* prologueFlags, SSATmp* providedCoeffects,
57 bool skipCoeffectsCheck,
58 uint32_t argc, SSATmp* prologueCtx);
60 void emitCalleeRecordFuncCoverage(IRGS& env, const Func* callee);
62 void emitInitFuncInputs(IRGS& env, const Func* callee, uint32_t argc);
64 void emitFuncPrologue(IRGS& env, const Func* callee, uint32_t argc,
65 TransID transID);
67 void emitFuncEntry(IRGS& env);
69 ///////////////////////////////////////////////////////////////////////////////