Remove empty from slow runtime tests
[hiphop-php.git] / hphp / runtime / base / request-injection-data-inl.h
blob442a4d48d0760d9c9d2e12f54f0dee7097c3c02e
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 #ifndef incl_HPHP_REQUEST_INJECTION_DATA_INL_H_
18 #error "Can only be included by request-injection-data.h"
19 #endif
21 namespace HPHP {
22 ////////////////////////////////////////////////////////////////////////////////
24 inline int RequestInjectionData::getTimeout() const {
25 return m_timer.m_timeoutSeconds;
28 inline int RequestInjectionData::getCPUTimeout() const {
29 return m_cpuTimer.m_timeoutSeconds;
32 inline bool RequestInjectionData::getJit() const {
33 return m_jit;
36 inline bool RequestInjectionData::isJittingDisabled() const {
37 return m_jittingDisabled;
40 inline void RequestInjectionData::setJittingDisabled(bool flag) {
41 m_jittingDisabled = flag;
44 inline bool RequestInjectionData::getJitFolding() const {
45 return m_jitFolding;
48 inline void RequestInjectionData::setJitFolding(bool flag) {
49 m_jitFolding = flag;
52 #define HC(Opt, ...) \
53 inline bool RequestInjectionData::getSuppressHAC##Opt##Notices() const { \
54 return m_suppressHAC##Opt; \
55 } \
56 inline void RequestInjectionData::setSuppressHAC##Opt##Notices(bool flag) { \
57 m_suppressHAC##Opt = flag; \
59 HAC_CHECK_OPTS
60 #undef HC
62 inline bool RequestInjectionData::getCoverage() const {
63 return m_coverage;
66 inline void RequestInjectionData::setCoverage(bool flag) {
67 m_coverage = flag;
68 updateJit();
71 inline bool RequestInjectionData::getDebuggerAttached() {
72 return m_debuggerAttached;
75 inline void RequestInjectionData::setDebuggerAttached(bool flag) {
76 m_debuggerAttached = flag;
77 updateJit();
80 inline size_t RequestInjectionData::getDebuggerStackDepth() const {
81 return m_activeLineBreaks.size();
84 inline bool RequestInjectionData::getDebuggerForceIntr() const {
85 return
86 m_debuggerIntr ||
87 // Force interrupts when over an active line.
88 getActiveLineBreak() != -1 ||
89 // Interrupts forced while stepping in.
90 m_debuggerStepIn ||
91 // Step out forces interrupts after we have exited the function.
92 m_debuggerStepOut == StepOutState::Out;
95 inline bool RequestInjectionData::getDebuggerIntr() const {
96 return m_debuggerIntr;
99 inline void RequestInjectionData::setDebuggerIntr(bool flag) {
100 m_debuggerIntr = flag;
101 updateJit();
104 inline bool RequestInjectionData::getDebuggerStepIn() const {
105 return m_debuggerStepIn;
108 inline void RequestInjectionData::setDebuggerStepIn(bool flag) {
109 m_debuggerStepIn = flag;
110 updateJit();
113 inline RequestInjectionData::StepOutState
114 RequestInjectionData::getDebuggerStepOut() const {
115 return m_debuggerStepOut;
118 inline void RequestInjectionData::setDebuggerStepOut(StepOutState state) {
119 m_debuggerStepOut = state;
120 updateJit();
123 inline bool RequestInjectionData::getDebuggerNext() const {
124 return m_debuggerNext;
127 inline void RequestInjectionData::setDebuggerNext(bool flag) {
128 m_debuggerNext = flag;
129 updateJit();
132 inline int RequestInjectionData::getDebuggerFlowDepth() const {
133 return m_debuggerFlowDepth;
136 inline void RequestInjectionData::setDebuggerFlowDepth(int depth) {
137 m_debuggerFlowDepth = depth;
140 inline int RequestInjectionData::getActiveLineBreak() const {
141 return m_activeLineBreaks.empty() ? -1 : m_activeLineBreaks.top();
144 inline void RequestInjectionData::clearActiveLineBreak() {
145 if (m_activeLineBreaks.empty()) return;
146 m_activeLineBreaks.top() = -1;
147 updateJit();
150 inline void RequestInjectionData::setActiveLineBreak(int line) {
151 assertx(line != -1);
152 if (m_activeLineBreaks.empty()) return;
153 m_activeLineBreaks.top() = line;
154 updateJit();
157 inline void RequestInjectionData::popActiveLineBreak() {
158 if (m_activeLineBreaks.empty()) return;
159 m_activeLineBreaks.pop();
160 updateJit();
163 inline void RequestInjectionData::pushActiveLineBreak() {
164 m_activeLineBreaks.push(-1);
165 updateJit();
168 inline const std::vector<std::string>&
169 RequestInjectionData::getIncludePaths() const {
170 return m_include_paths;
173 inline const std::string& RequestInjectionData::getDefaultMimeType() const {
174 return m_defaultMimeType;
177 inline int64_t RequestInjectionData::getErrorReportingLevel() {
178 return m_errorReportingLevel;
181 inline void RequestInjectionData::setErrorReportingLevel(int64_t level) {
182 m_errorReportingLevel = level;
185 inline int64_t RequestInjectionData::getMemoryLimitNumeric() const {
186 return m_maxMemoryNumeric;
189 inline const std::string& RequestInjectionData::getVariablesOrder() const {
190 return m_variablesOrder;
193 inline void RequestInjectionData::setVariablesOrder(const std::string& order) {
194 m_variablesOrder = order;
197 inline const std::string& RequestInjectionData::getRequestOrder() const {
198 return m_requestOrder;
201 inline void RequestInjectionData::setRequestOrder(const std::string& order) {
202 m_requestOrder = order;
205 inline int64_t RequestInjectionData::getSocketDefaultTimeout() const {
206 return m_socketDefaultTimeout;
209 inline const std::string& RequestInjectionData::getUserAgent() const {
210 return m_userAgent;
213 inline void RequestInjectionData::setUserAgent(const std::string& agent) {
214 m_userAgent = agent;
217 inline const std::string& RequestInjectionData::getTimeZone() const {
218 return m_timezone;
221 inline void RequestInjectionData::setTimeZone(const std::string& tz) {
222 m_timezone = tz;
225 inline void RequestInjectionData::setSafeFileAccess(bool b) {
226 m_safeFileAccess = b;
229 inline bool RequestInjectionData::hasSafeFileAccess() const {
230 return m_safeFileAccess;
233 inline bool RequestInjectionData::hasHtmlErrors() const {
234 return m_htmlErrors;
237 inline bool RequestInjectionData::logFunctionCalls() const {
238 return m_logFunctionCalls;
240 ////////////////////////////////////////////////////////////////////////////////