JSOP_ENDINIT fast path, obsoletes stub call. (r=dvander)
[mozilla-central.git] / js / src / methodjit / StubCalls.h
blob887143a4a11a726f099c043aef6bff3ef1fd5499
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=4 sw=4 et tw=99:
4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
15 * License.
17 * The Original Code is Mozilla SpiderMonkey JavaScript 1.9 code, released
18 * May 28, 2008.
20 * The Initial Developer of the Original Code is
21 * Brendan Eich <brendan@mozilla.org>
23 * Contributor(s):
24 * David Anderson <danderson@mozilla.com>
25 * David Mandelin <dmandelin@mozilla.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either of the GNU General Public License Version 2 or later (the "GPL"),
29 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #ifndef jslogic_h__
42 #define jslogic_h__
44 #include "MethodJIT.h"
46 namespace js {
47 namespace mjit {
48 namespace stubs {
50 void JS_FASTCALL This(VMFrame &f);
51 JSObject * JS_FASTCALL NewInitArray(VMFrame &f);
52 JSObject * JS_FASTCALL NewInitObject(VMFrame &f, uint32 empty);
53 JSObject * JS_FASTCALL NewArray(VMFrame &f, uint32 len);
54 void JS_FASTCALL Interrupt(VMFrame &f);
55 void JS_FASTCALL InitElem(VMFrame &f, uint32 last);
56 void JS_FASTCALL InitProp(VMFrame &f, JSAtom *atom);
57 void JS_FASTCALL InitMethod(VMFrame &f, JSAtom *atom);
58 JSString * JS_FASTCALL ConcatN(VMFrame &f, uint32 argc);
60 void * JS_FASTCALL Call(VMFrame &f, uint32 argc);
61 void * JS_FASTCALL New(VMFrame &f, uint32 argc);
62 void * JS_FASTCALL SlowNew(VMFrame &f, uint32 argc);
63 void * JS_FASTCALL SlowCall(VMFrame &f, uint32 argc);
64 JSObject * JS_FASTCALL NewObject(VMFrame &f);
65 void JS_FASTCALL Throw(VMFrame &f);
66 void * JS_FASTCALL LookupSwitch(VMFrame &f, jsbytecode *pc);
67 void * JS_FASTCALL TableSwitch(VMFrame &f, jsbytecode *origPc);
68 void JS_FASTCALL DebugHook(VMFrame &f);
69 void JS_FASTCALL PutCallObject(VMFrame &f);
70 void JS_FASTCALL PutArgsObject(VMFrame &f);
71 void JS_FASTCALL CopyThisv(VMFrame &f);
72 void JS_FASTCALL GetCallObject(VMFrame &f);
74 void JS_FASTCALL BindName(VMFrame &f);
75 JSObject * JS_FASTCALL BindGlobalName(VMFrame &f);
76 void JS_FASTCALL SetName(VMFrame &f, JSAtom *atom);
77 void JS_FASTCALL SetGlobalName(VMFrame &f, JSAtom *atom);
78 void JS_FASTCALL Name(VMFrame &f);
79 void JS_FASTCALL GetProp(VMFrame &f);
80 void JS_FASTCALL GetElem(VMFrame &f);
81 void JS_FASTCALL CallElem(VMFrame &f);
82 void JS_FASTCALL SetElem(VMFrame &f);
83 void JS_FASTCALL Length(VMFrame &f);
84 void JS_FASTCALL CallName(VMFrame &f);
85 void JS_FASTCALL GetUpvar(VMFrame &f, uint32 index);
86 void JS_FASTCALL GetGlobalName(VMFrame &f);
88 void JS_FASTCALL NameInc(VMFrame &f, JSAtom *atom);
89 void JS_FASTCALL NameDec(VMFrame &f, JSAtom *atom);
90 void JS_FASTCALL IncName(VMFrame &f, JSAtom *atom);
91 void JS_FASTCALL DecName(VMFrame &f, JSAtom *atom);
92 void JS_FASTCALL GlobalNameInc(VMFrame &f, JSAtom *atom);
93 void JS_FASTCALL GlobalNameDec(VMFrame &f, JSAtom *atom);
94 void JS_FASTCALL IncGlobalName(VMFrame &f, JSAtom *atom);
95 void JS_FASTCALL DecGlobalName(VMFrame &f, JSAtom *atom);
96 void JS_FASTCALL PropInc(VMFrame &f, JSAtom *atom);
97 void JS_FASTCALL PropDec(VMFrame &f, JSAtom *atom);
98 void JS_FASTCALL IncProp(VMFrame &f, JSAtom *atom);
99 void JS_FASTCALL DecProp(VMFrame &f, JSAtom *atom);
100 void JS_FASTCALL ElemInc(VMFrame &f);
101 void JS_FASTCALL ElemDec(VMFrame &f);
102 void JS_FASTCALL IncElem(VMFrame &f);
103 void JS_FASTCALL DecElem(VMFrame &f);
104 void JS_FASTCALL CallProp(VMFrame &f, JSAtom *atom);
106 void JS_FASTCALL DefFun(VMFrame &f, uint32 index);
107 JSObject * JS_FASTCALL DefLocalFun(VMFrame &f, JSFunction *fun);
108 JSObject * JS_FASTCALL RegExp(VMFrame &f, JSObject *regex);
109 JSObject * JS_FASTCALL Lambda(VMFrame &f, JSFunction *fun);
110 JSObject * JS_FASTCALL FlatLambda(VMFrame &f, JSFunction *fun);
111 void JS_FASTCALL Arguments(VMFrame &f);
112 void JS_FASTCALL EnterBlock(VMFrame &f, JSObject *obj);
113 void JS_FASTCALL LeaveBlock(VMFrame &f);
115 void JS_FASTCALL VpInc(VMFrame &f, Value *vp);
116 void JS_FASTCALL VpDec(VMFrame &f, Value *vp);
117 void JS_FASTCALL DecVp(VMFrame &f, Value *vp);
118 void JS_FASTCALL IncVp(VMFrame &f, Value *vp);
120 JSBool JS_FASTCALL LessThan(VMFrame &f);
121 JSBool JS_FASTCALL LessEqual(VMFrame &f);
122 JSBool JS_FASTCALL GreaterThan(VMFrame &f);
123 JSBool JS_FASTCALL GreaterEqual(VMFrame &f);
124 JSBool JS_FASTCALL Equal(VMFrame &f);
125 JSBool JS_FASTCALL NotEqual(VMFrame &f);
127 void JS_FASTCALL BitOr(VMFrame &f);
128 void JS_FASTCALL BitXor(VMFrame &f);
129 void JS_FASTCALL BitAnd(VMFrame &f);
130 void JS_FASTCALL BitNot(VMFrame &f);
131 void JS_FASTCALL Lsh(VMFrame &f);
132 void JS_FASTCALL Rsh(VMFrame &f);
133 void JS_FASTCALL Ursh(VMFrame &f);
134 void JS_FASTCALL Add(VMFrame &f);
135 void JS_FASTCALL Sub(VMFrame &f);
136 void JS_FASTCALL Mul(VMFrame &f);
137 void JS_FASTCALL Div(VMFrame &f);
138 void JS_FASTCALL Mod(VMFrame &f);
139 void JS_FASTCALL Neg(VMFrame &f);
140 void JS_FASTCALL ObjToStr(VMFrame &f);
141 void JS_FASTCALL Not(VMFrame &f);
142 JSBool JS_FASTCALL StrictEq(VMFrame &f);
143 JSBool JS_FASTCALL StrictNe(VMFrame &f);
145 void JS_FASTCALL Iter(VMFrame &f, uint32 flags);
146 void JS_FASTCALL IterNext(VMFrame &f);
147 JSBool JS_FASTCALL IterMore(VMFrame &f);
148 void JS_FASTCALL EndIter(VMFrame &f);
149 void JS_FASTCALL ForName(VMFrame &f, JSAtom *atom);
151 JSBool JS_FASTCALL ValueToBoolean(VMFrame &f);
152 JSString * JS_FASTCALL TypeOf(VMFrame &f);
153 JSBool JS_FASTCALL InstanceOf(VMFrame &f);
154 JSBool JS_FASTCALL FastInstanceOf(VMFrame &f);
155 void JS_FASTCALL ArgCnt(VMFrame &f);
156 void JS_FASTCALL Unbrand(VMFrame &f);
158 }}} /* namespace stubs,mjit,js */
160 extern "C" void *
161 js_InternalThrow(js::VMFrame &f);
163 #endif /* jslogic_h__ */