Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef vm_Interpreter_h
8 : #define vm_Interpreter_h
9 :
10 : /*
11 : * JS interpreter interface.
12 : */
13 :
14 : #include "jsiter.h"
15 : #include "jspubtd.h"
16 :
17 : #include "vm/Stack.h"
18 :
19 : namespace js {
20 :
21 : class EnvironmentIter;
22 :
23 : /*
24 : * Convert null/undefined |thisv| into the current global object for the
25 : * compartment, and replace other primitives with boxed versions.
26 : */
27 : extern bool
28 : BoxNonStrictThis(JSContext* cx, HandleValue thisv, MutableHandleValue vp);
29 :
30 : extern bool
31 : GetFunctionThis(JSContext* cx, AbstractFramePtr frame, MutableHandleValue res);
32 :
33 : extern bool
34 : GetNonSyntacticGlobalThis(JSContext* cx, HandleObject envChain, MutableHandleValue res);
35 :
36 : /*
37 : * numToSkip is the number of stack values the expression decompiler should skip
38 : * before it reaches |v|. If it's -1, the decompiler will search the stack.
39 : */
40 : extern bool
41 : ReportIsNotFunction(JSContext* cx, HandleValue v, int numToSkip,
42 : MaybeConstruct construct = NO_CONSTRUCT);
43 :
44 : /* See ReportIsNotFunction comment for the meaning of numToSkip. */
45 : extern JSObject*
46 : ValueToCallable(JSContext* cx, HandleValue v, int numToSkip = -1,
47 : MaybeConstruct construct = NO_CONSTRUCT);
48 :
49 : /*
50 : * Call or construct arguments that are stored in rooted memory.
51 : *
52 : * NOTE: Any necessary |GetThisValue| computation must have been performed on
53 : * |args.thisv()|, likely by the interpreter when pushing |this| onto the
54 : * stack. If you're not sure whether |GetThisValue| processing has been
55 : * performed, use |Invoke|.
56 : */
57 : extern bool
58 : InternalCallOrConstruct(JSContext* cx, const CallArgs& args,
59 : MaybeConstruct construct);
60 :
61 : /*
62 : * These helpers take care of the infinite-recursion check necessary for
63 : * getter/setter calls.
64 : */
65 : extern bool
66 : CallGetter(JSContext* cx, HandleValue thisv, HandleValue getter, MutableHandleValue rval);
67 :
68 : extern bool
69 : CallSetter(JSContext* cx, HandleValue thisv, HandleValue setter, HandleValue rval);
70 :
71 : // ES7 rev 0c1bd3004329336774cbc90de727cd0cf5f11e93 7.3.12 Call(F, V, argumentsList).
72 : // All parameters are required, hopefully forcing callers to be careful not to
73 : // (say) blindly pass callee as |newTarget| when a different value should have
74 : // been passed. Behavior is unspecified if any element of |args| isn't initialized.
75 : //
76 : // |rval| is written to *only* after |fval| and |thisv| have been consumed, so
77 : // |rval| *may* alias either argument.
78 : extern bool
79 : Call(JSContext* cx, HandleValue fval, HandleValue thisv, const AnyInvokeArgs& args,
80 : MutableHandleValue rval);
81 :
82 : inline bool
83 1 : Call(JSContext* cx, HandleValue fval, HandleValue thisv, MutableHandleValue rval)
84 : {
85 2 : FixedInvokeArgs<0> args(cx);
86 2 : return Call(cx, fval, thisv, args, rval);
87 : }
88 :
89 : inline bool
90 110 : Call(JSContext* cx, HandleValue fval, JSObject* thisObj, MutableHandleValue rval)
91 : {
92 220 : RootedValue thisv(cx, ObjectOrNullValue(thisObj));
93 220 : FixedInvokeArgs<0> args(cx);
94 220 : return Call(cx, fval, thisv, args, rval);
95 : }
96 :
97 : inline bool
98 866 : Call(JSContext* cx, HandleValue fval, HandleValue thisv, HandleValue arg0, MutableHandleValue rval)
99 : {
100 1732 : FixedInvokeArgs<1> args(cx);
101 866 : args[0].set(arg0);
102 1732 : return Call(cx, fval, thisv, args, rval);
103 : }
104 :
105 : inline bool
106 75 : Call(JSContext* cx, HandleValue fval, JSObject* thisObj, HandleValue arg0,
107 : MutableHandleValue rval)
108 : {
109 150 : RootedValue thisv(cx, ObjectOrNullValue(thisObj));
110 150 : FixedInvokeArgs<1> args(cx);
111 75 : args[0].set(arg0);
112 150 : return Call(cx, fval, thisv, args, rval);
113 : }
114 :
115 : inline bool
116 0 : Call(JSContext* cx, HandleValue fval, HandleValue thisv,
117 : HandleValue arg0, HandleValue arg1, MutableHandleValue rval)
118 : {
119 0 : FixedInvokeArgs<2> args(cx);
120 0 : args[0].set(arg0);
121 0 : args[1].set(arg1);
122 0 : return Call(cx, fval, thisv, args, rval);
123 : }
124 :
125 : inline bool
126 110 : Call(JSContext* cx, HandleValue fval, JSObject* thisObj,
127 : HandleValue arg0, HandleValue arg1, MutableHandleValue rval)
128 : {
129 220 : RootedValue thisv(cx, ObjectOrNullValue(thisObj));
130 220 : FixedInvokeArgs<2> args(cx);
131 110 : args[0].set(arg0);
132 110 : args[1].set(arg1);
133 220 : return Call(cx, fval, thisv, args, rval);
134 : }
135 :
136 : // Perform the above Call() operation using the given arguments. Similar to
137 : // ConstructFromStack() below, this handles |!IsCallable(args.calleev())|.
138 : //
139 : // This internal operation is intended only for use with arguments known to be
140 : // on the JS stack, or at least in carefully-rooted memory. The vast majority of
141 : // potential users should instead use InvokeArgs in concert with Call().
142 : extern bool
143 : CallFromStack(JSContext* cx, const CallArgs& args);
144 :
145 : // ES6 7.3.13 Construct(F, argumentsList, newTarget). All parameters are
146 : // required, hopefully forcing callers to be careful not to (say) blindly pass
147 : // callee as |newTarget| when a different value should have been passed.
148 : // Behavior is unspecified if any element of |args| isn't initialized.
149 : //
150 : // |rval| is written to *only* after |fval| and |newTarget| have been consumed,
151 : // so |rval| *may* alias either argument.
152 : //
153 : // NOTE: As with the ES6 spec operation, it's the caller's responsibility to
154 : // ensure |fval| and |newTarget| are both |IsConstructor|.
155 : extern bool
156 : Construct(JSContext* cx, HandleValue fval, const AnyConstructArgs& args, HandleValue newTarget,
157 : MutableHandleObject objp);
158 :
159 : // Check that in the given |args|, which must be |args.isConstructing()|, that
160 : // |IsConstructor(args.callee())|. If this is not the case, throw a TypeError.
161 : // Otherwise, the user must ensure that, additionally, |IsConstructor(args.newTarget())|.
162 : // (If |args| comes directly from the interpreter stack, as set up by JSOP_NEW,
163 : // this comes for free.) Then perform a Construct() operation using |args|.
164 : //
165 : // This internal operation is intended only for use with arguments known to be
166 : // on the JS stack, or at least in carefully-rooted memory. The vast majority of
167 : // potential users should instead use ConstructArgs in concert with Construct().
168 : extern bool
169 : ConstructFromStack(JSContext* cx, const CallArgs& args);
170 :
171 : // Call Construct(fval, args, newTarget), but use the given |thisv| as |this|
172 : // during construction of |fval|.
173 : //
174 : // |rval| is written to *only* after |fval|, |thisv|, and |newTarget| have been
175 : // consumed, so |rval| *may* alias any of these arguments.
176 : //
177 : // This method exists only for very rare cases where a |this| was created
178 : // caller-side for construction of |fval|: basically only for JITs using
179 : // |CreateThis|. If that's not you, use Construct()!
180 : extern bool
181 : InternalConstructWithProvidedThis(JSContext* cx, HandleValue fval, HandleValue thisv,
182 : const AnyConstructArgs& args, HandleValue newTarget,
183 : MutableHandleValue rval);
184 :
185 : /*
186 : * Executes a script with the given scopeChain/this. The 'type' indicates
187 : * whether this is eval code or global code. To support debugging, the
188 : * evalFrame parameter can point to an arbitrary frame in the context's call
189 : * stack to simulate executing an eval in that frame.
190 : */
191 : extern bool
192 : ExecuteKernel(JSContext* cx, HandleScript script, JSObject& scopeChain,
193 : const Value& newTargetVal, AbstractFramePtr evalInFrame, Value* result);
194 :
195 : /* Execute a script with the given scopeChain as global code. */
196 : extern bool
197 : Execute(JSContext* cx, HandleScript script, JSObject& scopeChain, Value* rval);
198 :
199 : class ExecuteState;
200 : class InvokeState;
201 :
202 : // RunState is passed to RunScript and RunScript then either passes it to the
203 : // interpreter or to the JITs. RunState contains all information we need to
204 : // construct an interpreter or JIT frame.
205 19625 : class RunState
206 : {
207 : protected:
208 : enum Kind { Execute, Invoke };
209 : Kind kind_;
210 :
211 : RootedScript script_;
212 :
213 19633 : explicit RunState(JSContext* cx, Kind kind, JSScript* script)
214 19633 : : kind_(kind),
215 19633 : script_(cx, script)
216 19633 : { }
217 :
218 : public:
219 498 : bool isExecute() const { return kind_ == Execute; }
220 196764 : bool isInvoke() const { return kind_ == Invoke; }
221 :
222 498 : ExecuteState* asExecute() const {
223 498 : MOZ_ASSERT(isExecute());
224 498 : return (ExecuteState*)this;
225 : }
226 101401 : InvokeState* asInvoke() const {
227 101401 : MOZ_ASSERT(isInvoke());
228 101401 : return (InvokeState*)this;
229 : }
230 :
231 127881 : JS::HandleScript script() const { return script_; }
232 :
233 : virtual InterpreterFrame* pushInterpreterFrame(JSContext* cx) = 0;
234 : virtual void setReturnValue(const Value& v) = 0;
235 :
236 : bool maybeCreateThisForConstructor(JSContext* cx);
237 :
238 : private:
239 : RunState(const RunState& other) = delete;
240 : RunState(const ExecuteState& other) = delete;
241 : RunState(const InvokeState& other) = delete;
242 : void operator=(const RunState& other) = delete;
243 : };
244 :
245 : // Eval or global script.
246 494 : class ExecuteState : public RunState
247 : {
248 : RootedValue newTargetValue_;
249 : RootedObject envChain_;
250 :
251 : AbstractFramePtr evalInFrame_;
252 : Value* result_;
253 :
254 : public:
255 498 : ExecuteState(JSContext* cx, JSScript* script, const Value& newTargetValue,
256 : JSObject& envChain, AbstractFramePtr evalInFrame, Value* result)
257 498 : : RunState(cx, Execute, script),
258 : newTargetValue_(cx, newTargetValue),
259 996 : envChain_(cx, &envChain),
260 : evalInFrame_(evalInFrame),
261 1494 : result_(result)
262 498 : { }
263 :
264 0 : Value newTarget() { return newTargetValue_; }
265 0 : JSObject* environmentChain() const { return envChain_; }
266 498 : bool isDebuggerEval() const { return !!evalInFrame_; }
267 :
268 : virtual InterpreterFrame* pushInterpreterFrame(JSContext* cx);
269 :
270 494 : virtual void setReturnValue(const Value& v) {
271 494 : if (result_)
272 491 : *result_ = v;
273 494 : }
274 : };
275 :
276 : // Data to invoke a function.
277 19131 : class InvokeState final : public RunState
278 : {
279 : const CallArgs& args_;
280 : MaybeConstruct construct_;
281 : bool createSingleton_;
282 :
283 : public:
284 19135 : InvokeState(JSContext* cx, const CallArgs& args, MaybeConstruct construct)
285 19135 : : RunState(cx, Invoke, args.callee().as<JSFunction>().nonLazyScript()),
286 : args_(args),
287 : construct_(construct),
288 19135 : createSingleton_(false)
289 19135 : { }
290 :
291 466 : bool createSingleton() const { return createSingleton_; }
292 0 : void setCreateSingleton() { createSingleton_ = true; }
293 :
294 55665 : bool constructing() const { return construct_; }
295 77745 : const CallArgs& args() const { return args_; }
296 :
297 : virtual InterpreterFrame* pushInterpreterFrame(JSContext* cx);
298 :
299 17368 : virtual void setReturnValue(const Value& v) {
300 17368 : args_.rval().set(v);
301 17368 : }
302 : };
303 :
304 : extern bool
305 : RunScript(JSContext* cx, RunState& state);
306 :
307 : extern bool
308 : StrictlyEqual(JSContext* cx, HandleValue lval, HandleValue rval, bool* equal);
309 :
310 : extern bool
311 : LooselyEqual(JSContext* cx, HandleValue lval, HandleValue rval, bool* equal);
312 :
313 : /* === except that NaN is the same as NaN and -0 is not the same as +0. */
314 : extern bool
315 : SameValue(JSContext* cx, HandleValue v1, HandleValue v2, bool* same);
316 :
317 : extern JSType
318 : TypeOfObject(JSObject* obj);
319 :
320 : extern JSType
321 : TypeOfValue(const Value& v);
322 :
323 : extern bool
324 : InstanceOfOperator(JSContext* cx, HandleObject obj, HandleValue v, bool* bp);
325 :
326 : extern bool
327 : HasInstance(JSContext* cx, HandleObject obj, HandleValue v, bool* bp);
328 :
329 : // Unwind environment chain and iterator to match the scope corresponding to
330 : // the given bytecode position.
331 : extern void
332 : UnwindEnvironment(JSContext* cx, EnvironmentIter& ei, jsbytecode* pc);
333 :
334 : // Unwind all environments.
335 : extern void
336 : UnwindAllEnvironmentsInFrame(JSContext* cx, EnvironmentIter& ei);
337 :
338 : // Compute the pc needed to unwind the scope to the beginning of the block
339 : // pointed to by the try note.
340 : extern jsbytecode*
341 : UnwindEnvironmentToTryPc(JSScript* script, JSTryNote* tn);
342 :
343 : template <class StackDepthOp>
344 2071 : class MOZ_STACK_CLASS TryNoteIter
345 : {
346 : RootedScript script_;
347 : uint32_t pcOffset_;
348 : JSTryNote* tn_;
349 : JSTryNote* tnEnd_;
350 : StackDepthOp getStackDepth_;
351 :
352 2173 : void settle() {
353 2275 : for (; tn_ != tnEnd_; ++tn_) {
354 : /* If pc is out of range, try the next one. */
355 2083 : if (pcOffset_ - tn_->start >= tn_->length)
356 102 : continue;
357 :
358 : /*
359 : * We have a note that covers the exception pc but we must check
360 : * whether the interpreter has already executed the corresponding
361 : * handler. This is possible when the executed bytecode implements
362 : * break or return from inside a for-in loop.
363 : *
364 : * In this case the emitter generates additional [enditer] and [gosub]
365 : * opcodes to close all outstanding iterators and execute the finally
366 : * blocks. If such an [enditer] throws an exception, its pc can still
367 : * be inside several nested for-in loops and try-finally statements
368 : * even if we have already closed the corresponding iterators and
369 : * invoked the finally blocks.
370 : *
371 : * To address this, we make [enditer] always decrease the stack even
372 : * when its implementation throws an exception. Thus already executed
373 : * [enditer] and [gosub] opcodes will have try notes with the stack
374 : * depth exceeding the current one and this condition is what we use to
375 : * filter them out.
376 : */
377 1981 : if (tn_->stackDepth <= getStackDepth_())
378 1981 : break;
379 : }
380 2071 : }
381 :
382 : public:
383 2071 : TryNoteIter(JSContext* cx, JSScript* script, jsbytecode* pc,
384 : StackDepthOp getStackDepth)
385 : : script_(cx, script),
386 2071 : pcOffset_(pc - script->main()),
387 4142 : getStackDepth_(getStackDepth)
388 : {
389 2071 : if (script->hasTrynotes()) {
390 2061 : tn_ = script->trynotes()->vector;
391 2061 : tnEnd_ = tn_ + script->trynotes()->length;
392 : } else {
393 10 : tn_ = tnEnd_ = nullptr;
394 : }
395 2071 : settle();
396 2071 : }
397 :
398 0 : void operator++() {
399 0 : ++tn_;
400 0 : settle();
401 0 : }
402 :
403 2071 : bool done() const { return tn_ == tnEnd_; }
404 1981 : JSTryNote* operator*() const { return tn_; }
405 : };
406 :
407 : bool
408 : HandleClosingGeneratorReturn(JSContext* cx, AbstractFramePtr frame, bool ok);
409 :
410 : /************************************************************************/
411 :
412 : bool
413 : Throw(JSContext* cx, HandleValue v);
414 :
415 : bool
416 : ThrowingOperation(JSContext* cx, HandleValue v);
417 :
418 : bool
419 : GetProperty(JSContext* cx, HandleValue value, HandlePropertyName name, MutableHandleValue vp);
420 :
421 : JSObject*
422 : Lambda(JSContext* cx, HandleFunction fun, HandleObject parent);
423 :
424 : JSObject*
425 : LambdaArrow(JSContext* cx, HandleFunction fun, HandleObject parent, HandleValue newTargetv);
426 :
427 : bool
428 : GetElement(JSContext* cx, MutableHandleValue lref, HandleValue rref, MutableHandleValue res);
429 :
430 : bool
431 : CallElement(JSContext* cx, MutableHandleValue lref, HandleValue rref, MutableHandleValue res);
432 :
433 : bool
434 : SetObjectElement(JSContext* cx, HandleObject obj, HandleValue index, HandleValue value,
435 : bool strict);
436 : bool
437 : SetObjectElement(JSContext* cx, HandleObject obj, HandleValue index, HandleValue value,
438 : bool strict, HandleScript script, jsbytecode* pc);
439 :
440 : bool
441 : SetObjectElement(JSContext* cx, HandleObject obj, HandleValue index, HandleValue value,
442 : HandleValue receiver, bool strict);
443 : bool
444 : SetObjectElement(JSContext* cx, HandleObject obj, HandleValue index, HandleValue value,
445 : HandleValue receiver, bool strict, HandleScript script, jsbytecode* pc);
446 :
447 : bool
448 : InitElementArray(JSContext* cx, jsbytecode* pc,
449 : HandleObject obj, uint32_t index, HandleValue value);
450 :
451 : bool
452 : AddValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
453 :
454 : bool
455 : SubValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
456 :
457 : bool
458 : MulValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
459 :
460 : bool
461 : DivValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
462 :
463 : bool
464 : ModValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
465 :
466 : bool
467 : UrshValues(JSContext* cx, MutableHandleValue lhs, MutableHandleValue rhs, MutableHandleValue res);
468 :
469 : bool
470 : AtomicIsLockFree(JSContext* cx, HandleValue in, int* out);
471 :
472 : template <bool strict>
473 : bool
474 : DeletePropertyJit(JSContext* ctx, HandleValue val, HandlePropertyName name, bool* bv);
475 :
476 : template <bool strict>
477 : bool
478 : DeleteElementJit(JSContext* cx, HandleValue val, HandleValue index, bool* bv);
479 :
480 : bool
481 : DefFunOperation(JSContext* cx, HandleScript script, HandleObject envChain, HandleFunction funArg);
482 :
483 : bool
484 : ThrowMsgOperation(JSContext* cx, const unsigned errorNum);
485 :
486 : bool
487 : GetAndClearException(JSContext* cx, MutableHandleValue res);
488 :
489 : bool
490 : DeleteNameOperation(JSContext* cx, HandlePropertyName name, HandleObject scopeObj,
491 : MutableHandleValue res);
492 :
493 : bool
494 : ImplicitThisOperation(JSContext* cx, HandleObject scopeObj, HandlePropertyName name,
495 : MutableHandleValue res);
496 :
497 : bool
498 : RunOnceScriptPrologue(JSContext* cx, HandleScript script);
499 :
500 : bool
501 : InitGetterSetterOperation(JSContext* cx, jsbytecode* pc, HandleObject obj, HandleId id,
502 : HandleObject val);
503 :
504 : bool
505 : InitGetterSetterOperation(JSContext* cx, jsbytecode* pc, HandleObject obj, HandlePropertyName name,
506 : HandleObject val);
507 :
508 : unsigned
509 : GetInitDataPropAttrs(JSOp op);
510 :
511 : bool
512 : EnterWithOperation(JSContext* cx, AbstractFramePtr frame, HandleValue val,
513 : Handle<WithScope*> scope);
514 :
515 :
516 : bool
517 : InitGetterSetterOperation(JSContext* cx, jsbytecode* pc, HandleObject obj, HandleValue idval,
518 : HandleObject val);
519 :
520 : bool
521 : SpreadCallOperation(JSContext* cx, HandleScript script, jsbytecode* pc, HandleValue thisv,
522 : HandleValue callee, HandleValue arr, HandleValue newTarget, MutableHandleValue res);
523 :
524 : bool
525 : OptimizeSpreadCall(JSContext* cx, HandleValue arg, bool* optimized);
526 :
527 : JSObject*
528 : NewObjectOperation(JSContext* cx, HandleScript script, jsbytecode* pc,
529 : NewObjectKind newKind = GenericObject);
530 :
531 : JSObject*
532 : NewObjectOperationWithTemplate(JSContext* cx, HandleObject templateObject);
533 :
534 : JSObject*
535 : NewArrayOperation(JSContext* cx, HandleScript script, jsbytecode* pc, uint32_t length,
536 : NewObjectKind newKind = GenericObject);
537 :
538 : JSObject*
539 : NewArrayOperationWithTemplate(JSContext* cx, HandleObject templateObject);
540 :
541 : void
542 : ReportRuntimeLexicalError(JSContext* cx, unsigned errorNumber, HandleId id);
543 :
544 : void
545 : ReportRuntimeLexicalError(JSContext* cx, unsigned errorNumber, HandlePropertyName name);
546 :
547 : void
548 : ReportRuntimeLexicalError(JSContext* cx, unsigned errorNumber, HandleScript script, jsbytecode* pc);
549 :
550 : // The parser only reports redeclarations that occurs within a single
551 : // script. Due to the extensibility of the global lexical scope, we also check
552 : // for redeclarations during runtime in JSOP_DEF{VAR,LET,CONST}.
553 : void
554 : ReportRuntimeRedeclaration(JSContext* cx, HandlePropertyName name, const char* redeclKind);
555 :
556 : enum class CheckIsObjectKind : uint8_t {
557 : IteratorNext,
558 : IteratorReturn,
559 : IteratorThrow,
560 : GetIterator,
561 : GetAsyncIterator
562 : };
563 :
564 : bool
565 : ThrowCheckIsObject(JSContext* cx, CheckIsObjectKind kind);
566 :
567 : enum class CheckIsCallableKind : uint8_t {
568 : IteratorReturn
569 : };
570 :
571 : bool
572 : ThrowCheckIsCallable(JSContext* cx, CheckIsCallableKind kind);
573 :
574 : bool
575 : ThrowUninitializedThis(JSContext* cx, AbstractFramePtr frame);
576 :
577 : bool
578 : ThrowInitializedThis(JSContext* cx, AbstractFramePtr frame);
579 :
580 : bool
581 : DefaultClassConstructor(JSContext* cx, unsigned argc, Value* vp);
582 :
583 : bool
584 : Debug_CheckSelfHosted(JSContext* cx, HandleValue v);
585 :
586 : bool
587 : CheckClassHeritageOperation(JSContext* cx, HandleValue heritage);
588 :
589 : JSObject*
590 : ObjectWithProtoOperation(JSContext* cx, HandleValue proto);
591 :
592 : JSObject*
593 : FunWithProtoOperation(JSContext* cx, HandleFunction fun, HandleObject parent, HandleObject proto);
594 :
595 : JSFunction*
596 : MakeDefaultConstructor(JSContext* cx, HandleScript script, jsbytecode* pc, HandleObject proto);
597 :
598 : JSObject*
599 : HomeObjectSuperBase(JSContext* cx, HandleObject homeObj);
600 :
601 : JSObject*
602 : SuperFunOperation(JSContext* cx, HandleObject callee);
603 :
604 : bool
605 : SetPropertySuper(JSContext* cx, HandleObject obj, HandleValue receiver,
606 : HandlePropertyName id, HandleValue rval, bool strict);
607 :
608 : } /* namespace js */
609 :
610 : #endif /* vm_Interpreter_h */
|