JSObject* ScriptExecutable::prepareForExecutionImpl( ExecState* exec, JSFunction* function, JSScope* scope, CodeSpecializationKind kind) { VM& vm = exec->vm(); DeferGC deferGC(vm.heap); if (vm.getAndClearFailNextNewCodeBlock()) return createError(exec->callerFrame(), ASCIILiteral("Forced Failure")); JSObject* exception = 0; CodeBlock* codeBlock = newCodeBlockFor(kind, function, scope, exception); if (!codeBlock) { RELEASE_ASSERT(exception); return exception; } if (Options::validateBytecode()) codeBlock->validate(); if (Options::useLLInt()) setupLLInt(vm, codeBlock); else setupJIT(vm, codeBlock); installCode(*codeBlock->vm(), codeBlock, codeBlock->codeType(), codeBlock->specializationKind()); return 0; }
JSObject* ScriptExecutable::prepareForExecutionImpl( ExecState* exec, JSScope* scope, CodeSpecializationKind kind) { VM& vm = exec->vm(); DeferGC deferGC(vm.heap); JSObject* exception = 0; RefPtr<CodeBlock> codeBlock = newCodeBlockFor(kind, scope, exception); if (!codeBlock) { RELEASE_ASSERT(exception); return exception; } bool shouldUseLLInt; #if !ENABLE(JIT) // No JIT implies use of the C Loop LLINT. Override the options to reflect this. Options::useLLInt() = true; shouldUseLLInt = true; #elif ENABLE(LLINT) shouldUseLLInt = Options::useLLInt(); #else shouldUseLLInt = false; #endif if (shouldUseLLInt) setupLLInt(vm, codeBlock.get()); else setupJIT(vm, codeBlock.get()); installCode(codeBlock.get()); return 0; }
bool ComponentImplementation::install () { // // if already installed increment counter only // if (installation_count_) { installation_count_++; return true; } // // create directories for the component implementation // makeDir(installation_dir_); makeDir(build_dir_); // // get info from the software package // CSDReader reader; try { reader.readCSD( package_, &data_, build_path_ ); } catch( CSDReadException ) { removeFileOrDirectory(installation_dir_); removeFileOrDirectory(build_dir_); return false; } // // install code for servants and executors // try { installCode(); } catch( Components::CreateFailure ) { removeFileOrDirectory(installation_dir_); removeFileOrDirectory(build_dir_); return false; } // increment installation counter ( to 1 ) installation_count_++; return true; }
JSObject* ScriptExecutable::prepareForExecutionImpl( ExecState* exec, JSFunction* function, JSScope* scope, CodeSpecializationKind kind) { VM& vm = exec->vm(); DeferGC deferGC(vm.heap); JSObject* exception = 0; RefPtr<CodeBlock> codeBlock = newCodeBlockFor(kind, function, scope, exception); if (!codeBlock) { RELEASE_ASSERT(exception); return exception; } if (Options::validateBytecode()) codeBlock->validate(); if (Options::useLLInt()) setupLLInt(vm, codeBlock.get()); else setupJIT(vm, codeBlock.get()); installCode(codeBlock.get()); return 0; }
void ScriptExecutable::installCode(CodeBlock* codeBlock) { installCode(*codeBlock->vm(), codeBlock, codeBlock->codeType(), codeBlock->specializationKind()); }
void ComponentImplementation::install() throw(Components::CreateFailure) { // // if already installed increment counter only // if (installation_count_) { installation_count_++; DEBUG_OUT3( "..... already installed (", installation_count_, ")" ); return; } // // if without package increment counter only // if (package_.empty()) { installation_count_++; return; } // // create directories for the component implementation // makeDir(data_.installation_dir); makeDir(build_dir_); // // package may be component or composition // Package archive = Package( package_ ); std::string xmlfile_name = archive.getFileNameWithSuffix( ".cad" ); if ( xmlfile_name != std::string( "" ) ) { // // get info from the assembly package // CADReader reader; try { reader.readCAD( package_, &(data_.assembly), build_path_ ); } catch( CADReadException ) { std::cerr << "!!!!! Error during reading .cad" << std::endl; removeFileOrDirectory(data_.installation_dir); removeFileOrDirectory(build_dir_); throw Components::CreateFailure(); } data_.assembly.cad = getFileName( xmlfile_name ); } else { xmlfile_name = archive.getFileNameWithSuffix( ".csd" ); // // get info from the software package // CSDReader reader; try { reader.readCSD( package_, &data_, build_path_ ); } catch( CSDReadException ) { std::cerr << "!!!!! Error during reading .csd" << std::endl; removeFileOrDirectory(data_.installation_dir); removeFileOrDirectory(build_dir_); throw Components::CreateFailure(); } data_.csd = getFileName( xmlfile_name ); } // // install any code // try { installCode(); } catch( Components::CreateFailure ) { removeFileOrDirectory(data_.installation_dir); removeFileOrDirectory(build_dir_); throw Components::CreateFailure(); } // increment installation counter ( to 1 ) installation_count_++; }