| 1 | /* |
| 2 | * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #include "config.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/config.h`/ |
| 27 | #include "Executable.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h`/ |
| 28 | |
| 29 | #include "BytecodeGenerator.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h`/ |
| 30 | #include "CodeBlock.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/bytecode/CodeBlock.h`/ |
| 31 | #include "JIT.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/jit/JIT.h`/ |
| 32 | #include "Parser.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/parser/Parser.h`/ |
| 33 | #include "StringBuilder.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringBuilder.h`/ |
| 34 | #include "Vector.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h`/ |
| 35 | |
| 36 | namespace JSCcxx . . $ `<built-in>:463:9`! { |
| 37 | |
| 38 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JIT) |
| 39 | NativeExecutablecxx . . $ QTJSC/NativeExecutable#::~cxx . . $ QTJSC/NativeExecutable#`~NativeExecutable`(49f6e7a06ebc5aa8).NativeExecutablecxx . . $ QTJSC/NativeExecutable#() |
| 40 | { |
| 41 | } |
| 42 | #endif |
| 43 | |
| 44 | VPtrHackExecutablecxx . . $ QTJSC/VPtrHackExecutable#::~cxx . . $ QTJSC/VPtrHackExecutable#`~VPtrHackExecutable`(49f6e7a06ebc5aa8).VPtrHackExecutablecxx . . $ QTJSC/VPtrHackExecutable#() |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | EvalExecutablecxx . . $ QTJSC/EvalExecutable#::~cxx . . $ QTJSC/EvalExecutable#`~EvalExecutable`(49f6e7a06ebc5aa8).EvalExecutablecxx . . $ QTJSC/EvalExecutable#() |
| 49 | { |
| 50 | delete m_evalCodeBlockcxx . . $ QTJSC/EvalExecutable#m_evalCodeBlock.; |
| 51 | } |
| 52 | |
| 53 | ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#::~cxx . . $ QTJSC/ProgramExecutable#`~ProgramExecutable`(49f6e7a06ebc5aa8).ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#() |
| 54 | { |
| 55 | delete m_programCodeBlockcxx . . $ QTJSC/ProgramExecutable#m_programCodeBlock.; |
| 56 | } |
| 57 | |
| 58 | FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::~cxx . . $ QTJSC/FunctionExecutable#`~FunctionExecutable`(49f6e7a06ebc5aa8).FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#() |
| 59 | { |
| 60 | delete m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock.; |
| 61 | } |
| 62 | |
| 63 | JSObjectcxx . . $ QTJSC/JSObject#* EvalExecutablecxx . . $ QTJSC/EvalExecutable#::compilecxx . . $ QTJSC/EvalExecutable#compile(ed372d110a4a94ac).(ExecStatecxx . . $ QTJSC/ExecState#* exec, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 64 | { |
| 65 | int errLine; |
| 66 | UStringcxx . . $ QTJSC/UString# errMsgcxx . . $ QTJSC/UString#UString(49f6e7a06ebc5aa8).; |
| 67 | RefPtrcxx . . $ RefPtr#<EvalNodecxx . . $ QTJSC/EvalNode#> evalNode = exec->globalData().parser->parse<EvalNode>(&exec->globalData(), exec->lexicalGlobalObject()->debugger(), exec, m_source, &errLine, &errMsg); |
| 68 | if (!evalNode) |
| 69 | return Errorcxx . . $ QTJSC/Error#::createcxx . . $ QTJSC/Error#create(7b4507467ace1137).(exec, SyntaxErrorcxx . . $ QTJSC/SyntaxError., errMsg, errLine, m_source.provider()->asID(), m_source.provider()->url()); |
| 70 | recordParsecxx . . $ QTJSC/ScriptExecutable#recordParse(8c880916ccadf15d).(evalNode->features(), evalNode->lineNo(), evalNode->lastLine()); |
| 71 | |
| 72 | ScopeChaincxx . . $ QTJSC/ScopeChain# scopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(scopeChainNode); |
| 73 | JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#* globalObject = scopeChain.globalObjectcxx . . $ QTJSC/ScopeChain#globalObject(3d50c730b5e26899).(); |
| 74 | |
| 75 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_evalCodeBlock); |
| 76 | m_evalCodeBlockcxx . . $ QTJSC/EvalExecutable#m_evalCodeBlock. = new EvalCodeBlockcxx . . $ QTJSC/EvalCodeBlock#(this, globalObject, sourcecxx . . $ QTJSC/ScriptExecutable#source(95f0f088d0751f0c).().provider(), scopeChain.localDepthcxx . . $ QTJSC/ScopeChain#localDepth(455f465bc33b4cdf).()); |
| 77 | OwnPtrcxx . . $ OwnPtr#<BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#> generator(new BytecodeGenerator(evalNode.get(), globalObject->debugger(), scopeChain, m_evalCodeBlock->symbolTable(), m_evalCodeBlock)); |
| 78 | generator->generate(); |
| 79 | |
| 80 | evalNode->destroyData(); |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | JSObjectcxx . . $ QTJSC/JSObject#* ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#::checkSyntaxcxx . . $ QTJSC/ProgramExecutable#checkSyntax(dc025d143f56633c).(ExecStatecxx . . $ QTJSC/ExecState#* exec) |
| 85 | { |
| 86 | int errLine; |
| 87 | UStringcxx . . $ QTJSC/UString# errMsgcxx . . $ QTJSC/UString#UString(49f6e7a06ebc5aa8).; |
| 88 | RefPtrcxx . . $ RefPtr#<ProgramNodecxx . . $ QTJSC/ProgramNode#> programNode = exec->globalData().parser->parse<ProgramNode>(&exec->globalData(), exec->lexicalGlobalObject()->debugger(), exec, m_source, &errLine, &errMsg); |
| 89 | if (!programNode) |
| 90 | return Errorcxx . . $ QTJSC/Error#::createcxx . . $ QTJSC/Error#create(7b4507467ace1137).(exec, SyntaxErrorcxx . . $ QTJSC/SyntaxError., errMsg, errLine, m_source.provider()->asID(), m_source.provider()->url()); |
| 91 | return 0; |
| 92 | } |
| 93 | |
| 94 | JSObjectcxx . . $ QTJSC/JSObject#* ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#::compilecxx . . $ QTJSC/ProgramExecutable#compile(ed372d110a4a94ac).(ExecStatecxx . . $ QTJSC/ExecState#* exec, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 95 | { |
| 96 | int errLine; |
| 97 | UStringcxx . . $ QTJSC/UString# errMsgcxx . . $ QTJSC/UString#UString(49f6e7a06ebc5aa8).; |
| 98 | RefPtrcxx . . $ RefPtr#<ProgramNodecxx . . $ QTJSC/ProgramNode#> programNode = exec->globalData().parser->parse<ProgramNode>(&exec->globalData(), exec->lexicalGlobalObject()->debugger(), exec, m_source, &errLine, &errMsg); |
| 99 | if (!programNode) |
| 100 | return Errorcxx . . $ QTJSC/Error#::createcxx . . $ QTJSC/Error#create(7b4507467ace1137).(exec, SyntaxErrorcxx . . $ QTJSC/SyntaxError., errMsg, errLine, m_source.provider()->asID(), m_source.provider()->url()); |
| 101 | recordParsecxx . . $ QTJSC/ScriptExecutable#recordParse(8c880916ccadf15d).(programNode->features(), programNode->lineNo(), programNode->lastLine()); |
| 102 | |
| 103 | ScopeChaincxx . . $ QTJSC/ScopeChain# scopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(scopeChainNode); |
| 104 | JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#* globalObject = scopeChain.globalObjectcxx . . $ QTJSC/ScopeChain#globalObject(3d50c730b5e26899).(); |
| 105 | |
| 106 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_programCodeBlock); |
| 107 | m_programCodeBlockcxx . . $ QTJSC/ProgramExecutable#m_programCodeBlock. = new ProgramCodeBlockcxx . . $ QTJSC/ProgramCodeBlock#(this, GlobalCodecxx . . $ QTJSC/GlobalCode., globalObject, sourcecxx . . $ QTJSC/ScriptExecutable#source(95f0f088d0751f0c).().provider()); |
| 108 | OwnPtrcxx . . $ OwnPtr#<BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#> generator(new BytecodeGenerator(programNode.get(), globalObject->debugger(), scopeChain, &globalObject->symbolTable(), m_programCodeBlock)); |
| 109 | generator->generate(); |
| 110 | |
| 111 | programNode->destroyData(); |
| 112 | return 0; |
| 113 | } |
| 114 | |
| 115 | void FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::compilecxx . . $ QTJSC/FunctionExecutable#compile(98b727ac5f0d3552).(ExecStatecxx . . $ QTJSC/ExecState#*, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 116 | { |
| 117 | JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData = scopeChainNode->globalDatacxx . . $ QTJSC/ScopeChainNode#globalData.; |
| 118 | RefPtrcxx . . $ RefPtr#<FunctionBodyNodecxx . . $ QTJSC/FunctionBodyNode#> body = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source); |
| 119 | if (m_forceUsesArgumentscxx . . $ QTJSC/FunctionExecutable#m_forceUsesArguments.) |
| 120 | body->setUsesArguments(); |
| 121 | body->finishParsing(m_parameters, m_name); |
| 122 | recordParsecxx . . $ QTJSC/ScriptExecutable#recordParse(8c880916ccadf15d).(body->features(), body->lineNo(), body->lastLine()); |
| 123 | |
| 124 | ScopeChaincxx . . $ QTJSC/ScopeChain# scopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(scopeChainNode); |
| 125 | JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#* globalObject = scopeChain.globalObjectcxx . . $ QTJSC/ScopeChain#globalObject(3d50c730b5e26899).(); |
| 126 | |
| 127 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_codeBlock); |
| 128 | m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock. = new FunctionCodeBlockcxx . . $ QTJSC/FunctionCodeBlock#(this, FunctionCodecxx . . $ QTJSC/FunctionCode., sourcecxx . . $ QTJSC/ScriptExecutable#source(95f0f088d0751f0c).().provider(), sourcecxx . . $ QTJSC/ScriptExecutable#source(95f0f088d0751f0c).().startOffset()); |
| 129 | OwnPtrcxx . . $ OwnPtr#<BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#> generator(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlock->symbolTable(), m_codeBlock)); |
| 130 | generator->generate(); |
| 131 | m_numParameters = m_codeBlock->m_numParameters; |
| 132 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_numParameters); |
| 133 | m_numVariablescxx . . $ QTJSC/FunctionExecutable#m_numVariables. = m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock.->m_numVarscxx . . $ QTJSC/CodeBlock#m_numVars.; |
| 134 | |
| 135 | body->destroyData(); |
| 136 | } |
| 137 | |
| 138 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JIT) |
| 139 | |
| 140 | void EvalExecutablecxx . . $ QTJSC/EvalExecutable#::generateJITCodecxx . . $ QTJSC/EvalExecutable#generateJITCode(98b727ac5f0d3552).(ExecStatecxx . . $ QTJSC/ExecState#* exec, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 141 | { |
| 142 | CodeBlockcxx . . $ QTJSC/CodeBlock#* codeBlock = &bytecodecxx . . $ QTJSC/EvalExecutable#bytecode(6ed5b0bf59e6bf03).(exec, scopeChainNode); |
| 143 | m_jitCode = JIT::compile(scopeChainNode->globalData, codeBlock); |
| 144 | |
| 145 | #if !ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(OPCODE_SAMPLING) |
| 146 | if (!BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#::dumpsGeneratedCodecxx . . $ QTJSC/BytecodeGenerator#dumpsGeneratedCode(c9857a73d68e59ba).()) |
| 147 | codeBlock->discardBytecodecxx . . $ QTJSC/CodeBlock#discardBytecode(49f6e7a06ebc5aa8).(); |
| 148 | #endif |
| 149 | } |
| 150 | |
| 151 | void ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#::generateJITCodecxx . . $ QTJSC/ProgramExecutable#generateJITCode(98b727ac5f0d3552).(ExecStatecxx . . $ QTJSC/ExecState#* exec, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 152 | { |
| 153 | CodeBlockcxx . . $ QTJSC/CodeBlock#* codeBlock = &bytecodecxx . . $ QTJSC/ProgramExecutable#bytecode(6df5c99e71252eac).(exec, scopeChainNode); |
| 154 | m_jitCode = JIT::compile(scopeChainNode->globalData, codeBlock); |
| 155 | |
| 156 | #if !ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(OPCODE_SAMPLING) |
| 157 | if (!BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#::dumpsGeneratedCodecxx . . $ QTJSC/BytecodeGenerator#dumpsGeneratedCode(c9857a73d68e59ba).()) |
| 158 | codeBlock->discardBytecodecxx . . $ QTJSC/CodeBlock#discardBytecode(49f6e7a06ebc5aa8).(); |
| 159 | #endif |
| 160 | } |
| 161 | |
| 162 | void FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::generateJITCodecxx . . $ QTJSC/FunctionExecutable#generateJITCode(98b727ac5f0d3552).(ExecStatecxx . . $ QTJSC/ExecState#* exec, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode) |
| 163 | { |
| 164 | CodeBlockcxx . . $ QTJSC/CodeBlock#* codeBlock = &bytecodecxx . . $ QTJSC/FunctionExecutable#bytecode(f6188d605a8fbc4b).(exec, scopeChainNode); |
| 165 | m_jitCode = JIT::compile(scopeChainNode->globalData, codeBlock); |
| 166 | |
| 167 | #if !ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(OPCODE_SAMPLING) |
| 168 | if (!BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#::dumpsGeneratedCodecxx . . $ QTJSC/BytecodeGenerator#dumpsGeneratedCode(c9857a73d68e59ba).()) |
| 169 | codeBlock->discardBytecodecxx . . $ QTJSC/CodeBlock#discardBytecode(49f6e7a06ebc5aa8).(); |
| 170 | #endif |
| 171 | } |
| 172 | |
| 173 | #endif |
| 174 | |
| 175 | void FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::markAggregatecxx . . $ QTJSC/FunctionExecutable#markAggregate(bd9cae851d80a865).(MarkStackcxx . . $ QTJSC/MarkStack#& markStack) |
| 176 | { |
| 177 | if (m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock.) |
| 178 | m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock.->markAggregatecxx . . $ QTJSC/CodeBlock#markAggregate(bd9cae851d80a865).(markStack); |
| 179 | } |
| 180 | |
| 181 | ExceptionInfocxx . . $ QTJSC/ExceptionInfo#* FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::reparseExceptionInfocxx . . $ QTJSC/FunctionExecutable#reparseExceptionInfo(5ff41b887c87ff7b).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode, CodeBlockcxx . . $ QTJSC/CodeBlock#* codeBlock) |
| 182 | { |
| 183 | RefPtrcxx . . $ RefPtr#<FunctionBodyNodecxx . . $ QTJSC/FunctionBodyNode#> newFunctionBody = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source); |
| 184 | if (m_forceUsesArgumentscxx . . $ QTJSC/FunctionExecutable#m_forceUsesArguments.) |
| 185 | newFunctionBody->setUsesArguments(); |
| 186 | newFunctionBody->finishParsing(m_parameters, m_name); |
| 187 | |
| 188 | ScopeChaincxx . . $ QTJSC/ScopeChain# scopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(scopeChainNode); |
| 189 | JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#* globalObject = scopeChain.globalObjectcxx . . $ QTJSC/ScopeChain#globalObject(3d50c730b5e26899).(); |
| 190 | |
| 191 | OwnPtrcxx . . $ OwnPtr#<CodeBlockcxx . . $ QTJSC/CodeBlock#> newCodeBlock(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset())); |
| 192 | globalData->functionCodeBlockBeingReparsedcxx . . $ QTJSC/JSGlobalData#functionCodeBlockBeingReparsed. = newCodeBlock.get(); |
| 193 | |
| 194 | OwnPtrcxx . . $ OwnPtr#<BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#> generator(new BytecodeGenerator(newFunctionBody.get(), globalObject->debugger(), scopeChain, newCodeBlock->symbolTable(), newCodeBlock.get())); |
| 195 | generator->setRegeneratingForExceptionInfo(static_cast<FunctionCodeBlock*>(codeBlock)); |
| 196 | generator->generate(); |
| 197 | |
| 198 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(newCodeBlock->instructionCount() == codeBlock->instructionCount()); |
| 199 | |
| 200 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JIT) |
| 201 | JITCodecxx . . $ QTJSC/JITCode# newJITCode = JITcxx . . $ QTJSC/JIT#::compilecxx . . $ QTJSC/JIT#compile(ea072c896f16252c).(globalData, newCodeBlock.get()); |
| 202 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(newJITCode.size() == generatedJITCode().size()); |
| 203 | #endif |
| 204 | |
| 205 | globalData->functionCodeBlockBeingReparsedcxx . . $ QTJSC/JSGlobalData#functionCodeBlockBeingReparsed. = 0; |
| 206 | |
| 207 | return newCodeBlock->extractExceptionInfo(); |
| 208 | } |
| 209 | |
| 210 | ExceptionInfocxx . . $ QTJSC/ExceptionInfo#* EvalExecutablecxx . . $ QTJSC/EvalExecutable#::reparseExceptionInfocxx . . $ QTJSC/EvalExecutable#reparseExceptionInfo(5ff41b887c87ff7b).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChainNode, CodeBlockcxx . . $ QTJSC/CodeBlock#* codeBlock) |
| 211 | { |
| 212 | RefPtrcxx . . $ RefPtr#<EvalNodecxx . . $ QTJSC/EvalNode#> newEvalBody = globalData->parser->parse<EvalNode>(globalData, 0, 0, m_source); |
| 213 | |
| 214 | ScopeChaincxx . . $ QTJSC/ScopeChain# scopeChaincxx . . $ QTJSC/ScopeChain#ScopeChain(fdc7869371484d42).(scopeChainNode); |
| 215 | JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#* globalObject = scopeChain.globalObjectcxx . . $ QTJSC/ScopeChain#globalObject(3d50c730b5e26899).(); |
| 216 | |
| 217 | OwnPtrcxx . . $ OwnPtr#<EvalCodeBlockcxx . . $ QTJSC/EvalCodeBlock#> newCodeBlock(new EvalCodeBlock(this, globalObject, source().provider(), scopeChain.localDepth())); |
| 218 | |
| 219 | OwnPtrcxx . . $ OwnPtr#<BytecodeGeneratorcxx . . $ QTJSC/BytecodeGenerator#> generator(new BytecodeGenerator(newEvalBody.get(), globalObject->debugger(), scopeChain, newCodeBlock->symbolTable(), newCodeBlock.get())); |
| 220 | generator->setRegeneratingForExceptionInfo(static_cast<EvalCodeBlock*>(codeBlock)); |
| 221 | generator->generate(); |
| 222 | |
| 223 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(newCodeBlock->instructionCount() == codeBlock->instructionCount()); |
| 224 | |
| 225 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JIT) |
| 226 | JITCodecxx . . $ QTJSC/JITCode# newJITCode = JITcxx . . $ QTJSC/JIT#::compilecxx . . $ QTJSC/JIT#compile(ea072c896f16252c).(globalData, newCodeBlock.get()); |
| 227 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(newJITCode.size() == generatedJITCode().size()); |
| 228 | #endif |
| 229 | |
| 230 | return newCodeBlock->extractExceptionInfo(); |
| 231 | } |
| 232 | |
| 233 | void FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::recompilecxx . . $ QTJSC/FunctionExecutable#recompile(d2cb180e190a9680).(ExecStatecxx . . $ QTJSC/ExecState#*) |
| 234 | { |
| 235 | delete m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock.; |
| 236 | m_codeBlockcxx . . $ QTJSC/FunctionExecutable#m_codeBlock. = 0; |
| 237 | m_numParameters = NUM_PARAMETERS_NOT_COMPILED; |
| 238 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JIT) |
| 239 | m_jitCode = JITCode(); |
| 240 | #endif |
| 241 | } |
| 242 | |
| 243 | PassRefPtrcxx . . $ PassRefPtr#<FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#> FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::fromGlobalCodecxx . . $ QTJSC/FunctionExecutable#fromGlobalCode(c88f72e13037c1b6).(const Identifiercxx . . $ QTJSC/Identifier#& functionName, ExecStatecxx . . $ QTJSC/ExecState#* exec, Debuggercxx . . $ QTJSC/Debugger#* debugger, const SourceCodecxx . . $ QTJSC/SourceCode#& source, int* errLine, UStringcxx . . $ QTJSC/UString#* errMsg) |
| 244 | { |
| 245 | RefPtrcxx . . $ RefPtr#<ProgramNodecxx . . $ QTJSC/ProgramNode#> program = exec->globalData().parser->parse<ProgramNode>(&exec->globalData(), debugger, exec, source, errLine, errMsg); |
| 246 | if (!program) |
| 247 | return 0; |
| 248 | |
| 249 | StatementNodecxx . . $ QTJSC/StatementNode#* exprStatement = program->singleStatement(); |
| 250 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(exprStatement); |
| 251 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(exprStatement->isExprStatement()); |
| 252 | if (!exprStatement || !exprStatement->isExprStatementcxx . . $ QTJSC/StatementNode#isExprStatement(50ce9a9e25b4a850).()) |
| 253 | return 0; |
| 254 | |
| 255 | ExpressionNodecxx . . $ QTJSC/ExpressionNode#* funcExpr = static_cast<ExprStatementNodecxx . . $ QTJSC/ExprStatementNode#*>(exprStatement)->exprcxx . . $ QTJSC/ExprStatementNode#expr(5819acfedb7fa2ef).(); |
| 256 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(funcExpr); |
| 257 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(funcExpr->isFuncExprNode()); |
| 258 | if (!funcExpr || !funcExpr->isFuncExprNodecxx . . $ QTJSC/ExpressionNode#isFuncExprNode(50ce9a9e25b4a850).()) |
| 259 | return 0; |
| 260 | |
| 261 | FunctionBodyNodecxx . . $ QTJSC/FunctionBodyNode#* body = static_cast<FuncExprNodecxx . . $ QTJSC/FuncExprNode#*>(funcExpr)->bodycxx . . $ QTJSC/FuncExprNode#body(680577f88fc93ff1).(); |
| 262 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(body); |
| 263 | return FunctionExecutable::create(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), functionName, body->sourcecxx . . $ QTJSC/ScopeNode#source(7c036194f7046083).(), body->usesArgumentscxx . . $ QTJSC/ScopeNode#usesArguments(50ce9a9e25b4a850).(), body->parameterscxx . . $ QTJSC/FunctionBodyNode#parameters(ea51493659d65a20).(), body->lineNocxx . . $ QTJSC/Node#lineNo(455f465bc33b4cdf).(), body->lastLinecxx . . $ QTJSC/StatementNode#lastLine(455f465bc33b4cdf).()); |
| 264 | } |
| 265 | |
| 266 | UStringcxx . . $ QTJSC/UString# FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#::paramStringcxx . . $ QTJSC/FunctionExecutable#paramString(ba9ec689f7dd9231).() const |
| 267 | { |
| 268 | FunctionParameterscxx . . $ QTJSC/FunctionParameters#& parameters = *m_parameters; |
| 269 | StringBuildercxx . . $ QTJSC/StringBuilder# builder; |
| 270 | for (size_tcxx . . $ size_t# pos = 0; pos <cxx . . $ QTJSC/`operator<`(11610d830df66bbf). parameters.size(); ++pos) { |
| 271 | if (!builder.isEmptycxx . . $ QTJSC/StringBuilder#isEmpty(c9857a73d68e59ba).()) |
| 272 | builder.appendcxx . . $ QTJSC/StringBuilder#append(85c52e162fed56f9).(", "); |
| 273 | builder.appendcxx . . $ QTJSC/StringBuilder#append(ed53e3bbd3fa2f69).(parameters[pos].ustring()); |
| 274 | } |
| 275 | return buildercxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d)..releasecxx . . $ QTJSC/StringBuilder#release(efe381e3afb22e2c).(); |
| 276 | } |
| 277 | |
| 278 | }; |
| 279 | |
| 280 |