diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 17:00:47 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 17:00:47 +0200 |
commit | 727c27a30d10a811d5a3fe04e2407cd7b3993b5e (patch) | |
tree | ffca6abc0cae35533a84df6f19b88f31ca3ad97b /js/src/jit/BaselineCompiler.cpp | |
parent | b311e8fa718e2a32805c25847781cc8a6a0541bd (diff) | |
download | UXP-727c27a30d10a811d5a3fe04e2407cd7b3993b5e.tar UXP-727c27a30d10a811d5a3fe04e2407cd7b3993b5e.tar.gz UXP-727c27a30d10a811d5a3fe04e2407cd7b3993b5e.tar.lz UXP-727c27a30d10a811d5a3fe04e2407cd7b3993b5e.tar.xz UXP-727c27a30d10a811d5a3fe04e2407cd7b3993b5e.zip |
Bug 1342553 - Part 0.2: Support JSOP_CHECKISCALLABLE in JIT
Issue #74
Diffstat (limited to 'js/src/jit/BaselineCompiler.cpp')
-rw-r--r-- | js/src/jit/BaselineCompiler.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp index 4524bae07..07d8e629d 100644 --- a/js/src/jit/BaselineCompiler.cpp +++ b/js/src/jit/BaselineCompiler.cpp @@ -1381,6 +1381,26 @@ BaselineCompiler::emit_JSOP_CHECKISOBJ() return true; } +typedef bool (*CheckIsCallableFn)(JSContext*, HandleValue, CheckIsCallableKind); +static const VMFunction CheckIsCallableInfo = + FunctionInfo<CheckIsCallableFn>(CheckIsCallable, "CheckIsCallable"); + +bool +BaselineCompiler::emit_JSOP_CHECKISCALLABLE() +{ + frame.syncStack(0); + masm.loadValue(frame.addressOfStackValue(frame.peek(-1)), R0); + + prepareVMCall(); + + pushArg(Imm32(GET_UINT8(pc))); + pushArg(R0); + if (!callVM(CheckIsCallableInfo)) + return false; + + return true; +} + typedef bool (*ThrowUninitializedThisFn)(JSContext*, BaselineFrame* frame); static const VMFunction ThrowUninitializedThisInfo = FunctionInfo<ThrowUninitializedThisFn>(BaselineThrowUninitializedThis, |