Mercurial > cgi-bin > hgwebdir.cgi > PR > PR_Integrations > javascript > SpiderMonkey
changeset 6:c82791ba5ce1
added two-context test, from botton of pdf, plus pdf
line diff
1.1 --- a/CppApplication_1 (copy)/.dep.inc Sat Feb 01 08:51:00 2014 -0800 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,5 +0,0 @@ 1.4 -# This code depends on make tool being used 1.5 -DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES})) 1.6 -ifneq (${DEPFILES},) 1.7 -include ${DEPFILES} 1.8 -endif
2.1 --- a/CppApplication_1 (copy)/Makefile Sat Feb 01 08:51:00 2014 -0800 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,128 +0,0 @@ 2.4 -# 2.5 -# There exist several targets which are by default empty and which can be 2.6 -# used for execution of your targets. These targets are usually executed 2.7 -# before and after some main targets. They are: 2.8 -# 2.9 -# .build-pre: called before 'build' target 2.10 -# .build-post: called after 'build' target 2.11 -# .clean-pre: called before 'clean' target 2.12 -# .clean-post: called after 'clean' target 2.13 -# .clobber-pre: called before 'clobber' target 2.14 -# .clobber-post: called after 'clobber' target 2.15 -# .all-pre: called before 'all' target 2.16 -# .all-post: called after 'all' target 2.17 -# .help-pre: called before 'help' target 2.18 -# .help-post: called after 'help' target 2.19 -# 2.20 -# Targets beginning with '.' are not intended to be called on their own. 2.21 -# 2.22 -# Main targets can be executed directly, and they are: 2.23 -# 2.24 -# build build a specific configuration 2.25 -# clean remove built files from a configuration 2.26 -# clobber remove all built files 2.27 -# all build all configurations 2.28 -# help print help mesage 2.29 -# 2.30 -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and 2.31 -# .help-impl are implemented in nbproject/makefile-impl.mk. 2.32 -# 2.33 -# Available make variables: 2.34 -# 2.35 -# CND_BASEDIR base directory for relative paths 2.36 -# CND_DISTDIR default top distribution directory (build artifacts) 2.37 -# CND_BUILDDIR default top build directory (object files, ...) 2.38 -# CONF name of current configuration 2.39 -# CND_PLATFORM_${CONF} platform name (current configuration) 2.40 -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) 2.41 -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) 2.42 -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) 2.43 -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) 2.44 -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) 2.45 -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) 2.46 -# 2.47 -# NOCDDL 2.48 - 2.49 - 2.50 -# Environment 2.51 -MKDIR=mkdir 2.52 -CP=cp 2.53 -CCADMIN=CCadmin 2.54 - 2.55 - 2.56 -# build 2.57 -build: .build-post 2.58 - 2.59 -.build-pre: 2.60 -# Add your pre 'build' code here... 2.61 - 2.62 -.build-post: .build-impl 2.63 -# Add your post 'build' code here... 2.64 - 2.65 - 2.66 -# clean 2.67 -clean: .clean-post 2.68 - 2.69 -.clean-pre: 2.70 -# Add your pre 'clean' code here... 2.71 - 2.72 -.clean-post: .clean-impl 2.73 -# Add your post 'clean' code here... 2.74 - 2.75 - 2.76 -# clobber 2.77 -clobber: .clobber-post 2.78 - 2.79 -.clobber-pre: 2.80 -# Add your pre 'clobber' code here... 2.81 - 2.82 -.clobber-post: .clobber-impl 2.83 -# Add your post 'clobber' code here... 2.84 - 2.85 - 2.86 -# all 2.87 -all: .all-post 2.88 - 2.89 -.all-pre: 2.90 -# Add your pre 'all' code here... 2.91 - 2.92 -.all-post: .all-impl 2.93 -# Add your post 'all' code here... 2.94 - 2.95 - 2.96 -# build tests 2.97 -build-tests: .build-tests-post 2.98 - 2.99 -.build-tests-pre: 2.100 -# Add your pre 'build-tests' code here... 2.101 - 2.102 -.build-tests-post: .build-tests-impl 2.103 -# Add your post 'build-tests' code here... 2.104 - 2.105 - 2.106 -# run tests 2.107 -test: .test-post 2.108 - 2.109 -.test-pre: 2.110 -# Add your pre 'test' code here... 2.111 - 2.112 -.test-post: .test-impl 2.113 -# Add your post 'test' code here... 2.114 - 2.115 - 2.116 -# help 2.117 -help: .help-post 2.118 - 2.119 -.help-pre: 2.120 -# Add your pre 'help' code here... 2.121 - 2.122 -.help-post: .help-impl 2.123 -# Add your post 'help' code here... 2.124 - 2.125 - 2.126 - 2.127 -# include project implementation makefile 2.128 -include nbproject/Makefile-impl.mk 2.129 - 2.130 -# include project make variables 2.131 -include nbproject/Makefile-variables.mk
3.1 Binary file CppApplication_1 (copy)/build/Debug/GNU-Linux-x86/first.o has changed
4.1 --- a/CppApplication_1 (copy)/build/Debug/GNU-Linux-x86/first.o.d Sat Feb 01 08:51:00 2014 -0800 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,34 +0,0 @@ 4.4 -build/Debug/GNU-Linux-x86/first.o: first.cpp \ 4.5 - /usr/local/include/js/jsapi.h /usr/local/include/js/js-config.h \ 4.6 - /usr/local/include/js/jspubtd.h /usr/local/include/js/jstypes.h \ 4.7 - /usr/local/include/js/jsautocfg.h /usr/local/include/js/jsinttypes.h \ 4.8 - /usr/local/include/js/jsotypes.h /usr/local/include/js/jscompat.h \ 4.9 - /usr/local/include/js/jslong.h /usr/local/include/js/jsval.h \ 4.10 - /usr/local/include/js/jsutil.h /usr/local/include/js/jsproto.tbl \ 4.11 - /usr/local/include/js/jsversion.h 4.12 - 4.13 -/usr/local/include/js/jsapi.h: 4.14 - 4.15 -/usr/local/include/js/js-config.h: 4.16 - 4.17 -/usr/local/include/js/jspubtd.h: 4.18 - 4.19 -/usr/local/include/js/jstypes.h: 4.20 - 4.21 -/usr/local/include/js/jsautocfg.h: 4.22 - 4.23 -/usr/local/include/js/jsinttypes.h: 4.24 - 4.25 -/usr/local/include/js/jsotypes.h: 4.26 - 4.27 -/usr/local/include/js/jscompat.h: 4.28 - 4.29 -/usr/local/include/js/jslong.h: 4.30 - 4.31 -/usr/local/include/js/jsval.h: 4.32 - 4.33 -/usr/local/include/js/jsutil.h: 4.34 - 4.35 -/usr/local/include/js/jsproto.tbl: 4.36 - 4.37 -/usr/local/include/js/jsversion.h:
5.1 Binary file CppApplication_1 (copy)/dist/Debug/GNU-Linux-x86/cppapplication_1 has changed
6.1 --- a/CppApplication_1 (copy)/first.cpp Sat Feb 01 08:51:00 2014 -0800 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,176 +0,0 @@ 6.4 -/* 6.5 - * File: first.cpp 6.6 - * Author: sara 6.7 - * 6.8 - * Created on December 30, 2013, 11:41 AM 6.9 - */ 6.10 - 6.11 -#include <cstdlib> 6.12 -/* Include the JSAPI header file to get access to SpiderMonkey. */ 6.13 -#include "jsapi.h" 6.14 -#include <pthread.h> 6.15 - 6.16 -using namespace std; 6.17 -struct thread_parameter 6.18 -{ 6.19 - // char *uncompiledScript; 6.20 - // JSObject *sharedGlobalObject; 6.21 - // JSRuntime *currRt; 6.22 - char *tempstr; 6.23 - 6.24 - 6.25 -}; 6.26 -/* The class of the global object. */ 6.27 -JSRuntime *rt; 6.28 -JSObject *global; 6.29 -static JSClass global_class = { 6.30 - "global", JSCLASS_GLOBAL_FLAGS, 6.31 - JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 6.32 - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 6.33 - JSCLASS_NO_OPTIONAL_MEMBERS 6.34 -}; 6.35 - 6.36 -/* The error reporter callback. */ 6.37 -void reportError(JSContext *cx, const char *message, JSErrorReport *report) 6.38 -{ 6.39 - fprintf(stderr, "%s:%u:%s\n", 6.40 - report->filename ? report->filename : "<no filename=\"filename\">", 6.41 - (unsigned int) report->lineno, 6.42 - message); 6.43 -} 6.44 -/** the function which the thread executes when is created at main 6.45 - *@parameter structure of all the argument the function needs 6.46 - *@return return null at the end 6.47 -*/ 6.48 -void *threadFunction(void* arg){ 6.49 - /* indicates that the execution of the script is executed successfully or not*/ 6.50 - bool execute; 6.51 - int temp = 1; 6.52 -// char *script = "'Hi' + 'Sara'"; 6.53 - char threadScript[] = "'Hi ' + 'Sara!'"; 6.54 - char *scr = threadScript; 6.55 - JSString *outStr; 6.56 -/* carries the value of the last expression of the script*/ 6.57 - jsval rval1; 6.58 - 6.59 -/* The new context which is created by the thread*/ 6.60 - JSContext *currContext; 6.61 -/* pass the incoming argument of the function */ 6.62 -// struct thread_parameter *arg1 = (struct thread_parameter *) arg; 6.63 -//const char *uncScript = (const char*)arg->uncompiledScript; 6.64 - //scr = (char *)arg; 6.65 -/*Creates new context to be attached to the creator thread*/ 6.66 -currContext = JS_NewContext(rt, 8192); 6.67 - if (currContext == NULL) 6.68 - return NULL; 6.69 -/* In a thread safe build every entry to the api that uses 6.70 - context must be in a request for thread safety*/ 6.71 - JS_BeginRequest(currContext); 6.72 - JS_SetOptions(currContext, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 6.73 - JS_SetVersion(currContext, JSVERSION_LATEST); 6.74 -/*Compiles the incoming script*/ 6.75 - JSObject *compiledScript = JS_CompileScript(currContext, global, scr,strlen(scr), "threadFilename", 0); 6.76 -/*Executes the compiled script*/ 6.77 - execute = JS_ExecuteScript(currContext, global, compiledScript, &rval1); 6.78 - if ( rval1 == JS_FALSE)//rval == JS_NULL | 6.79 - return NULL; 6.80 - /*gets the returned value of the last expression of the executed script*/ 6.81 - outStr = JS_ValueToString(currContext, rval1); 6.82 - printf("%s\n", JS_EncodeString(currContext, outStr)); 6.83 -/*Ends the request */ 6.84 - JS_EndRequest(currContext); 6.85 -/*Destroy the context of that thread*/ 6.86 - JS_DestroyContext(currContext); 6.87 - //printf("HI, Sara"); 6.88 - return NULL; 6.89 - 6.90 -} 6.91 -/* 6.92 - * 6.93 - */ 6.94 -int main(int argc, const char *argv[]) { 6.95 - 6.96 - /* JSAPI variables. */ 6.97 - //JSRuntime *rt; 6.98 - JSContext *cx; 6.99 - // JSObject *global; 6.100 -/* id of the created thread*/ 6.101 - pthread_t thread_id; 6.102 - 6.103 - /* Create a JS runtime. You always need at least one runtime per process. */ 6.104 - rt = JS_NewRuntime(8 * 1024 * 1024); 6.105 - if (rt == NULL) 6.106 - return 1; 6.107 - 6.108 - /* 6.109 - * Create a context. You always need a context per thread. 6.110 - * Note that this program is not multi-threaded. 6.111 - This thread is used by the main thread only 6.112 - */ 6.113 - cx = JS_NewContext(rt, 8192); 6.114 - if (cx == NULL) 6.115 - return 1; 6.116 - JS_BeginRequest(cx); 6.117 - JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 6.118 - JS_SetVersion(cx, JSVERSION_LATEST); 6.119 - JS_SetErrorReporter(cx, reportError); 6.120 - 6.121 - /* 6.122 - * Create the global object in a new compartment. 6.123 - * You always need a global object per context. 6.124 - */ 6.125 - 6.126 - global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 6.127 - if (global == NULL) 6.128 - return 1; 6.129 - 6.130 - /* 6.131 - * Populate the global object with the standard JavaScript 6.132 - * function and object classes, such as Object, Array, Date. 6.133 - */ 6.134 - if (!JS_InitStandardClasses(cx, global)) 6.135 - return 1; 6.136 - 6.137 - /* Your application code here. This may include JSAPI calls 6.138 - * to create your own custom JavaScript objects and to run scripts. 6.139 - * 6.140 - * The following example code creates a literal JavaScript script, 6.141 - * evaluates it, and prints the result to stdout. 6.142 - * 6.143 - * Errors are conventionally saved in a JSBool variable named ok. 6.144 - */ 6.145 - 6.146 - 6.147 - /** Create the thread here....*/ 6.148 - struct thread_parameter threadArg; 6.149 - //threadArg.sharedGlobalObject = global; 6.150 - char threadScript[] = "'Hi ' + 'Sara!'"; 6.151 - //threadArg.tempstr = threadScript; 6.152 - //threadArg.currRt = rt; 6.153 - 6.154 - pthread_create(&thread_id, NULL, &threadFunction,NULL); 6.155 -/*****************************************************************/ 6.156 - const char *script = "'Hello ' + 'World!'"; 6.157 - jsval rval; 6.158 - JSString *str; 6.159 - JSBool ok; 6.160 - const char *filename = "noname"; 6.161 - uintN lineno = 0; 6.162 - ok = JS_EvaluateScript(cx, global, script, strlen(script), 6.163 - filename, lineno, &rval); 6.164 - if ( rval == JS_FALSE)//rval == JS_NULL | 6.165 - return 1; 6.166 - str = JS_ValueToString(cx, rval); 6.167 - printf("%s\n", JS_EncodeString(cx, str)); 6.168 - 6.169 - /* End of your application code */ 6.170 - 6.171 - /* Clean things up and shut down SpiderMonkey. */ 6.172 - JS_EndRequest(cx); 6.173 - JS_DestroyContext(cx); 6.174 - JS_DestroyRuntime(rt); 6.175 - JS_ShutDown(); 6.176 - 6.177 - return 0; 6.178 -} 6.179 -
7.1 --- a/CppApplication_1 (copy)/nbproject/Makefile-Debug.mk Sat Feb 01 08:51:00 2014 -0800 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,83 +0,0 @@ 7.4 -# 7.5 -# Generated Makefile - do not edit! 7.6 -# 7.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 7.8 -# has a -pre and a -post target defined where you can add customized code. 7.9 -# 7.10 -# This makefile implements configuration specific macros and targets. 7.11 - 7.12 - 7.13 -# Environment 7.14 -MKDIR=mkdir 7.15 -CP=cp 7.16 -GREP=grep 7.17 -NM=nm 7.18 -CCADMIN=CCadmin 7.19 -RANLIB=ranlib 7.20 -CC=gcc 7.21 -CCC=g++ 7.22 -CXX=g++ 7.23 -FC=gfortran 7.24 -AS=as 7.25 - 7.26 -# Macros 7.27 -CND_PLATFORM=GNU-Linux-x86 7.28 -CND_CONF=Debug 7.29 -CND_DISTDIR=dist 7.30 -CND_BUILDDIR=build 7.31 - 7.32 -# Include project Makefile 7.33 -include Makefile 7.34 - 7.35 -# Object Directory 7.36 -OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 7.37 - 7.38 -# Object Files 7.39 -OBJECTFILES= \ 7.40 - ${OBJECTDIR}/first.o 7.41 - 7.42 - 7.43 -# C Compiler Flags 7.44 -CFLAGS= 7.45 - 7.46 -# CC Compiler Flags 7.47 -CCFLAGS= 7.48 -CXXFLAGS= 7.49 - 7.50 -# Fortran Compiler Flags 7.51 -FFLAGS= 7.52 - 7.53 -# Assembler Flags 7.54 -ASFLAGS= 7.55 - 7.56 -# Link Libraries and Options 7.57 -LDLIBSOPTIONS=-L/usr/local/lib -lmozjs185-1.0 -lmozjs185 -lpthread 7.58 - 7.59 -# Build Targets 7.60 -.build-conf: ${BUILD_SUBPROJECTS} 7.61 - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 7.62 - 7.63 -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 7.64 - ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 7.65 - ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 7.66 - 7.67 -${OBJECTDIR}/first.o: first.cpp 7.68 - ${MKDIR} -p ${OBJECTDIR} 7.69 - ${RM} $@.d 7.70 - $(COMPILE.cc) -g -I/usr/local/include/js -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 7.71 - 7.72 -# Subprojects 7.73 -.build-subprojects: 7.74 - 7.75 -# Clean Targets 7.76 -.clean-conf: ${CLEAN_SUBPROJECTS} 7.77 - ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 7.78 - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 7.79 - 7.80 -# Subprojects 7.81 -.clean-subprojects: 7.82 - 7.83 -# Enable dependency checking 7.84 -.dep.inc: .depcheck-impl 7.85 - 7.86 -include .dep.inc
8.1 --- a/CppApplication_1 (copy)/nbproject/Makefile-Release.mk Sat Feb 01 08:51:00 2014 -0800 8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 8.3 @@ -1,83 +0,0 @@ 8.4 -# 8.5 -# Generated Makefile - do not edit! 8.6 -# 8.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 8.8 -# has a -pre and a -post target defined where you can add customized code. 8.9 -# 8.10 -# This makefile implements configuration specific macros and targets. 8.11 - 8.12 - 8.13 -# Environment 8.14 -MKDIR=mkdir 8.15 -CP=cp 8.16 -GREP=grep 8.17 -NM=nm 8.18 -CCADMIN=CCadmin 8.19 -RANLIB=ranlib 8.20 -CC=gcc 8.21 -CCC=g++ 8.22 -CXX=g++ 8.23 -FC=gfortran 8.24 -AS=as 8.25 - 8.26 -# Macros 8.27 -CND_PLATFORM=GNU-Linux-x86 8.28 -CND_CONF=Release 8.29 -CND_DISTDIR=dist 8.30 -CND_BUILDDIR=build 8.31 - 8.32 -# Include project Makefile 8.33 -include Makefile 8.34 - 8.35 -# Object Directory 8.36 -OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 8.37 - 8.38 -# Object Files 8.39 -OBJECTFILES= \ 8.40 - ${OBJECTDIR}/first.o 8.41 - 8.42 - 8.43 -# C Compiler Flags 8.44 -CFLAGS= 8.45 - 8.46 -# CC Compiler Flags 8.47 -CCFLAGS= 8.48 -CXXFLAGS= 8.49 - 8.50 -# Fortran Compiler Flags 8.51 -FFLAGS= 8.52 - 8.53 -# Assembler Flags 8.54 -ASFLAGS= 8.55 - 8.56 -# Link Libraries and Options 8.57 -LDLIBSOPTIONS= 8.58 - 8.59 -# Build Targets 8.60 -.build-conf: ${BUILD_SUBPROJECTS} 8.61 - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 8.62 - 8.63 -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 8.64 - ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 8.65 - ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 8.66 - 8.67 -${OBJECTDIR}/first.o: first.cpp 8.68 - ${MKDIR} -p ${OBJECTDIR} 8.69 - ${RM} $@.d 8.70 - $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 8.71 - 8.72 -# Subprojects 8.73 -.build-subprojects: 8.74 - 8.75 -# Clean Targets 8.76 -.clean-conf: ${CLEAN_SUBPROJECTS} 8.77 - ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 8.78 - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 8.79 - 8.80 -# Subprojects 8.81 -.clean-subprojects: 8.82 - 8.83 -# Enable dependency checking 8.84 -.dep.inc: .depcheck-impl 8.85 - 8.86 -include .dep.inc
9.1 --- a/CppApplication_1 (copy)/nbproject/Makefile-impl.mk Sat Feb 01 08:51:00 2014 -0800 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,133 +0,0 @@ 9.4 -# 9.5 -# Generated Makefile - do not edit! 9.6 -# 9.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 9.8 -# has a pre- and a post- target defined where you can add customization code. 9.9 -# 9.10 -# This makefile implements macros and targets common to all configurations. 9.11 -# 9.12 -# NOCDDL 9.13 - 9.14 - 9.15 -# Building and Cleaning subprojects are done by default, but can be controlled with the SUB 9.16 -# macro. If SUB=no, subprojects will not be built or cleaned. The following macro 9.17 -# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 9.18 -# and .clean-reqprojects-conf unless SUB has the value 'no' 9.19 -SUB_no=NO 9.20 -SUBPROJECTS=${SUB_${SUB}} 9.21 -BUILD_SUBPROJECTS_=.build-subprojects 9.22 -BUILD_SUBPROJECTS_NO= 9.23 -BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 9.24 -CLEAN_SUBPROJECTS_=.clean-subprojects 9.25 -CLEAN_SUBPROJECTS_NO= 9.26 -CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 9.27 - 9.28 - 9.29 -# Project Name 9.30 -PROJECTNAME=CppApplication_1 9.31 - 9.32 -# Active Configuration 9.33 -DEFAULTCONF=Debug 9.34 -CONF=${DEFAULTCONF} 9.35 - 9.36 -# All Configurations 9.37 -ALLCONFS=Debug Release 9.38 - 9.39 - 9.40 -# build 9.41 -.build-impl: .build-pre .validate-impl .depcheck-impl 9.42 - @#echo "=> Running $@... Configuration=$(CONF)" 9.43 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 9.44 - 9.45 - 9.46 -# clean 9.47 -.clean-impl: .clean-pre .validate-impl .depcheck-impl 9.48 - @#echo "=> Running $@... Configuration=$(CONF)" 9.49 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 9.50 - 9.51 - 9.52 -# clobber 9.53 -.clobber-impl: .clobber-pre .depcheck-impl 9.54 - @#echo "=> Running $@..." 9.55 - for CONF in ${ALLCONFS}; \ 9.56 - do \ 9.57 - "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 9.58 - done 9.59 - 9.60 -# all 9.61 -.all-impl: .all-pre .depcheck-impl 9.62 - @#echo "=> Running $@..." 9.63 - for CONF in ${ALLCONFS}; \ 9.64 - do \ 9.65 - "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 9.66 - done 9.67 - 9.68 -# build tests 9.69 -.build-tests-impl: .build-impl .build-tests-pre 9.70 - @#echo "=> Running $@... Configuration=$(CONF)" 9.71 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 9.72 - 9.73 -# run tests 9.74 -.test-impl: .build-tests-impl .test-pre 9.75 - @#echo "=> Running $@... Configuration=$(CONF)" 9.76 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 9.77 - 9.78 -# dependency checking support 9.79 -.depcheck-impl: 9.80 - @echo "# This code depends on make tool being used" >.dep.inc 9.81 - @if [ -n "${MAKE_VERSION}" ]; then \ 9.82 - echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ 9.83 - echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 9.84 - echo "include \$${DEPFILES}" >>.dep.inc; \ 9.85 - echo "endif" >>.dep.inc; \ 9.86 - else \ 9.87 - echo ".KEEP_STATE:" >>.dep.inc; \ 9.88 - echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 9.89 - fi 9.90 - 9.91 -# configuration validation 9.92 -.validate-impl: 9.93 - @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 9.94 - then \ 9.95 - echo ""; \ 9.96 - echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 9.97 - echo "See 'make help' for details."; \ 9.98 - echo "Current directory: " `pwd`; \ 9.99 - echo ""; \ 9.100 - fi 9.101 - @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 9.102 - then \ 9.103 - exit 1; \ 9.104 - fi 9.105 - 9.106 - 9.107 -# help 9.108 -.help-impl: .help-pre 9.109 - @echo "This makefile supports the following configurations:" 9.110 - @echo " ${ALLCONFS}" 9.111 - @echo "" 9.112 - @echo "and the following targets:" 9.113 - @echo " build (default target)" 9.114 - @echo " clean" 9.115 - @echo " clobber" 9.116 - @echo " all" 9.117 - @echo " help" 9.118 - @echo "" 9.119 - @echo "Makefile Usage:" 9.120 - @echo " make [CONF=<CONFIGURATION>] [SUB=no] build" 9.121 - @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean" 9.122 - @echo " make [SUB=no] clobber" 9.123 - @echo " make [SUB=no] all" 9.124 - @echo " make help" 9.125 - @echo "" 9.126 - @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 9.127 - @echo " also build subprojects." 9.128 - @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 9.129 - @echo " also clean subprojects." 9.130 - @echo "Target 'clobber' will remove all built files from all configurations and," 9.131 - @echo " unless 'SUB=no', also from subprojects." 9.132 - @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 9.133 - @echo " also build subprojects." 9.134 - @echo "Target 'help' prints this message." 9.135 - @echo "" 9.136 -
10.1 --- a/CppApplication_1 (copy)/nbproject/Makefile-variables.mk Sat Feb 01 08:51:00 2014 -0800 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,35 +0,0 @@ 10.4 -# 10.5 -# Generated - do not edit! 10.6 -# 10.7 -# NOCDDL 10.8 -# 10.9 -CND_BASEDIR=`pwd` 10.10 -CND_BUILDDIR=build 10.11 -CND_DISTDIR=dist 10.12 -# Debug configuration 10.13 -CND_PLATFORM_Debug=GNU-Linux-x86 10.14 -CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 10.15 -CND_ARTIFACT_NAME_Debug=cppapplication_1 10.16 -CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/cppapplication_1 10.17 -CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package 10.18 -CND_PACKAGE_NAME_Debug=cppapplication1.tar 10.19 -CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/cppapplication1.tar 10.20 -# Release configuration 10.21 -CND_PLATFORM_Release=GNU-Linux-x86 10.22 -CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 10.23 -CND_ARTIFACT_NAME_Release=cppapplication_1 10.24 -CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/cppapplication_1 10.25 -CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package 10.26 -CND_PACKAGE_NAME_Release=cppapplication1.tar 10.27 -CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/cppapplication1.tar 10.28 -# 10.29 -# include compiler specific variables 10.30 -# 10.31 -# dmake command 10.32 -ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 10.33 - (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 10.34 -# 10.35 -# gmake command 10.36 -.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 10.37 -# 10.38 -include nbproject/private/Makefile-variables.mk
11.1 --- a/CppApplication_1 (copy)/nbproject/Package-Debug.bash Sat Feb 01 08:51:00 2014 -0800 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,75 +0,0 @@ 11.4 -#!/bin/bash -x 11.5 - 11.6 -# 11.7 -# Generated - do not edit! 11.8 -# 11.9 - 11.10 -# Macros 11.11 -TOP=`pwd` 11.12 -CND_PLATFORM=GNU-Linux-x86 11.13 -CND_CONF=Debug 11.14 -CND_DISTDIR=dist 11.15 -CND_BUILDDIR=build 11.16 -NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 11.17 -TMPDIRNAME=tmp-packaging 11.18 -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 11.19 -OUTPUT_BASENAME=cppapplication_1 11.20 -PACKAGE_TOP_DIR=cppapplication1/ 11.21 - 11.22 -# Functions 11.23 -function checkReturnCode 11.24 -{ 11.25 - rc=$? 11.26 - if [ $rc != 0 ] 11.27 - then 11.28 - exit $rc 11.29 - fi 11.30 -} 11.31 -function makeDirectory 11.32 -# $1 directory path 11.33 -# $2 permission (optional) 11.34 -{ 11.35 - mkdir -p "$1" 11.36 - checkReturnCode 11.37 - if [ "$2" != "" ] 11.38 - then 11.39 - chmod $2 "$1" 11.40 - checkReturnCode 11.41 - fi 11.42 -} 11.43 -function copyFileToTmpDir 11.44 -# $1 from-file path 11.45 -# $2 to-file path 11.46 -# $3 permission 11.47 -{ 11.48 - cp "$1" "$2" 11.49 - checkReturnCode 11.50 - if [ "$3" != "" ] 11.51 - then 11.52 - chmod $3 "$2" 11.53 - checkReturnCode 11.54 - fi 11.55 -} 11.56 - 11.57 -# Setup 11.58 -cd "${TOP}" 11.59 -mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 11.60 -rm -rf ${NBTMPDIR} 11.61 -mkdir -p ${NBTMPDIR} 11.62 - 11.63 -# Copy files and create directories and links 11.64 -cd "${TOP}" 11.65 -makeDirectory "${NBTMPDIR}/cppapplication1/bin" 11.66 -copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 11.67 - 11.68 - 11.69 -# Generate tar file 11.70 -cd "${TOP}" 11.71 -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 11.72 -cd ${NBTMPDIR} 11.73 -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 11.74 -checkReturnCode 11.75 - 11.76 -# Cleanup 11.77 -cd "${TOP}" 11.78 -rm -rf ${NBTMPDIR}
12.1 --- a/CppApplication_1 (copy)/nbproject/Package-Release.bash Sat Feb 01 08:51:00 2014 -0800 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,75 +0,0 @@ 12.4 -#!/bin/bash -x 12.5 - 12.6 -# 12.7 -# Generated - do not edit! 12.8 -# 12.9 - 12.10 -# Macros 12.11 -TOP=`pwd` 12.12 -CND_PLATFORM=GNU-Linux-x86 12.13 -CND_CONF=Release 12.14 -CND_DISTDIR=dist 12.15 -CND_BUILDDIR=build 12.16 -NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 12.17 -TMPDIRNAME=tmp-packaging 12.18 -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 12.19 -OUTPUT_BASENAME=cppapplication_1 12.20 -PACKAGE_TOP_DIR=cppapplication1/ 12.21 - 12.22 -# Functions 12.23 -function checkReturnCode 12.24 -{ 12.25 - rc=$? 12.26 - if [ $rc != 0 ] 12.27 - then 12.28 - exit $rc 12.29 - fi 12.30 -} 12.31 -function makeDirectory 12.32 -# $1 directory path 12.33 -# $2 permission (optional) 12.34 -{ 12.35 - mkdir -p "$1" 12.36 - checkReturnCode 12.37 - if [ "$2" != "" ] 12.38 - then 12.39 - chmod $2 "$1" 12.40 - checkReturnCode 12.41 - fi 12.42 -} 12.43 -function copyFileToTmpDir 12.44 -# $1 from-file path 12.45 -# $2 to-file path 12.46 -# $3 permission 12.47 -{ 12.48 - cp "$1" "$2" 12.49 - checkReturnCode 12.50 - if [ "$3" != "" ] 12.51 - then 12.52 - chmod $3 "$2" 12.53 - checkReturnCode 12.54 - fi 12.55 -} 12.56 - 12.57 -# Setup 12.58 -cd "${TOP}" 12.59 -mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 12.60 -rm -rf ${NBTMPDIR} 12.61 -mkdir -p ${NBTMPDIR} 12.62 - 12.63 -# Copy files and create directories and links 12.64 -cd "${TOP}" 12.65 -makeDirectory "${NBTMPDIR}/cppapplication1/bin" 12.66 -copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 12.67 - 12.68 - 12.69 -# Generate tar file 12.70 -cd "${TOP}" 12.71 -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 12.72 -cd ${NBTMPDIR} 12.73 -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 12.74 -checkReturnCode 12.75 - 12.76 -# Cleanup 12.77 -cd "${TOP}" 12.78 -rm -rf ${NBTMPDIR}
13.1 --- a/CppApplication_1 (copy)/nbproject/configurations.xml Sat Feb 01 08:51:00 2014 -0800 13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 13.3 @@ -1,80 +0,0 @@ 13.4 -<?xml version="1.0" encoding="UTF-8"?> 13.5 -<configurationDescriptor version="79"> 13.6 - <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> 13.7 - <logicalFolder name="HeaderFiles" 13.8 - displayName="Header Files" 13.9 - projectFiles="true"> 13.10 - </logicalFolder> 13.11 - <logicalFolder name="ResourceFiles" 13.12 - displayName="Resource Files" 13.13 - projectFiles="true"> 13.14 - </logicalFolder> 13.15 - <logicalFolder name="SourceFiles" 13.16 - displayName="Source Files" 13.17 - projectFiles="true"> 13.18 - <itemPath>first.cpp</itemPath> 13.19 - </logicalFolder> 13.20 - <logicalFolder name="TestFiles" 13.21 - displayName="Test Files" 13.22 - projectFiles="false" 13.23 - kind="TEST_LOGICAL_FOLDER"> 13.24 - </logicalFolder> 13.25 - <logicalFolder name="ExternalFiles" 13.26 - displayName="Important Files" 13.27 - projectFiles="false" 13.28 - kind="IMPORTANT_FILES_FOLDER"> 13.29 - <itemPath>Makefile</itemPath> 13.30 - </logicalFolder> 13.31 - </logicalFolder> 13.32 - <projectmakefile>Makefile</projectmakefile> 13.33 - <confs> 13.34 - <conf name="Debug" type="1"> 13.35 - <toolsSet> 13.36 - <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 13.37 - <compilerSet>default</compilerSet> 13.38 - </toolsSet> 13.39 - <compileType> 13.40 - <cTool> 13.41 - <incDir> 13.42 - <pElem>/usr/local/include/js</pElem> 13.43 - </incDir> 13.44 - </cTool> 13.45 - <ccTool> 13.46 - <incDir> 13.47 - <pElem>/usr/local/include/js</pElem> 13.48 - </incDir> 13.49 - </ccTool> 13.50 - <linkerTool> 13.51 - <linkerAddLib> 13.52 - <pElem>/usr/local/lib</pElem> 13.53 - </linkerAddLib> 13.54 - <linkerLibItems> 13.55 - <linkerLibLibItem>mozjs185-1.0</linkerLibLibItem> 13.56 - <linkerLibLibItem>mozjs185</linkerLibLibItem> 13.57 - <linkerLibLibItem>pthread</linkerLibLibItem> 13.58 - </linkerLibItems> 13.59 - </linkerTool> 13.60 - </compileType> 13.61 - </conf> 13.62 - <conf name="Release" type="1"> 13.63 - <toolsSet> 13.64 - <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 13.65 - <compilerSet>default</compilerSet> 13.66 - </toolsSet> 13.67 - <compileType> 13.68 - <cTool> 13.69 - <developmentMode>5</developmentMode> 13.70 - </cTool> 13.71 - <ccTool> 13.72 - <developmentMode>5</developmentMode> 13.73 - </ccTool> 13.74 - <fortranCompilerTool> 13.75 - <developmentMode>5</developmentMode> 13.76 - </fortranCompilerTool> 13.77 - <asmTool> 13.78 - <developmentMode>5</developmentMode> 13.79 - </asmTool> 13.80 - </compileType> 13.81 - </conf> 13.82 - </confs> 13.83 -</configurationDescriptor>
14.1 --- a/CppApplication_1 (copy)/nbproject/private/Makefile-variables.mk Sat Feb 01 08:51:00 2014 -0800 14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 14.3 @@ -1,7 +0,0 @@ 14.4 -# 14.5 -# Generated - do not edit! 14.6 -# 14.7 -# NOCDDL 14.8 -# 14.9 -# Debug configuration 14.10 -# Release configuration
15.1 --- a/CppApplication_1 (copy)/nbproject/private/configurations.xml Sat Feb 01 08:51:00 2014 -0800 15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 15.3 @@ -1,77 +0,0 @@ 15.4 -<?xml version="1.0" encoding="UTF-8"?> 15.5 -<configurationDescriptor version="79"> 15.6 - <projectmakefile>Makefile</projectmakefile> 15.7 - <confs> 15.8 - <conf name="Debug" type="1"> 15.9 - <toolsSet> 15.10 - <developmentServer>localhost</developmentServer> 15.11 - <platform>2</platform> 15.12 - </toolsSet> 15.13 - <dbx_gdbdebugger version="1"> 15.14 - <gdb_pathmaps> 15.15 - </gdb_pathmaps> 15.16 - <gdb_interceptlist> 15.17 - <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 15.18 - </gdb_interceptlist> 15.19 - <gdb_options> 15.20 - <DebugOptions> 15.21 - </DebugOptions> 15.22 - </gdb_options> 15.23 - <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 15.24 - </dbx_gdbdebugger> 15.25 - <gizmo_options version="3"> 15.26 - <configurationname>GizmoSimple</configurationname> 15.27 - </gizmo_options> 15.28 - <nativedebugger version="1"> 15.29 - <engine>gdb</engine> 15.30 - </nativedebugger> 15.31 - <runprofile version="9"> 15.32 - <runcommandpicklist> 15.33 - <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 15.34 - </runcommandpicklist> 15.35 - <runcommand>"${OUTPUT_PATH}"</runcommand> 15.36 - <rundir></rundir> 15.37 - <buildfirst>true</buildfirst> 15.38 - <terminal-type>0</terminal-type> 15.39 - <remove-instrumentation>0</remove-instrumentation> 15.40 - <environment> 15.41 - </environment> 15.42 - </runprofile> 15.43 - </conf> 15.44 - <conf name="Release" type="1"> 15.45 - <toolsSet> 15.46 - <developmentServer>localhost</developmentServer> 15.47 - <platform>2</platform> 15.48 - </toolsSet> 15.49 - <dbx_gdbdebugger version="1"> 15.50 - <gdb_pathmaps> 15.51 - </gdb_pathmaps> 15.52 - <gdb_interceptlist> 15.53 - <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 15.54 - </gdb_interceptlist> 15.55 - <gdb_options> 15.56 - <DebugOptions> 15.57 - </DebugOptions> 15.58 - </gdb_options> 15.59 - <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 15.60 - </dbx_gdbdebugger> 15.61 - <gizmo_options version="3"> 15.62 - </gizmo_options> 15.63 - <nativedebugger version="1"> 15.64 - <engine>gdb</engine> 15.65 - </nativedebugger> 15.66 - <runprofile version="9"> 15.67 - <runcommandpicklist> 15.68 - <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 15.69 - </runcommandpicklist> 15.70 - <runcommand>"${OUTPUT_PATH}"</runcommand> 15.71 - <rundir></rundir> 15.72 - <buildfirst>true</buildfirst> 15.73 - <terminal-type>0</terminal-type> 15.74 - <remove-instrumentation>0</remove-instrumentation> 15.75 - <environment> 15.76 - </environment> 15.77 - </runprofile> 15.78 - </conf> 15.79 - </confs> 15.80 -</configurationDescriptor>
16.1 --- a/CppApplication_1 (copy)/nbproject/private/private.xml Sat Feb 01 08:51:00 2014 -0800 16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 16.3 @@ -1,8 +0,0 @@ 16.4 -<?xml version="1.0" encoding="UTF-8"?> 16.5 -<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> 16.6 - <data xmlns="http://www.netbeans.org/ns/make-project-private/1"> 16.7 - <activeConfTypeElem>1</activeConfTypeElem> 16.8 - <activeConfIndexElem>0</activeConfIndexElem> 16.9 - </data> 16.10 - <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> 16.11 -</project-private>
17.1 --- a/CppApplication_1 (copy)/nbproject/project.xml Sat Feb 01 08:51:00 2014 -0800 17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 17.3 @@ -1,25 +0,0 @@ 17.4 -<?xml version="1.0" encoding="UTF-8"?> 17.5 -<project xmlns="http://www.netbeans.org/ns/project/1"> 17.6 - <type>org.netbeans.modules.cnd.makeproject</type> 17.7 - <configuration> 17.8 - <data xmlns="http://www.netbeans.org/ns/make-project/1"> 17.9 - <name>CppApplication_1</name> 17.10 - <c-extensions/> 17.11 - <cpp-extensions>cpp</cpp-extensions> 17.12 - <header-extensions/> 17.13 - <sourceEncoding>UTF-8</sourceEncoding> 17.14 - <make-dep-projects/> 17.15 - <sourceRootList/> 17.16 - <confList> 17.17 - <confElem> 17.18 - <name>Debug</name> 17.19 - <type>1</type> 17.20 - </confElem> 17.21 - <confElem> 17.22 - <name>Release</name> 17.23 - <type>1</type> 17.24 - </confElem> 17.25 - </confList> 17.26 - </data> 17.27 - </configuration> 17.28 -</project>
18.1 --- a/CppApplication_1/.dep.inc Sat Feb 01 08:51:00 2014 -0800 18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 18.3 @@ -1,5 +0,0 @@ 18.4 -# This code depends on make tool being used 18.5 -DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES})) 18.6 -ifneq (${DEPFILES},) 18.7 -include ${DEPFILES} 18.8 -endif
19.1 --- a/CppApplication_1/Makefile Sat Feb 01 08:51:00 2014 -0800 19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 19.3 @@ -1,128 +0,0 @@ 19.4 -# 19.5 -# There exist several targets which are by default empty and which can be 19.6 -# used for execution of your targets. These targets are usually executed 19.7 -# before and after some main targets. They are: 19.8 -# 19.9 -# .build-pre: called before 'build' target 19.10 -# .build-post: called after 'build' target 19.11 -# .clean-pre: called before 'clean' target 19.12 -# .clean-post: called after 'clean' target 19.13 -# .clobber-pre: called before 'clobber' target 19.14 -# .clobber-post: called after 'clobber' target 19.15 -# .all-pre: called before 'all' target 19.16 -# .all-post: called after 'all' target 19.17 -# .help-pre: called before 'help' target 19.18 -# .help-post: called after 'help' target 19.19 -# 19.20 -# Targets beginning with '.' are not intended to be called on their own. 19.21 -# 19.22 -# Main targets can be executed directly, and they are: 19.23 -# 19.24 -# build build a specific configuration 19.25 -# clean remove built files from a configuration 19.26 -# clobber remove all built files 19.27 -# all build all configurations 19.28 -# help print help mesage 19.29 -# 19.30 -# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and 19.31 -# .help-impl are implemented in nbproject/makefile-impl.mk. 19.32 -# 19.33 -# Available make variables: 19.34 -# 19.35 -# CND_BASEDIR base directory for relative paths 19.36 -# CND_DISTDIR default top distribution directory (build artifacts) 19.37 -# CND_BUILDDIR default top build directory (object files, ...) 19.38 -# CONF name of current configuration 19.39 -# CND_PLATFORM_${CONF} platform name (current configuration) 19.40 -# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) 19.41 -# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) 19.42 -# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) 19.43 -# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) 19.44 -# CND_PACKAGE_NAME_${CONF} name of package (current configuration) 19.45 -# CND_PACKAGE_PATH_${CONF} path to package (current configuration) 19.46 -# 19.47 -# NOCDDL 19.48 - 19.49 - 19.50 -# Environment 19.51 -MKDIR=mkdir 19.52 -CP=cp 19.53 -CCADMIN=CCadmin 19.54 - 19.55 - 19.56 -# build 19.57 -build: .build-post 19.58 - 19.59 -.build-pre: 19.60 -# Add your pre 'build' code here... 19.61 - 19.62 -.build-post: .build-impl 19.63 -# Add your post 'build' code here... 19.64 - 19.65 - 19.66 -# clean 19.67 -clean: .clean-post 19.68 - 19.69 -.clean-pre: 19.70 -# Add your pre 'clean' code here... 19.71 - 19.72 -.clean-post: .clean-impl 19.73 -# Add your post 'clean' code here... 19.74 - 19.75 - 19.76 -# clobber 19.77 -clobber: .clobber-post 19.78 - 19.79 -.clobber-pre: 19.80 -# Add your pre 'clobber' code here... 19.81 - 19.82 -.clobber-post: .clobber-impl 19.83 -# Add your post 'clobber' code here... 19.84 - 19.85 - 19.86 -# all 19.87 -all: .all-post 19.88 - 19.89 -.all-pre: 19.90 -# Add your pre 'all' code here... 19.91 - 19.92 -.all-post: .all-impl 19.93 -# Add your post 'all' code here... 19.94 - 19.95 - 19.96 -# build tests 19.97 -build-tests: .build-tests-post 19.98 - 19.99 -.build-tests-pre: 19.100 -# Add your pre 'build-tests' code here... 19.101 - 19.102 -.build-tests-post: .build-tests-impl 19.103 -# Add your post 'build-tests' code here... 19.104 - 19.105 - 19.106 -# run tests 19.107 -test: .test-post 19.108 - 19.109 -.test-pre: 19.110 -# Add your pre 'test' code here... 19.111 - 19.112 -.test-post: .test-impl 19.113 -# Add your post 'test' code here... 19.114 - 19.115 - 19.116 -# help 19.117 -help: .help-post 19.118 - 19.119 -.help-pre: 19.120 -# Add your pre 'help' code here... 19.121 - 19.122 -.help-post: .help-impl 19.123 -# Add your post 'help' code here... 19.124 - 19.125 - 19.126 - 19.127 -# include project implementation makefile 19.128 -include nbproject/Makefile-impl.mk 19.129 - 19.130 -# include project make variables 19.131 -include nbproject/Makefile-variables.mk
20.1 Binary file CppApplication_1/build/Debug/GNU-Linux-x86/first.o has changed
21.1 --- a/CppApplication_1/build/Debug/GNU-Linux-x86/first.o.d Sat Feb 01 08:51:00 2014 -0800 21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 21.3 @@ -1,34 +0,0 @@ 21.4 -build/Debug/GNU-Linux-x86/first.o: first.cpp \ 21.5 - /usr/local/include/js/jsapi.h /usr/local/include/js/js-config.h \ 21.6 - /usr/local/include/js/jspubtd.h /usr/local/include/js/jstypes.h \ 21.7 - /usr/local/include/js/jsautocfg.h /usr/local/include/js/jsinttypes.h \ 21.8 - /usr/local/include/js/jsotypes.h /usr/local/include/js/jscompat.h \ 21.9 - /usr/local/include/js/jslong.h /usr/local/include/js/jsval.h \ 21.10 - /usr/local/include/js/jsutil.h /usr/local/include/js/jsproto.tbl \ 21.11 - /usr/local/include/js/jsversion.h 21.12 - 21.13 -/usr/local/include/js/jsapi.h: 21.14 - 21.15 -/usr/local/include/js/js-config.h: 21.16 - 21.17 -/usr/local/include/js/jspubtd.h: 21.18 - 21.19 -/usr/local/include/js/jstypes.h: 21.20 - 21.21 -/usr/local/include/js/jsautocfg.h: 21.22 - 21.23 -/usr/local/include/js/jsinttypes.h: 21.24 - 21.25 -/usr/local/include/js/jsotypes.h: 21.26 - 21.27 -/usr/local/include/js/jscompat.h: 21.28 - 21.29 -/usr/local/include/js/jslong.h: 21.30 - 21.31 -/usr/local/include/js/jsval.h: 21.32 - 21.33 -/usr/local/include/js/jsutil.h: 21.34 - 21.35 -/usr/local/include/js/jsproto.tbl: 21.36 - 21.37 -/usr/local/include/js/jsversion.h:
22.1 Binary file CppApplication_1/dist/Debug/GNU-Linux-x86/cppapplication_1 has changed
23.1 --- a/CppApplication_1/first.cpp Sat Feb 01 08:51:00 2014 -0800 23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 23.3 @@ -1,176 +0,0 @@ 23.4 -/* 23.5 - * File: first.cpp 23.6 - * Author: sara 23.7 - * 23.8 - * Created on December 30, 2013, 11:41 AM 23.9 - */ 23.10 - 23.11 -#include <cstdlib> 23.12 -/* Include the JSAPI header file to get access to SpiderMonkey. */ 23.13 -#include "jsapi.h" 23.14 -#include <pthread.h> 23.15 - 23.16 -using namespace std; 23.17 -struct thread_parameter 23.18 -{ 23.19 - // char *uncompiledScript; 23.20 - // JSObject *sharedGlobalObject; 23.21 - // JSRuntime *currRt; 23.22 - char *tempstr; 23.23 - 23.24 - 23.25 -}; 23.26 -/* The class of the global object. */ 23.27 -JSRuntime *rt; 23.28 -JSObject *global; 23.29 -static JSClass global_class = { 23.30 - "global", JSCLASS_GLOBAL_FLAGS, 23.31 - JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 23.32 - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 23.33 - JSCLASS_NO_OPTIONAL_MEMBERS 23.34 -}; 23.35 - 23.36 -/* The error reporter callback. */ 23.37 -void reportError(JSContext *cx, const char *message, JSErrorReport *report) 23.38 -{ 23.39 - fprintf(stderr, "%s:%u:%s\n", 23.40 - report->filename ? report->filename : "<no filename=\"filename\">", 23.41 - (unsigned int) report->lineno, 23.42 - message); 23.43 -} 23.44 -/** the function which the thread executes when is created at main 23.45 - *@parameter structure of all the argument the function needs 23.46 - *@return return null at the end 23.47 -*/ 23.48 -void *threadFunction(void* arg){ 23.49 - /* indicates that the execution of the script is executed successfully or not*/ 23.50 - bool execute; 23.51 - int temp = 1; 23.52 -// char *script = "'Hi' + 'Sara'"; 23.53 - char threadScript[] = "'Hi ' + 'Sara!'"; 23.54 - char *scr = threadScript; 23.55 - JSString *outStr; 23.56 -/* carries the value of the last expression of the script*/ 23.57 - jsval rval1; 23.58 - 23.59 -/* The new context which is created by the thread*/ 23.60 - JSContext *currContext; 23.61 -/* pass the incoming argument of the function */ 23.62 -// struct thread_parameter *arg1 = (struct thread_parameter *) arg; 23.63 -//const char *uncScript = (const char*)arg->uncompiledScript; 23.64 - //scr = (char *)arg; 23.65 -/*Creates new context to be attached to the creator thread*/ 23.66 -currContext = JS_NewContext(rt, 8192); 23.67 - if (currContext == NULL) 23.68 - return NULL; 23.69 -/* In a thread safe build every entry to the api that uses 23.70 - context must be in a request for thread safety*/ 23.71 - JS_BeginRequest(currContext); 23.72 - JS_SetOptions(currContext, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 23.73 - JS_SetVersion(currContext, JSVERSION_LATEST); 23.74 -/*Compiles the incoming script*/ 23.75 - JSObject *compiledScript = JS_CompileScript(currContext, global, scr,strlen(scr), "threadFilename", 0); 23.76 -/*Executes the compiled script*/ 23.77 - execute = JS_ExecuteScript(currContext, global, compiledScript, &rval1); 23.78 - if ( rval1 == JS_FALSE)//rval == JS_NULL | 23.79 - return NULL; 23.80 - /*gets the returned value of the last expression of the executed script*/ 23.81 - outStr = JS_ValueToString(currContext, rval1); 23.82 - printf("%s\n", JS_EncodeString(currContext, outStr)); 23.83 -/*Ends the request */ 23.84 - JS_EndRequest(currContext); 23.85 -/*Destroy the context of that thread*/ 23.86 - JS_DestroyContext(currContext); 23.87 - //printf("HI, Sara"); 23.88 - return NULL; 23.89 - 23.90 -} 23.91 -/* 23.92 - * 23.93 - */ 23.94 -int main(int argc, const char *argv[]) { 23.95 - 23.96 - /* JSAPI variables. */ 23.97 - //JSRuntime *rt; 23.98 - JSContext *cx; 23.99 - // JSObject *global; 23.100 -/* id of the created thread*/ 23.101 - pthread_t thread_id; 23.102 - 23.103 - /* Create a JS runtime. You always need at least one runtime per process. */ 23.104 - rt = JS_NewRuntime(8 * 1024 * 1024); 23.105 - if (rt == NULL) 23.106 - return 1; 23.107 - 23.108 - /* 23.109 - * Create a context. You always need a context per thread. 23.110 - * Note that this program is not multi-threaded. 23.111 - This thread is used by the main thread only 23.112 - */ 23.113 - cx = JS_NewContext(rt, 8192); 23.114 - if (cx == NULL) 23.115 - return 1; 23.116 - JS_BeginRequest(cx); 23.117 - JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 23.118 - JS_SetVersion(cx, JSVERSION_LATEST); 23.119 - JS_SetErrorReporter(cx, reportError); 23.120 - 23.121 - /* 23.122 - * Create the global object in a new compartment. 23.123 - * You always need a global object per context. 23.124 - */ 23.125 - 23.126 - global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 23.127 - if (global == NULL) 23.128 - return 1; 23.129 - 23.130 - /* 23.131 - * Populate the global object with the standard JavaScript 23.132 - * function and object classes, such as Object, Array, Date. 23.133 - */ 23.134 - if (!JS_InitStandardClasses(cx, global)) 23.135 - return 1; 23.136 - 23.137 - /* Your application code here. This may include JSAPI calls 23.138 - * to create your own custom JavaScript objects and to run scripts. 23.139 - * 23.140 - * The following example code creates a literal JavaScript script, 23.141 - * evaluates it, and prints the result to stdout. 23.142 - * 23.143 - * Errors are conventionally saved in a JSBool variable named ok. 23.144 - */ 23.145 - 23.146 - 23.147 - /** Create the thread here....*/ 23.148 - struct thread_parameter threadArg; 23.149 - //threadArg.sharedGlobalObject = global; 23.150 - char threadScript[] = "'Hi ' + 'Sara!'"; 23.151 - //threadArg.tempstr = threadScript; 23.152 - //threadArg.currRt = rt; 23.153 - 23.154 - pthread_create(&thread_id, NULL, &threadFunction,NULL); 23.155 -/*****************************************************************/ 23.156 - const char *script = "'Hello ' + 'World!'"; 23.157 - jsval rval; 23.158 - JSString *str; 23.159 - JSBool ok; 23.160 - const char *filename = "noname"; 23.161 - uintN lineno = 0; 23.162 - ok = JS_EvaluateScript(cx, global, script, strlen(script), 23.163 - filename, lineno, &rval); 23.164 - if ( rval == JS_FALSE)//rval == JS_NULL | 23.165 - return 1; 23.166 - str = JS_ValueToString(cx, rval); 23.167 - printf("%s\n", JS_EncodeString(cx, str)); 23.168 - 23.169 - /* End of your application code */ 23.170 - 23.171 - /* Clean things up and shut down SpiderMonkey. */ 23.172 - JS_EndRequest(cx); 23.173 - JS_DestroyContext(cx); 23.174 - JS_DestroyRuntime(rt); 23.175 - JS_ShutDown(); 23.176 - 23.177 - return 0; 23.178 -} 23.179 -
24.1 --- a/CppApplication_1/nbproject/Makefile-Debug.mk Sat Feb 01 08:51:00 2014 -0800 24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 24.3 @@ -1,83 +0,0 @@ 24.4 -# 24.5 -# Generated Makefile - do not edit! 24.6 -# 24.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 24.8 -# has a -pre and a -post target defined where you can add customized code. 24.9 -# 24.10 -# This makefile implements configuration specific macros and targets. 24.11 - 24.12 - 24.13 -# Environment 24.14 -MKDIR=mkdir 24.15 -CP=cp 24.16 -GREP=grep 24.17 -NM=nm 24.18 -CCADMIN=CCadmin 24.19 -RANLIB=ranlib 24.20 -CC=gcc 24.21 -CCC=g++ 24.22 -CXX=g++ 24.23 -FC=gfortran 24.24 -AS=as 24.25 - 24.26 -# Macros 24.27 -CND_PLATFORM=GNU-Linux-x86 24.28 -CND_CONF=Debug 24.29 -CND_DISTDIR=dist 24.30 -CND_BUILDDIR=build 24.31 - 24.32 -# Include project Makefile 24.33 -include Makefile 24.34 - 24.35 -# Object Directory 24.36 -OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 24.37 - 24.38 -# Object Files 24.39 -OBJECTFILES= \ 24.40 - ${OBJECTDIR}/first.o 24.41 - 24.42 - 24.43 -# C Compiler Flags 24.44 -CFLAGS= 24.45 - 24.46 -# CC Compiler Flags 24.47 -CCFLAGS= 24.48 -CXXFLAGS= 24.49 - 24.50 -# Fortran Compiler Flags 24.51 -FFLAGS= 24.52 - 24.53 -# Assembler Flags 24.54 -ASFLAGS= 24.55 - 24.56 -# Link Libraries and Options 24.57 -LDLIBSOPTIONS=-L/usr/local/lib -lmozjs185-1.0 -lmozjs185 -lpthread 24.58 - 24.59 -# Build Targets 24.60 -.build-conf: ${BUILD_SUBPROJECTS} 24.61 - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 24.62 - 24.63 -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 24.64 - ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 24.65 - ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 24.66 - 24.67 -${OBJECTDIR}/first.o: first.cpp 24.68 - ${MKDIR} -p ${OBJECTDIR} 24.69 - ${RM} $@.d 24.70 - $(COMPILE.cc) -g -I/usr/local/include/js -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 24.71 - 24.72 -# Subprojects 24.73 -.build-subprojects: 24.74 - 24.75 -# Clean Targets 24.76 -.clean-conf: ${CLEAN_SUBPROJECTS} 24.77 - ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 24.78 - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 24.79 - 24.80 -# Subprojects 24.81 -.clean-subprojects: 24.82 - 24.83 -# Enable dependency checking 24.84 -.dep.inc: .depcheck-impl 24.85 - 24.86 -include .dep.inc
25.1 --- a/CppApplication_1/nbproject/Makefile-Release.mk Sat Feb 01 08:51:00 2014 -0800 25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 25.3 @@ -1,83 +0,0 @@ 25.4 -# 25.5 -# Generated Makefile - do not edit! 25.6 -# 25.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 25.8 -# has a -pre and a -post target defined where you can add customized code. 25.9 -# 25.10 -# This makefile implements configuration specific macros and targets. 25.11 - 25.12 - 25.13 -# Environment 25.14 -MKDIR=mkdir 25.15 -CP=cp 25.16 -GREP=grep 25.17 -NM=nm 25.18 -CCADMIN=CCadmin 25.19 -RANLIB=ranlib 25.20 -CC=gcc 25.21 -CCC=g++ 25.22 -CXX=g++ 25.23 -FC=gfortran 25.24 -AS=as 25.25 - 25.26 -# Macros 25.27 -CND_PLATFORM=GNU-Linux-x86 25.28 -CND_CONF=Release 25.29 -CND_DISTDIR=dist 25.30 -CND_BUILDDIR=build 25.31 - 25.32 -# Include project Makefile 25.33 -include Makefile 25.34 - 25.35 -# Object Directory 25.36 -OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 25.37 - 25.38 -# Object Files 25.39 -OBJECTFILES= \ 25.40 - ${OBJECTDIR}/first.o 25.41 - 25.42 - 25.43 -# C Compiler Flags 25.44 -CFLAGS= 25.45 - 25.46 -# CC Compiler Flags 25.47 -CCFLAGS= 25.48 -CXXFLAGS= 25.49 - 25.50 -# Fortran Compiler Flags 25.51 -FFLAGS= 25.52 - 25.53 -# Assembler Flags 25.54 -ASFLAGS= 25.55 - 25.56 -# Link Libraries and Options 25.57 -LDLIBSOPTIONS= 25.58 - 25.59 -# Build Targets 25.60 -.build-conf: ${BUILD_SUBPROJECTS} 25.61 - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 25.62 - 25.63 -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 25.64 - ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 25.65 - ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 25.66 - 25.67 -${OBJECTDIR}/first.o: first.cpp 25.68 - ${MKDIR} -p ${OBJECTDIR} 25.69 - ${RM} $@.d 25.70 - $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 25.71 - 25.72 -# Subprojects 25.73 -.build-subprojects: 25.74 - 25.75 -# Clean Targets 25.76 -.clean-conf: ${CLEAN_SUBPROJECTS} 25.77 - ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 25.78 - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 25.79 - 25.80 -# Subprojects 25.81 -.clean-subprojects: 25.82 - 25.83 -# Enable dependency checking 25.84 -.dep.inc: .depcheck-impl 25.85 - 25.86 -include .dep.inc
26.1 --- a/CppApplication_1/nbproject/Makefile-impl.mk Sat Feb 01 08:51:00 2014 -0800 26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 26.3 @@ -1,133 +0,0 @@ 26.4 -# 26.5 -# Generated Makefile - do not edit! 26.6 -# 26.7 -# Edit the Makefile in the project folder instead (../Makefile). Each target 26.8 -# has a pre- and a post- target defined where you can add customization code. 26.9 -# 26.10 -# This makefile implements macros and targets common to all configurations. 26.11 -# 26.12 -# NOCDDL 26.13 - 26.14 - 26.15 -# Building and Cleaning subprojects are done by default, but can be controlled with the SUB 26.16 -# macro. If SUB=no, subprojects will not be built or cleaned. The following macro 26.17 -# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 26.18 -# and .clean-reqprojects-conf unless SUB has the value 'no' 26.19 -SUB_no=NO 26.20 -SUBPROJECTS=${SUB_${SUB}} 26.21 -BUILD_SUBPROJECTS_=.build-subprojects 26.22 -BUILD_SUBPROJECTS_NO= 26.23 -BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 26.24 -CLEAN_SUBPROJECTS_=.clean-subprojects 26.25 -CLEAN_SUBPROJECTS_NO= 26.26 -CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 26.27 - 26.28 - 26.29 -# Project Name 26.30 -PROJECTNAME=CppApplication_1 26.31 - 26.32 -# Active Configuration 26.33 -DEFAULTCONF=Debug 26.34 -CONF=${DEFAULTCONF} 26.35 - 26.36 -# All Configurations 26.37 -ALLCONFS=Debug Release 26.38 - 26.39 - 26.40 -# build 26.41 -.build-impl: .build-pre .validate-impl .depcheck-impl 26.42 - @#echo "=> Running $@... Configuration=$(CONF)" 26.43 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 26.44 - 26.45 - 26.46 -# clean 26.47 -.clean-impl: .clean-pre .validate-impl .depcheck-impl 26.48 - @#echo "=> Running $@... Configuration=$(CONF)" 26.49 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 26.50 - 26.51 - 26.52 -# clobber 26.53 -.clobber-impl: .clobber-pre .depcheck-impl 26.54 - @#echo "=> Running $@..." 26.55 - for CONF in ${ALLCONFS}; \ 26.56 - do \ 26.57 - "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 26.58 - done 26.59 - 26.60 -# all 26.61 -.all-impl: .all-pre .depcheck-impl 26.62 - @#echo "=> Running $@..." 26.63 - for CONF in ${ALLCONFS}; \ 26.64 - do \ 26.65 - "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 26.66 - done 26.67 - 26.68 -# build tests 26.69 -.build-tests-impl: .build-impl .build-tests-pre 26.70 - @#echo "=> Running $@... Configuration=$(CONF)" 26.71 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 26.72 - 26.73 -# run tests 26.74 -.test-impl: .build-tests-impl .test-pre 26.75 - @#echo "=> Running $@... Configuration=$(CONF)" 26.76 - "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 26.77 - 26.78 -# dependency checking support 26.79 -.depcheck-impl: 26.80 - @echo "# This code depends on make tool being used" >.dep.inc 26.81 - @if [ -n "${MAKE_VERSION}" ]; then \ 26.82 - echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ 26.83 - echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 26.84 - echo "include \$${DEPFILES}" >>.dep.inc; \ 26.85 - echo "endif" >>.dep.inc; \ 26.86 - else \ 26.87 - echo ".KEEP_STATE:" >>.dep.inc; \ 26.88 - echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 26.89 - fi 26.90 - 26.91 -# configuration validation 26.92 -.validate-impl: 26.93 - @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 26.94 - then \ 26.95 - echo ""; \ 26.96 - echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 26.97 - echo "See 'make help' for details."; \ 26.98 - echo "Current directory: " `pwd`; \ 26.99 - echo ""; \ 26.100 - fi 26.101 - @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 26.102 - then \ 26.103 - exit 1; \ 26.104 - fi 26.105 - 26.106 - 26.107 -# help 26.108 -.help-impl: .help-pre 26.109 - @echo "This makefile supports the following configurations:" 26.110 - @echo " ${ALLCONFS}" 26.111 - @echo "" 26.112 - @echo "and the following targets:" 26.113 - @echo " build (default target)" 26.114 - @echo " clean" 26.115 - @echo " clobber" 26.116 - @echo " all" 26.117 - @echo " help" 26.118 - @echo "" 26.119 - @echo "Makefile Usage:" 26.120 - @echo " make [CONF=<CONFIGURATION>] [SUB=no] build" 26.121 - @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean" 26.122 - @echo " make [SUB=no] clobber" 26.123 - @echo " make [SUB=no] all" 26.124 - @echo " make help" 26.125 - @echo "" 26.126 - @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 26.127 - @echo " also build subprojects." 26.128 - @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 26.129 - @echo " also clean subprojects." 26.130 - @echo "Target 'clobber' will remove all built files from all configurations and," 26.131 - @echo " unless 'SUB=no', also from subprojects." 26.132 - @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 26.133 - @echo " also build subprojects." 26.134 - @echo "Target 'help' prints this message." 26.135 - @echo "" 26.136 -
27.1 --- a/CppApplication_1/nbproject/Makefile-variables.mk Sat Feb 01 08:51:00 2014 -0800 27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 27.3 @@ -1,35 +0,0 @@ 27.4 -# 27.5 -# Generated - do not edit! 27.6 -# 27.7 -# NOCDDL 27.8 -# 27.9 -CND_BASEDIR=`pwd` 27.10 -CND_BUILDDIR=build 27.11 -CND_DISTDIR=dist 27.12 -# Debug configuration 27.13 -CND_PLATFORM_Debug=GNU-Linux-x86 27.14 -CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 27.15 -CND_ARTIFACT_NAME_Debug=cppapplication_1 27.16 -CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/cppapplication_1 27.17 -CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package 27.18 -CND_PACKAGE_NAME_Debug=cppapplication1.tar 27.19 -CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/cppapplication1.tar 27.20 -# Release configuration 27.21 -CND_PLATFORM_Release=GNU-Linux-x86 27.22 -CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 27.23 -CND_ARTIFACT_NAME_Release=cppapplication_1 27.24 -CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/cppapplication_1 27.25 -CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package 27.26 -CND_PACKAGE_NAME_Release=cppapplication1.tar 27.27 -CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/cppapplication1.tar 27.28 -# 27.29 -# include compiler specific variables 27.30 -# 27.31 -# dmake command 27.32 -ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 27.33 - (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 27.34 -# 27.35 -# gmake command 27.36 -.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 27.37 -# 27.38 -include nbproject/private/Makefile-variables.mk
28.1 --- a/CppApplication_1/nbproject/Package-Debug.bash Sat Feb 01 08:51:00 2014 -0800 28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 28.3 @@ -1,75 +0,0 @@ 28.4 -#!/bin/bash -x 28.5 - 28.6 -# 28.7 -# Generated - do not edit! 28.8 -# 28.9 - 28.10 -# Macros 28.11 -TOP=`pwd` 28.12 -CND_PLATFORM=GNU-Linux-x86 28.13 -CND_CONF=Debug 28.14 -CND_DISTDIR=dist 28.15 -CND_BUILDDIR=build 28.16 -NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 28.17 -TMPDIRNAME=tmp-packaging 28.18 -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 28.19 -OUTPUT_BASENAME=cppapplication_1 28.20 -PACKAGE_TOP_DIR=cppapplication1/ 28.21 - 28.22 -# Functions 28.23 -function checkReturnCode 28.24 -{ 28.25 - rc=$? 28.26 - if [ $rc != 0 ] 28.27 - then 28.28 - exit $rc 28.29 - fi 28.30 -} 28.31 -function makeDirectory 28.32 -# $1 directory path 28.33 -# $2 permission (optional) 28.34 -{ 28.35 - mkdir -p "$1" 28.36 - checkReturnCode 28.37 - if [ "$2" != "" ] 28.38 - then 28.39 - chmod $2 "$1" 28.40 - checkReturnCode 28.41 - fi 28.42 -} 28.43 -function copyFileToTmpDir 28.44 -# $1 from-file path 28.45 -# $2 to-file path 28.46 -# $3 permission 28.47 -{ 28.48 - cp "$1" "$2" 28.49 - checkReturnCode 28.50 - if [ "$3" != "" ] 28.51 - then 28.52 - chmod $3 "$2" 28.53 - checkReturnCode 28.54 - fi 28.55 -} 28.56 - 28.57 -# Setup 28.58 -cd "${TOP}" 28.59 -mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 28.60 -rm -rf ${NBTMPDIR} 28.61 -mkdir -p ${NBTMPDIR} 28.62 - 28.63 -# Copy files and create directories and links 28.64 -cd "${TOP}" 28.65 -makeDirectory "${NBTMPDIR}/cppapplication1/bin" 28.66 -copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 28.67 - 28.68 - 28.69 -# Generate tar file 28.70 -cd "${TOP}" 28.71 -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 28.72 -cd ${NBTMPDIR} 28.73 -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 28.74 -checkReturnCode 28.75 - 28.76 -# Cleanup 28.77 -cd "${TOP}" 28.78 -rm -rf ${NBTMPDIR}
29.1 --- a/CppApplication_1/nbproject/Package-Release.bash Sat Feb 01 08:51:00 2014 -0800 29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 29.3 @@ -1,75 +0,0 @@ 29.4 -#!/bin/bash -x 29.5 - 29.6 -# 29.7 -# Generated - do not edit! 29.8 -# 29.9 - 29.10 -# Macros 29.11 -TOP=`pwd` 29.12 -CND_PLATFORM=GNU-Linux-x86 29.13 -CND_CONF=Release 29.14 -CND_DISTDIR=dist 29.15 -CND_BUILDDIR=build 29.16 -NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 29.17 -TMPDIRNAME=tmp-packaging 29.18 -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 29.19 -OUTPUT_BASENAME=cppapplication_1 29.20 -PACKAGE_TOP_DIR=cppapplication1/ 29.21 - 29.22 -# Functions 29.23 -function checkReturnCode 29.24 -{ 29.25 - rc=$? 29.26 - if [ $rc != 0 ] 29.27 - then 29.28 - exit $rc 29.29 - fi 29.30 -} 29.31 -function makeDirectory 29.32 -# $1 directory path 29.33 -# $2 permission (optional) 29.34 -{ 29.35 - mkdir -p "$1" 29.36 - checkReturnCode 29.37 - if [ "$2" != "" ] 29.38 - then 29.39 - chmod $2 "$1" 29.40 - checkReturnCode 29.41 - fi 29.42 -} 29.43 -function copyFileToTmpDir 29.44 -# $1 from-file path 29.45 -# $2 to-file path 29.46 -# $3 permission 29.47 -{ 29.48 - cp "$1" "$2" 29.49 - checkReturnCode 29.50 - if [ "$3" != "" ] 29.51 - then 29.52 - chmod $3 "$2" 29.53 - checkReturnCode 29.54 - fi 29.55 -} 29.56 - 29.57 -# Setup 29.58 -cd "${TOP}" 29.59 -mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 29.60 -rm -rf ${NBTMPDIR} 29.61 -mkdir -p ${NBTMPDIR} 29.62 - 29.63 -# Copy files and create directories and links 29.64 -cd "${TOP}" 29.65 -makeDirectory "${NBTMPDIR}/cppapplication1/bin" 29.66 -copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 29.67 - 29.68 - 29.69 -# Generate tar file 29.70 -cd "${TOP}" 29.71 -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 29.72 -cd ${NBTMPDIR} 29.73 -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 29.74 -checkReturnCode 29.75 - 29.76 -# Cleanup 29.77 -cd "${TOP}" 29.78 -rm -rf ${NBTMPDIR}
30.1 --- a/CppApplication_1/nbproject/configurations.xml Sat Feb 01 08:51:00 2014 -0800 30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 30.3 @@ -1,80 +0,0 @@ 30.4 -<?xml version="1.0" encoding="UTF-8"?> 30.5 -<configurationDescriptor version="79"> 30.6 - <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> 30.7 - <logicalFolder name="HeaderFiles" 30.8 - displayName="Header Files" 30.9 - projectFiles="true"> 30.10 - </logicalFolder> 30.11 - <logicalFolder name="ResourceFiles" 30.12 - displayName="Resource Files" 30.13 - projectFiles="true"> 30.14 - </logicalFolder> 30.15 - <logicalFolder name="SourceFiles" 30.16 - displayName="Source Files" 30.17 - projectFiles="true"> 30.18 - <itemPath>first.cpp</itemPath> 30.19 - </logicalFolder> 30.20 - <logicalFolder name="TestFiles" 30.21 - displayName="Test Files" 30.22 - projectFiles="false" 30.23 - kind="TEST_LOGICAL_FOLDER"> 30.24 - </logicalFolder> 30.25 - <logicalFolder name="ExternalFiles" 30.26 - displayName="Important Files" 30.27 - projectFiles="false" 30.28 - kind="IMPORTANT_FILES_FOLDER"> 30.29 - <itemPath>Makefile</itemPath> 30.30 - </logicalFolder> 30.31 - </logicalFolder> 30.32 - <projectmakefile>Makefile</projectmakefile> 30.33 - <confs> 30.34 - <conf name="Debug" type="1"> 30.35 - <toolsSet> 30.36 - <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 30.37 - <compilerSet>default</compilerSet> 30.38 - </toolsSet> 30.39 - <compileType> 30.40 - <cTool> 30.41 - <incDir> 30.42 - <pElem>/usr/local/include/js</pElem> 30.43 - </incDir> 30.44 - </cTool> 30.45 - <ccTool> 30.46 - <incDir> 30.47 - <pElem>/usr/local/include/js</pElem> 30.48 - </incDir> 30.49 - </ccTool> 30.50 - <linkerTool> 30.51 - <linkerAddLib> 30.52 - <pElem>/usr/local/lib</pElem> 30.53 - </linkerAddLib> 30.54 - <linkerLibItems> 30.55 - <linkerLibLibItem>mozjs185-1.0</linkerLibLibItem> 30.56 - <linkerLibLibItem>mozjs185</linkerLibLibItem> 30.57 - <linkerLibLibItem>pthread</linkerLibLibItem> 30.58 - </linkerLibItems> 30.59 - </linkerTool> 30.60 - </compileType> 30.61 - </conf> 30.62 - <conf name="Release" type="1"> 30.63 - <toolsSet> 30.64 - <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 30.65 - <compilerSet>default</compilerSet> 30.66 - </toolsSet> 30.67 - <compileType> 30.68 - <cTool> 30.69 - <developmentMode>5</developmentMode> 30.70 - </cTool> 30.71 - <ccTool> 30.72 - <developmentMode>5</developmentMode> 30.73 - </ccTool> 30.74 - <fortranCompilerTool> 30.75 - <developmentMode>5</developmentMode> 30.76 - </fortranCompilerTool> 30.77 - <asmTool> 30.78 - <developmentMode>5</developmentMode> 30.79 - </asmTool> 30.80 - </compileType> 30.81 - </conf> 30.82 - </confs> 30.83 -</configurationDescriptor>
31.1 --- a/CppApplication_1/nbproject/private/Makefile-variables.mk Sat Feb 01 08:51:00 2014 -0800 31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 31.3 @@ -1,7 +0,0 @@ 31.4 -# 31.5 -# Generated - do not edit! 31.6 -# 31.7 -# NOCDDL 31.8 -# 31.9 -# Debug configuration 31.10 -# Release configuration
32.1 --- a/CppApplication_1/nbproject/private/configurations.xml Sat Feb 01 08:51:00 2014 -0800 32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 32.3 @@ -1,77 +0,0 @@ 32.4 -<?xml version="1.0" encoding="UTF-8"?> 32.5 -<configurationDescriptor version="79"> 32.6 - <projectmakefile>Makefile</projectmakefile> 32.7 - <confs> 32.8 - <conf name="Debug" type="1"> 32.9 - <toolsSet> 32.10 - <developmentServer>localhost</developmentServer> 32.11 - <platform>2</platform> 32.12 - </toolsSet> 32.13 - <dbx_gdbdebugger version="1"> 32.14 - <gdb_pathmaps> 32.15 - </gdb_pathmaps> 32.16 - <gdb_interceptlist> 32.17 - <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 32.18 - </gdb_interceptlist> 32.19 - <gdb_options> 32.20 - <DebugOptions> 32.21 - </DebugOptions> 32.22 - </gdb_options> 32.23 - <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 32.24 - </dbx_gdbdebugger> 32.25 - <gizmo_options version="3"> 32.26 - <configurationname>GizmoSimple</configurationname> 32.27 - </gizmo_options> 32.28 - <nativedebugger version="1"> 32.29 - <engine>gdb</engine> 32.30 - </nativedebugger> 32.31 - <runprofile version="9"> 32.32 - <runcommandpicklist> 32.33 - <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 32.34 - </runcommandpicklist> 32.35 - <runcommand>"${OUTPUT_PATH}"</runcommand> 32.36 - <rundir></rundir> 32.37 - <buildfirst>true</buildfirst> 32.38 - <terminal-type>0</terminal-type> 32.39 - <remove-instrumentation>0</remove-instrumentation> 32.40 - <environment> 32.41 - </environment> 32.42 - </runprofile> 32.43 - </conf> 32.44 - <conf name="Release" type="1"> 32.45 - <toolsSet> 32.46 - <developmentServer>localhost</developmentServer> 32.47 - <platform>2</platform> 32.48 - </toolsSet> 32.49 - <dbx_gdbdebugger version="1"> 32.50 - <gdb_pathmaps> 32.51 - </gdb_pathmaps> 32.52 - <gdb_interceptlist> 32.53 - <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 32.54 - </gdb_interceptlist> 32.55 - <gdb_options> 32.56 - <DebugOptions> 32.57 - </DebugOptions> 32.58 - </gdb_options> 32.59 - <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 32.60 - </dbx_gdbdebugger> 32.61 - <gizmo_options version="3"> 32.62 - </gizmo_options> 32.63 - <nativedebugger version="1"> 32.64 - <engine>gdb</engine> 32.65 - </nativedebugger> 32.66 - <runprofile version="9"> 32.67 - <runcommandpicklist> 32.68 - <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 32.69 - </runcommandpicklist> 32.70 - <runcommand>"${OUTPUT_PATH}"</runcommand> 32.71 - <rundir></rundir> 32.72 - <buildfirst>true</buildfirst> 32.73 - <terminal-type>0</terminal-type> 32.74 - <remove-instrumentation>0</remove-instrumentation> 32.75 - <environment> 32.76 - </environment> 32.77 - </runprofile> 32.78 - </conf> 32.79 - </confs> 32.80 -</configurationDescriptor>
33.1 --- a/CppApplication_1/nbproject/private/private.xml Sat Feb 01 08:51:00 2014 -0800 33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 33.3 @@ -1,8 +0,0 @@ 33.4 -<?xml version="1.0" encoding="UTF-8"?> 33.5 -<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> 33.6 - <data xmlns="http://www.netbeans.org/ns/make-project-private/1"> 33.7 - <activeConfTypeElem>1</activeConfTypeElem> 33.8 - <activeConfIndexElem>0</activeConfIndexElem> 33.9 - </data> 33.10 - <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> 33.11 -</project-private>
34.1 --- a/CppApplication_1/nbproject/project.xml Sat Feb 01 08:51:00 2014 -0800 34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 34.3 @@ -1,25 +0,0 @@ 34.4 -<?xml version="1.0" encoding="UTF-8"?> 34.5 -<project xmlns="http://www.netbeans.org/ns/project/1"> 34.6 - <type>org.netbeans.modules.cnd.makeproject</type> 34.7 - <configuration> 34.8 - <data xmlns="http://www.netbeans.org/ns/make-project/1"> 34.9 - <name>CppApplication_1</name> 34.10 - <c-extensions/> 34.11 - <cpp-extensions>cpp</cpp-extensions> 34.12 - <header-extensions/> 34.13 - <sourceEncoding>UTF-8</sourceEncoding> 34.14 - <make-dep-projects/> 34.15 - <sourceRootList/> 34.16 - <confList> 34.17 - <confElem> 34.18 - <name>Debug</name> 34.19 - <type>1</type> 34.20 - </confElem> 34.21 - <confElem> 34.22 - <name>Release</name> 34.23 - <type>1</type> 34.24 - </confElem> 34.25 - </confList> 34.26 - </data> 34.27 - </configuration> 34.28 -</project>
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 35.2 +++ b/SpiderMonkey_tests/CppApplication_1/.dep.inc Sat Feb 01 14:26:10 2014 -0800 35.3 @@ -0,0 +1,5 @@ 35.4 +# This code depends on make tool being used 35.5 +DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES})) 35.6 +ifneq (${DEPFILES},) 35.7 +include ${DEPFILES} 35.8 +endif
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 36.2 +++ b/SpiderMonkey_tests/CppApplication_1/Makefile Sat Feb 01 14:26:10 2014 -0800 36.3 @@ -0,0 +1,128 @@ 36.4 +# 36.5 +# There exist several targets which are by default empty and which can be 36.6 +# used for execution of your targets. These targets are usually executed 36.7 +# before and after some main targets. They are: 36.8 +# 36.9 +# .build-pre: called before 'build' target 36.10 +# .build-post: called after 'build' target 36.11 +# .clean-pre: called before 'clean' target 36.12 +# .clean-post: called after 'clean' target 36.13 +# .clobber-pre: called before 'clobber' target 36.14 +# .clobber-post: called after 'clobber' target 36.15 +# .all-pre: called before 'all' target 36.16 +# .all-post: called after 'all' target 36.17 +# .help-pre: called before 'help' target 36.18 +# .help-post: called after 'help' target 36.19 +# 36.20 +# Targets beginning with '.' are not intended to be called on their own. 36.21 +# 36.22 +# Main targets can be executed directly, and they are: 36.23 +# 36.24 +# build build a specific configuration 36.25 +# clean remove built files from a configuration 36.26 +# clobber remove all built files 36.27 +# all build all configurations 36.28 +# help print help mesage 36.29 +# 36.30 +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and 36.31 +# .help-impl are implemented in nbproject/makefile-impl.mk. 36.32 +# 36.33 +# Available make variables: 36.34 +# 36.35 +# CND_BASEDIR base directory for relative paths 36.36 +# CND_DISTDIR default top distribution directory (build artifacts) 36.37 +# CND_BUILDDIR default top build directory (object files, ...) 36.38 +# CONF name of current configuration 36.39 +# CND_PLATFORM_${CONF} platform name (current configuration) 36.40 +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) 36.41 +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) 36.42 +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) 36.43 +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) 36.44 +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) 36.45 +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) 36.46 +# 36.47 +# NOCDDL 36.48 + 36.49 + 36.50 +# Environment 36.51 +MKDIR=mkdir 36.52 +CP=cp 36.53 +CCADMIN=CCadmin 36.54 + 36.55 + 36.56 +# build 36.57 +build: .build-post 36.58 + 36.59 +.build-pre: 36.60 +# Add your pre 'build' code here... 36.61 + 36.62 +.build-post: .build-impl 36.63 +# Add your post 'build' code here... 36.64 + 36.65 + 36.66 +# clean 36.67 +clean: .clean-post 36.68 + 36.69 +.clean-pre: 36.70 +# Add your pre 'clean' code here... 36.71 + 36.72 +.clean-post: .clean-impl 36.73 +# Add your post 'clean' code here... 36.74 + 36.75 + 36.76 +# clobber 36.77 +clobber: .clobber-post 36.78 + 36.79 +.clobber-pre: 36.80 +# Add your pre 'clobber' code here... 36.81 + 36.82 +.clobber-post: .clobber-impl 36.83 +# Add your post 'clobber' code here... 36.84 + 36.85 + 36.86 +# all 36.87 +all: .all-post 36.88 + 36.89 +.all-pre: 36.90 +# Add your pre 'all' code here... 36.91 + 36.92 +.all-post: .all-impl 36.93 +# Add your post 'all' code here... 36.94 + 36.95 + 36.96 +# build tests 36.97 +build-tests: .build-tests-post 36.98 + 36.99 +.build-tests-pre: 36.100 +# Add your pre 'build-tests' code here... 36.101 + 36.102 +.build-tests-post: .build-tests-impl 36.103 +# Add your post 'build-tests' code here... 36.104 + 36.105 + 36.106 +# run tests 36.107 +test: .test-post 36.108 + 36.109 +.test-pre: 36.110 +# Add your pre 'test' code here... 36.111 + 36.112 +.test-post: .test-impl 36.113 +# Add your post 'test' code here... 36.114 + 36.115 + 36.116 +# help 36.117 +help: .help-post 36.118 + 36.119 +.help-pre: 36.120 +# Add your pre 'help' code here... 36.121 + 36.122 +.help-post: .help-impl 36.123 +# Add your post 'help' code here... 36.124 + 36.125 + 36.126 + 36.127 +# include project implementation makefile 36.128 +include nbproject/Makefile-impl.mk 36.129 + 36.130 +# include project make variables 36.131 +include nbproject/Makefile-variables.mk
37.1 Binary file SpiderMonkey_tests/CppApplication_1/build/Debug/GNU-Linux-x86/first.o has changed
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 38.2 +++ b/SpiderMonkey_tests/CppApplication_1/build/Debug/GNU-Linux-x86/first.o.d Sat Feb 01 14:26:10 2014 -0800 38.3 @@ -0,0 +1,34 @@ 38.4 +build/Debug/GNU-Linux-x86/first.o: first.cpp \ 38.5 + /usr/local/include/js/jsapi.h /usr/local/include/js/js-config.h \ 38.6 + /usr/local/include/js/jspubtd.h /usr/local/include/js/jstypes.h \ 38.7 + /usr/local/include/js/jsautocfg.h /usr/local/include/js/jsinttypes.h \ 38.8 + /usr/local/include/js/jsotypes.h /usr/local/include/js/jscompat.h \ 38.9 + /usr/local/include/js/jslong.h /usr/local/include/js/jsval.h \ 38.10 + /usr/local/include/js/jsutil.h /usr/local/include/js/jsproto.tbl \ 38.11 + /usr/local/include/js/jsversion.h 38.12 + 38.13 +/usr/local/include/js/jsapi.h: 38.14 + 38.15 +/usr/local/include/js/js-config.h: 38.16 + 38.17 +/usr/local/include/js/jspubtd.h: 38.18 + 38.19 +/usr/local/include/js/jstypes.h: 38.20 + 38.21 +/usr/local/include/js/jsautocfg.h: 38.22 + 38.23 +/usr/local/include/js/jsinttypes.h: 38.24 + 38.25 +/usr/local/include/js/jsotypes.h: 38.26 + 38.27 +/usr/local/include/js/jscompat.h: 38.28 + 38.29 +/usr/local/include/js/jslong.h: 38.30 + 38.31 +/usr/local/include/js/jsval.h: 38.32 + 38.33 +/usr/local/include/js/jsutil.h: 38.34 + 38.35 +/usr/local/include/js/jsproto.tbl: 38.36 + 38.37 +/usr/local/include/js/jsversion.h:
39.1 Binary file SpiderMonkey_tests/CppApplication_1/dist/Debug/GNU-Linux-x86/cppapplication_1 has changed
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 40.2 +++ b/SpiderMonkey_tests/CppApplication_1/first.cpp Sat Feb 01 14:26:10 2014 -0800 40.3 @@ -0,0 +1,176 @@ 40.4 +/* 40.5 + * File: first.cpp 40.6 + * Author: sara 40.7 + * 40.8 + * Created on December 30, 2013, 11:41 AM 40.9 + */ 40.10 + 40.11 +#include <cstdlib> 40.12 +/* Include the JSAPI header file to get access to SpiderMonkey. */ 40.13 +#include "jsapi.h" 40.14 +#include <pthread.h> 40.15 + 40.16 +using namespace std; 40.17 +struct thread_parameter 40.18 +{ 40.19 + // char *uncompiledScript; 40.20 + // JSObject *sharedGlobalObject; 40.21 + // JSRuntime *currRt; 40.22 + char *tempstr; 40.23 + 40.24 + 40.25 +}; 40.26 +/* The class of the global object. */ 40.27 +JSRuntime *rt; 40.28 +JSObject *global; 40.29 +static JSClass global_class = { 40.30 + "global", JSCLASS_GLOBAL_FLAGS, 40.31 + JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 40.32 + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 40.33 + JSCLASS_NO_OPTIONAL_MEMBERS 40.34 +}; 40.35 + 40.36 +/* The error reporter callback. */ 40.37 +void reportError(JSContext *cx, const char *message, JSErrorReport *report) 40.38 +{ 40.39 + fprintf(stderr, "%s:%u:%s\n", 40.40 + report->filename ? report->filename : "<no filename=\"filename\">", 40.41 + (unsigned int) report->lineno, 40.42 + message); 40.43 +} 40.44 +/** the function which the thread executes when is created at main 40.45 + *@parameter structure of all the argument the function needs 40.46 + *@return return null at the end 40.47 +*/ 40.48 +void *threadFunction(void* arg){ 40.49 + /* indicates that the execution of the script is executed successfully or not*/ 40.50 + bool execute; 40.51 + int temp = 1; 40.52 +// char *script = "'Hi' + 'Sara'"; 40.53 + char threadScript[] = "'Hi ' + 'Sara!'"; 40.54 + char *scr = threadScript; 40.55 + JSString *outStr; 40.56 +/* carries the value of the last expression of the script*/ 40.57 + jsval rval1; 40.58 + 40.59 +/* The new context which is created by the thread*/ 40.60 + JSContext *currContext; 40.61 +/* pass the incoming argument of the function */ 40.62 +// struct thread_parameter *arg1 = (struct thread_parameter *) arg; 40.63 +//const char *uncScript = (const char*)arg->uncompiledScript; 40.64 + //scr = (char *)arg; 40.65 +/*Creates new context to be attached to the creator thread*/ 40.66 +currContext = JS_NewContext(rt, 8192); 40.67 + if (currContext == NULL) 40.68 + return NULL; 40.69 +/* In a thread safe build every entry to the api that uses 40.70 + context must be in a request for thread safety*/ 40.71 + JS_BeginRequest(currContext); 40.72 + JS_SetOptions(currContext, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 40.73 + JS_SetVersion(currContext, JSVERSION_LATEST); 40.74 +/*Compiles the incoming script*/ 40.75 + JSObject *compiledScript = JS_CompileScript(currContext, global, scr,strlen(scr), "threadFilename", 0); 40.76 +/*Executes the compiled script*/ 40.77 + execute = JS_ExecuteScript(currContext, global, compiledScript, &rval1); 40.78 + if ( rval1 == JS_FALSE)//rval == JS_NULL | 40.79 + return NULL; 40.80 + /*gets the returned value of the last expression of the executed script*/ 40.81 + outStr = JS_ValueToString(currContext, rval1); 40.82 + printf("%s\n", JS_EncodeString(currContext, outStr)); 40.83 +/*Ends the request */ 40.84 + JS_EndRequest(currContext); 40.85 +/*Destroy the context of that thread*/ 40.86 + JS_DestroyContext(currContext); 40.87 + //printf("HI, Sara"); 40.88 + return NULL; 40.89 + 40.90 +} 40.91 +/* 40.92 + * 40.93 + */ 40.94 +int main(int argc, const char *argv[]) { 40.95 + 40.96 + /* JSAPI variables. */ 40.97 + //JSRuntime *rt; 40.98 + JSContext *cx; 40.99 + // JSObject *global; 40.100 +/* id of the created thread*/ 40.101 + pthread_t thread_id; 40.102 + 40.103 + /* Create a JS runtime. You always need at least one runtime per process. */ 40.104 + rt = JS_NewRuntime(8 * 1024 * 1024); 40.105 + if (rt == NULL) 40.106 + return 1; 40.107 + 40.108 + /* 40.109 + * Create a context. You always need a context per thread. 40.110 + * Note that this program is not multi-threaded. 40.111 + This thread is used by the main thread only 40.112 + */ 40.113 + cx = JS_NewContext(rt, 8192); 40.114 + if (cx == NULL) 40.115 + return 1; 40.116 + JS_BeginRequest(cx); 40.117 + JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 40.118 + JS_SetVersion(cx, JSVERSION_LATEST); 40.119 + JS_SetErrorReporter(cx, reportError); 40.120 + 40.121 + /* 40.122 + * Create the global object in a new compartment. 40.123 + * You always need a global object per context. 40.124 + */ 40.125 + 40.126 + global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 40.127 + if (global == NULL) 40.128 + return 1; 40.129 + 40.130 + /* 40.131 + * Populate the global object with the standard JavaScript 40.132 + * function and object classes, such as Object, Array, Date. 40.133 + */ 40.134 + if (!JS_InitStandardClasses(cx, global)) 40.135 + return 1; 40.136 + 40.137 + /* Your application code here. This may include JSAPI calls 40.138 + * to create your own custom JavaScript objects and to run scripts. 40.139 + * 40.140 + * The following example code creates a literal JavaScript script, 40.141 + * evaluates it, and prints the result to stdout. 40.142 + * 40.143 + * Errors are conventionally saved in a JSBool variable named ok. 40.144 + */ 40.145 + 40.146 + 40.147 + /** Create the thread here....*/ 40.148 + struct thread_parameter threadArg; 40.149 + //threadArg.sharedGlobalObject = global; 40.150 + char threadScript[] = "'Hi ' + 'Sara!'"; 40.151 + //threadArg.tempstr = threadScript; 40.152 + //threadArg.currRt = rt; 40.153 + 40.154 + pthread_create(&thread_id, NULL, &threadFunction,NULL); 40.155 +/*****************************************************************/ 40.156 + const char *script = "'Hello ' + 'World!'"; 40.157 + jsval rval; 40.158 + JSString *str; 40.159 + JSBool ok; 40.160 + const char *filename = "noname"; 40.161 + uintN lineno = 0; 40.162 + ok = JS_EvaluateScript(cx, global, script, strlen(script), 40.163 + filename, lineno, &rval); 40.164 + if ( rval == JS_FALSE)//rval == JS_NULL | 40.165 + return 1; 40.166 + str = JS_ValueToString(cx, rval); 40.167 + printf("%s\n", JS_EncodeString(cx, str)); 40.168 + 40.169 + /* End of your application code */ 40.170 + 40.171 + /* Clean things up and shut down SpiderMonkey. */ 40.172 + JS_EndRequest(cx); 40.173 + JS_DestroyContext(cx); 40.174 + JS_DestroyRuntime(rt); 40.175 + JS_ShutDown(); 40.176 + 40.177 + return 0; 40.178 +} 40.179 +
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 41.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Makefile-Debug.mk Sat Feb 01 14:26:10 2014 -0800 41.3 @@ -0,0 +1,83 @@ 41.4 +# 41.5 +# Generated Makefile - do not edit! 41.6 +# 41.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 41.8 +# has a -pre and a -post target defined where you can add customized code. 41.9 +# 41.10 +# This makefile implements configuration specific macros and targets. 41.11 + 41.12 + 41.13 +# Environment 41.14 +MKDIR=mkdir 41.15 +CP=cp 41.16 +GREP=grep 41.17 +NM=nm 41.18 +CCADMIN=CCadmin 41.19 +RANLIB=ranlib 41.20 +CC=gcc 41.21 +CCC=g++ 41.22 +CXX=g++ 41.23 +FC=gfortran 41.24 +AS=as 41.25 + 41.26 +# Macros 41.27 +CND_PLATFORM=GNU-Linux-x86 41.28 +CND_CONF=Debug 41.29 +CND_DISTDIR=dist 41.30 +CND_BUILDDIR=build 41.31 + 41.32 +# Include project Makefile 41.33 +include Makefile 41.34 + 41.35 +# Object Directory 41.36 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 41.37 + 41.38 +# Object Files 41.39 +OBJECTFILES= \ 41.40 + ${OBJECTDIR}/first.o 41.41 + 41.42 + 41.43 +# C Compiler Flags 41.44 +CFLAGS= 41.45 + 41.46 +# CC Compiler Flags 41.47 +CCFLAGS= 41.48 +CXXFLAGS= 41.49 + 41.50 +# Fortran Compiler Flags 41.51 +FFLAGS= 41.52 + 41.53 +# Assembler Flags 41.54 +ASFLAGS= 41.55 + 41.56 +# Link Libraries and Options 41.57 +LDLIBSOPTIONS=-L/usr/local/lib -lmozjs185-1.0 -lmozjs185 -lpthread 41.58 + 41.59 +# Build Targets 41.60 +.build-conf: ${BUILD_SUBPROJECTS} 41.61 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 41.62 + 41.63 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 41.64 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 41.65 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 41.66 + 41.67 +${OBJECTDIR}/first.o: first.cpp 41.68 + ${MKDIR} -p ${OBJECTDIR} 41.69 + ${RM} $@.d 41.70 + $(COMPILE.cc) -g -I/usr/local/include/js -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 41.71 + 41.72 +# Subprojects 41.73 +.build-subprojects: 41.74 + 41.75 +# Clean Targets 41.76 +.clean-conf: ${CLEAN_SUBPROJECTS} 41.77 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 41.78 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 41.79 + 41.80 +# Subprojects 41.81 +.clean-subprojects: 41.82 + 41.83 +# Enable dependency checking 41.84 +.dep.inc: .depcheck-impl 41.85 + 41.86 +include .dep.inc
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 42.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Makefile-Release.mk Sat Feb 01 14:26:10 2014 -0800 42.3 @@ -0,0 +1,83 @@ 42.4 +# 42.5 +# Generated Makefile - do not edit! 42.6 +# 42.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 42.8 +# has a -pre and a -post target defined where you can add customized code. 42.9 +# 42.10 +# This makefile implements configuration specific macros and targets. 42.11 + 42.12 + 42.13 +# Environment 42.14 +MKDIR=mkdir 42.15 +CP=cp 42.16 +GREP=grep 42.17 +NM=nm 42.18 +CCADMIN=CCadmin 42.19 +RANLIB=ranlib 42.20 +CC=gcc 42.21 +CCC=g++ 42.22 +CXX=g++ 42.23 +FC=gfortran 42.24 +AS=as 42.25 + 42.26 +# Macros 42.27 +CND_PLATFORM=GNU-Linux-x86 42.28 +CND_CONF=Release 42.29 +CND_DISTDIR=dist 42.30 +CND_BUILDDIR=build 42.31 + 42.32 +# Include project Makefile 42.33 +include Makefile 42.34 + 42.35 +# Object Directory 42.36 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 42.37 + 42.38 +# Object Files 42.39 +OBJECTFILES= \ 42.40 + ${OBJECTDIR}/first.o 42.41 + 42.42 + 42.43 +# C Compiler Flags 42.44 +CFLAGS= 42.45 + 42.46 +# CC Compiler Flags 42.47 +CCFLAGS= 42.48 +CXXFLAGS= 42.49 + 42.50 +# Fortran Compiler Flags 42.51 +FFLAGS= 42.52 + 42.53 +# Assembler Flags 42.54 +ASFLAGS= 42.55 + 42.56 +# Link Libraries and Options 42.57 +LDLIBSOPTIONS= 42.58 + 42.59 +# Build Targets 42.60 +.build-conf: ${BUILD_SUBPROJECTS} 42.61 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 42.62 + 42.63 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1: ${OBJECTFILES} 42.64 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 42.65 + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 ${OBJECTFILES} ${LDLIBSOPTIONS} 42.66 + 42.67 +${OBJECTDIR}/first.o: first.cpp 42.68 + ${MKDIR} -p ${OBJECTDIR} 42.69 + ${RM} $@.d 42.70 + $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/first.o first.cpp 42.71 + 42.72 +# Subprojects 42.73 +.build-subprojects: 42.74 + 42.75 +# Clean Targets 42.76 +.clean-conf: ${CLEAN_SUBPROJECTS} 42.77 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 42.78 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 42.79 + 42.80 +# Subprojects 42.81 +.clean-subprojects: 42.82 + 42.83 +# Enable dependency checking 42.84 +.dep.inc: .depcheck-impl 42.85 + 42.86 +include .dep.inc
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 43.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Makefile-impl.mk Sat Feb 01 14:26:10 2014 -0800 43.3 @@ -0,0 +1,133 @@ 43.4 +# 43.5 +# Generated Makefile - do not edit! 43.6 +# 43.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 43.8 +# has a pre- and a post- target defined where you can add customization code. 43.9 +# 43.10 +# This makefile implements macros and targets common to all configurations. 43.11 +# 43.12 +# NOCDDL 43.13 + 43.14 + 43.15 +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB 43.16 +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro 43.17 +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 43.18 +# and .clean-reqprojects-conf unless SUB has the value 'no' 43.19 +SUB_no=NO 43.20 +SUBPROJECTS=${SUB_${SUB}} 43.21 +BUILD_SUBPROJECTS_=.build-subprojects 43.22 +BUILD_SUBPROJECTS_NO= 43.23 +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 43.24 +CLEAN_SUBPROJECTS_=.clean-subprojects 43.25 +CLEAN_SUBPROJECTS_NO= 43.26 +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 43.27 + 43.28 + 43.29 +# Project Name 43.30 +PROJECTNAME=CppApplication_1 43.31 + 43.32 +# Active Configuration 43.33 +DEFAULTCONF=Debug 43.34 +CONF=${DEFAULTCONF} 43.35 + 43.36 +# All Configurations 43.37 +ALLCONFS=Debug Release 43.38 + 43.39 + 43.40 +# build 43.41 +.build-impl: .build-pre .validate-impl .depcheck-impl 43.42 + @#echo "=> Running $@... Configuration=$(CONF)" 43.43 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 43.44 + 43.45 + 43.46 +# clean 43.47 +.clean-impl: .clean-pre .validate-impl .depcheck-impl 43.48 + @#echo "=> Running $@... Configuration=$(CONF)" 43.49 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 43.50 + 43.51 + 43.52 +# clobber 43.53 +.clobber-impl: .clobber-pre .depcheck-impl 43.54 + @#echo "=> Running $@..." 43.55 + for CONF in ${ALLCONFS}; \ 43.56 + do \ 43.57 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 43.58 + done 43.59 + 43.60 +# all 43.61 +.all-impl: .all-pre .depcheck-impl 43.62 + @#echo "=> Running $@..." 43.63 + for CONF in ${ALLCONFS}; \ 43.64 + do \ 43.65 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 43.66 + done 43.67 + 43.68 +# build tests 43.69 +.build-tests-impl: .build-impl .build-tests-pre 43.70 + @#echo "=> Running $@... Configuration=$(CONF)" 43.71 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 43.72 + 43.73 +# run tests 43.74 +.test-impl: .build-tests-impl .test-pre 43.75 + @#echo "=> Running $@... Configuration=$(CONF)" 43.76 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 43.77 + 43.78 +# dependency checking support 43.79 +.depcheck-impl: 43.80 + @echo "# This code depends on make tool being used" >.dep.inc 43.81 + @if [ -n "${MAKE_VERSION}" ]; then \ 43.82 + echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ 43.83 + echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 43.84 + echo "include \$${DEPFILES}" >>.dep.inc; \ 43.85 + echo "endif" >>.dep.inc; \ 43.86 + else \ 43.87 + echo ".KEEP_STATE:" >>.dep.inc; \ 43.88 + echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 43.89 + fi 43.90 + 43.91 +# configuration validation 43.92 +.validate-impl: 43.93 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 43.94 + then \ 43.95 + echo ""; \ 43.96 + echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 43.97 + echo "See 'make help' for details."; \ 43.98 + echo "Current directory: " `pwd`; \ 43.99 + echo ""; \ 43.100 + fi 43.101 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 43.102 + then \ 43.103 + exit 1; \ 43.104 + fi 43.105 + 43.106 + 43.107 +# help 43.108 +.help-impl: .help-pre 43.109 + @echo "This makefile supports the following configurations:" 43.110 + @echo " ${ALLCONFS}" 43.111 + @echo "" 43.112 + @echo "and the following targets:" 43.113 + @echo " build (default target)" 43.114 + @echo " clean" 43.115 + @echo " clobber" 43.116 + @echo " all" 43.117 + @echo " help" 43.118 + @echo "" 43.119 + @echo "Makefile Usage:" 43.120 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] build" 43.121 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean" 43.122 + @echo " make [SUB=no] clobber" 43.123 + @echo " make [SUB=no] all" 43.124 + @echo " make help" 43.125 + @echo "" 43.126 + @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 43.127 + @echo " also build subprojects." 43.128 + @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 43.129 + @echo " also clean subprojects." 43.130 + @echo "Target 'clobber' will remove all built files from all configurations and," 43.131 + @echo " unless 'SUB=no', also from subprojects." 43.132 + @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 43.133 + @echo " also build subprojects." 43.134 + @echo "Target 'help' prints this message." 43.135 + @echo "" 43.136 +
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 44.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Makefile-variables.mk Sat Feb 01 14:26:10 2014 -0800 44.3 @@ -0,0 +1,35 @@ 44.4 +# 44.5 +# Generated - do not edit! 44.6 +# 44.7 +# NOCDDL 44.8 +# 44.9 +CND_BASEDIR=`pwd` 44.10 +CND_BUILDDIR=build 44.11 +CND_DISTDIR=dist 44.12 +# Debug configuration 44.13 +CND_PLATFORM_Debug=GNU-Linux-x86 44.14 +CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 44.15 +CND_ARTIFACT_NAME_Debug=cppapplication_1 44.16 +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/cppapplication_1 44.17 +CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package 44.18 +CND_PACKAGE_NAME_Debug=cppapplication1.tar 44.19 +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/cppapplication1.tar 44.20 +# Release configuration 44.21 +CND_PLATFORM_Release=GNU-Linux-x86 44.22 +CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 44.23 +CND_ARTIFACT_NAME_Release=cppapplication_1 44.24 +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/cppapplication_1 44.25 +CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package 44.26 +CND_PACKAGE_NAME_Release=cppapplication1.tar 44.27 +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/cppapplication1.tar 44.28 +# 44.29 +# include compiler specific variables 44.30 +# 44.31 +# dmake command 44.32 +ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 44.33 + (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 44.34 +# 44.35 +# gmake command 44.36 +.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 44.37 +# 44.38 +include nbproject/private/Makefile-variables.mk
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 45.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Package-Debug.bash Sat Feb 01 14:26:10 2014 -0800 45.3 @@ -0,0 +1,75 @@ 45.4 +#!/bin/bash -x 45.5 + 45.6 +# 45.7 +# Generated - do not edit! 45.8 +# 45.9 + 45.10 +# Macros 45.11 +TOP=`pwd` 45.12 +CND_PLATFORM=GNU-Linux-x86 45.13 +CND_CONF=Debug 45.14 +CND_DISTDIR=dist 45.15 +CND_BUILDDIR=build 45.16 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 45.17 +TMPDIRNAME=tmp-packaging 45.18 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 45.19 +OUTPUT_BASENAME=cppapplication_1 45.20 +PACKAGE_TOP_DIR=cppapplication1/ 45.21 + 45.22 +# Functions 45.23 +function checkReturnCode 45.24 +{ 45.25 + rc=$? 45.26 + if [ $rc != 0 ] 45.27 + then 45.28 + exit $rc 45.29 + fi 45.30 +} 45.31 +function makeDirectory 45.32 +# $1 directory path 45.33 +# $2 permission (optional) 45.34 +{ 45.35 + mkdir -p "$1" 45.36 + checkReturnCode 45.37 + if [ "$2" != "" ] 45.38 + then 45.39 + chmod $2 "$1" 45.40 + checkReturnCode 45.41 + fi 45.42 +} 45.43 +function copyFileToTmpDir 45.44 +# $1 from-file path 45.45 +# $2 to-file path 45.46 +# $3 permission 45.47 +{ 45.48 + cp "$1" "$2" 45.49 + checkReturnCode 45.50 + if [ "$3" != "" ] 45.51 + then 45.52 + chmod $3 "$2" 45.53 + checkReturnCode 45.54 + fi 45.55 +} 45.56 + 45.57 +# Setup 45.58 +cd "${TOP}" 45.59 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 45.60 +rm -rf ${NBTMPDIR} 45.61 +mkdir -p ${NBTMPDIR} 45.62 + 45.63 +# Copy files and create directories and links 45.64 +cd "${TOP}" 45.65 +makeDirectory "${NBTMPDIR}/cppapplication1/bin" 45.66 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 45.67 + 45.68 + 45.69 +# Generate tar file 45.70 +cd "${TOP}" 45.71 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 45.72 +cd ${NBTMPDIR} 45.73 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 45.74 +checkReturnCode 45.75 + 45.76 +# Cleanup 45.77 +cd "${TOP}" 45.78 +rm -rf ${NBTMPDIR}
46.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 46.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/Package-Release.bash Sat Feb 01 14:26:10 2014 -0800 46.3 @@ -0,0 +1,75 @@ 46.4 +#!/bin/bash -x 46.5 + 46.6 +# 46.7 +# Generated - do not edit! 46.8 +# 46.9 + 46.10 +# Macros 46.11 +TOP=`pwd` 46.12 +CND_PLATFORM=GNU-Linux-x86 46.13 +CND_CONF=Release 46.14 +CND_DISTDIR=dist 46.15 +CND_BUILDDIR=build 46.16 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 46.17 +TMPDIRNAME=tmp-packaging 46.18 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1 46.19 +OUTPUT_BASENAME=cppapplication_1 46.20 +PACKAGE_TOP_DIR=cppapplication1/ 46.21 + 46.22 +# Functions 46.23 +function checkReturnCode 46.24 +{ 46.25 + rc=$? 46.26 + if [ $rc != 0 ] 46.27 + then 46.28 + exit $rc 46.29 + fi 46.30 +} 46.31 +function makeDirectory 46.32 +# $1 directory path 46.33 +# $2 permission (optional) 46.34 +{ 46.35 + mkdir -p "$1" 46.36 + checkReturnCode 46.37 + if [ "$2" != "" ] 46.38 + then 46.39 + chmod $2 "$1" 46.40 + checkReturnCode 46.41 + fi 46.42 +} 46.43 +function copyFileToTmpDir 46.44 +# $1 from-file path 46.45 +# $2 to-file path 46.46 +# $3 permission 46.47 +{ 46.48 + cp "$1" "$2" 46.49 + checkReturnCode 46.50 + if [ "$3" != "" ] 46.51 + then 46.52 + chmod $3 "$2" 46.53 + checkReturnCode 46.54 + fi 46.55 +} 46.56 + 46.57 +# Setup 46.58 +cd "${TOP}" 46.59 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 46.60 +rm -rf ${NBTMPDIR} 46.61 +mkdir -p ${NBTMPDIR} 46.62 + 46.63 +# Copy files and create directories and links 46.64 +cd "${TOP}" 46.65 +makeDirectory "${NBTMPDIR}/cppapplication1/bin" 46.66 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 46.67 + 46.68 + 46.69 +# Generate tar file 46.70 +cd "${TOP}" 46.71 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar 46.72 +cd ${NBTMPDIR} 46.73 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar * 46.74 +checkReturnCode 46.75 + 46.76 +# Cleanup 46.77 +cd "${TOP}" 46.78 +rm -rf ${NBTMPDIR}
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 47.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/configurations.xml Sat Feb 01 14:26:10 2014 -0800 47.3 @@ -0,0 +1,80 @@ 47.4 +<?xml version="1.0" encoding="UTF-8"?> 47.5 +<configurationDescriptor version="79"> 47.6 + <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> 47.7 + <logicalFolder name="HeaderFiles" 47.8 + displayName="Header Files" 47.9 + projectFiles="true"> 47.10 + </logicalFolder> 47.11 + <logicalFolder name="ResourceFiles" 47.12 + displayName="Resource Files" 47.13 + projectFiles="true"> 47.14 + </logicalFolder> 47.15 + <logicalFolder name="SourceFiles" 47.16 + displayName="Source Files" 47.17 + projectFiles="true"> 47.18 + <itemPath>first.cpp</itemPath> 47.19 + </logicalFolder> 47.20 + <logicalFolder name="TestFiles" 47.21 + displayName="Test Files" 47.22 + projectFiles="false" 47.23 + kind="TEST_LOGICAL_FOLDER"> 47.24 + </logicalFolder> 47.25 + <logicalFolder name="ExternalFiles" 47.26 + displayName="Important Files" 47.27 + projectFiles="false" 47.28 + kind="IMPORTANT_FILES_FOLDER"> 47.29 + <itemPath>Makefile</itemPath> 47.30 + </logicalFolder> 47.31 + </logicalFolder> 47.32 + <projectmakefile>Makefile</projectmakefile> 47.33 + <confs> 47.34 + <conf name="Debug" type="1"> 47.35 + <toolsSet> 47.36 + <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 47.37 + <compilerSet>default</compilerSet> 47.38 + </toolsSet> 47.39 + <compileType> 47.40 + <cTool> 47.41 + <incDir> 47.42 + <pElem>/usr/local/include/js</pElem> 47.43 + </incDir> 47.44 + </cTool> 47.45 + <ccTool> 47.46 + <incDir> 47.47 + <pElem>/usr/local/include/js</pElem> 47.48 + </incDir> 47.49 + </ccTool> 47.50 + <linkerTool> 47.51 + <linkerAddLib> 47.52 + <pElem>/usr/local/lib</pElem> 47.53 + </linkerAddLib> 47.54 + <linkerLibItems> 47.55 + <linkerLibLibItem>mozjs185-1.0</linkerLibLibItem> 47.56 + <linkerLibLibItem>mozjs185</linkerLibLibItem> 47.57 + <linkerLibLibItem>pthread</linkerLibLibItem> 47.58 + </linkerLibItems> 47.59 + </linkerTool> 47.60 + </compileType> 47.61 + </conf> 47.62 + <conf name="Release" type="1"> 47.63 + <toolsSet> 47.64 + <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 47.65 + <compilerSet>default</compilerSet> 47.66 + </toolsSet> 47.67 + <compileType> 47.68 + <cTool> 47.69 + <developmentMode>5</developmentMode> 47.70 + </cTool> 47.71 + <ccTool> 47.72 + <developmentMode>5</developmentMode> 47.73 + </ccTool> 47.74 + <fortranCompilerTool> 47.75 + <developmentMode>5</developmentMode> 47.76 + </fortranCompilerTool> 47.77 + <asmTool> 47.78 + <developmentMode>5</developmentMode> 47.79 + </asmTool> 47.80 + </compileType> 47.81 + </conf> 47.82 + </confs> 47.83 +</configurationDescriptor>
48.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 48.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/private/Makefile-variables.mk Sat Feb 01 14:26:10 2014 -0800 48.3 @@ -0,0 +1,7 @@ 48.4 +# 48.5 +# Generated - do not edit! 48.6 +# 48.7 +# NOCDDL 48.8 +# 48.9 +# Debug configuration 48.10 +# Release configuration
49.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 49.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/private/configurations.xml Sat Feb 01 14:26:10 2014 -0800 49.3 @@ -0,0 +1,77 @@ 49.4 +<?xml version="1.0" encoding="UTF-8"?> 49.5 +<configurationDescriptor version="79"> 49.6 + <projectmakefile>Makefile</projectmakefile> 49.7 + <confs> 49.8 + <conf name="Debug" type="1"> 49.9 + <toolsSet> 49.10 + <developmentServer>localhost</developmentServer> 49.11 + <platform>2</platform> 49.12 + </toolsSet> 49.13 + <dbx_gdbdebugger version="1"> 49.14 + <gdb_pathmaps> 49.15 + </gdb_pathmaps> 49.16 + <gdb_interceptlist> 49.17 + <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 49.18 + </gdb_interceptlist> 49.19 + <gdb_options> 49.20 + <DebugOptions> 49.21 + </DebugOptions> 49.22 + </gdb_options> 49.23 + <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 49.24 + </dbx_gdbdebugger> 49.25 + <gizmo_options version="3"> 49.26 + <configurationname>GizmoSimple</configurationname> 49.27 + </gizmo_options> 49.28 + <nativedebugger version="1"> 49.29 + <engine>gdb</engine> 49.30 + </nativedebugger> 49.31 + <runprofile version="9"> 49.32 + <runcommandpicklist> 49.33 + <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 49.34 + </runcommandpicklist> 49.35 + <runcommand>"${OUTPUT_PATH}"</runcommand> 49.36 + <rundir></rundir> 49.37 + <buildfirst>true</buildfirst> 49.38 + <terminal-type>0</terminal-type> 49.39 + <remove-instrumentation>0</remove-instrumentation> 49.40 + <environment> 49.41 + </environment> 49.42 + </runprofile> 49.43 + </conf> 49.44 + <conf name="Release" type="1"> 49.45 + <toolsSet> 49.46 + <developmentServer>localhost</developmentServer> 49.47 + <platform>2</platform> 49.48 + </toolsSet> 49.49 + <dbx_gdbdebugger version="1"> 49.50 + <gdb_pathmaps> 49.51 + </gdb_pathmaps> 49.52 + <gdb_interceptlist> 49.53 + <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 49.54 + </gdb_interceptlist> 49.55 + <gdb_options> 49.56 + <DebugOptions> 49.57 + </DebugOptions> 49.58 + </gdb_options> 49.59 + <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 49.60 + </dbx_gdbdebugger> 49.61 + <gizmo_options version="3"> 49.62 + </gizmo_options> 49.63 + <nativedebugger version="1"> 49.64 + <engine>gdb</engine> 49.65 + </nativedebugger> 49.66 + <runprofile version="9"> 49.67 + <runcommandpicklist> 49.68 + <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 49.69 + </runcommandpicklist> 49.70 + <runcommand>"${OUTPUT_PATH}"</runcommand> 49.71 + <rundir></rundir> 49.72 + <buildfirst>true</buildfirst> 49.73 + <terminal-type>0</terminal-type> 49.74 + <remove-instrumentation>0</remove-instrumentation> 49.75 + <environment> 49.76 + </environment> 49.77 + </runprofile> 49.78 + </conf> 49.79 + </confs> 49.80 +</configurationDescriptor>
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 50.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/private/private.xml Sat Feb 01 14:26:10 2014 -0800 50.3 @@ -0,0 +1,8 @@ 50.4 +<?xml version="1.0" encoding="UTF-8"?> 50.5 +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> 50.6 + <data xmlns="http://www.netbeans.org/ns/make-project-private/1"> 50.7 + <activeConfTypeElem>1</activeConfTypeElem> 50.8 + <activeConfIndexElem>0</activeConfIndexElem> 50.9 + </data> 50.10 + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> 50.11 +</project-private>
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 51.2 +++ b/SpiderMonkey_tests/CppApplication_1/nbproject/project.xml Sat Feb 01 14:26:10 2014 -0800 51.3 @@ -0,0 +1,25 @@ 51.4 +<?xml version="1.0" encoding="UTF-8"?> 51.5 +<project xmlns="http://www.netbeans.org/ns/project/1"> 51.6 + <type>org.netbeans.modules.cnd.makeproject</type> 51.7 + <configuration> 51.8 + <data xmlns="http://www.netbeans.org/ns/make-project/1"> 51.9 + <name>CppApplication_1</name> 51.10 + <c-extensions/> 51.11 + <cpp-extensions>cpp</cpp-extensions> 51.12 + <header-extensions/> 51.13 + <sourceEncoding>UTF-8</sourceEncoding> 51.14 + <make-dep-projects/> 51.15 + <sourceRootList/> 51.16 + <confList> 51.17 + <confElem> 51.18 + <name>Debug</name> 51.19 + <type>1</type> 51.20 + </confElem> 51.21 + <confElem> 51.22 + <name>Release</name> 51.23 + <type>1</type> 51.24 + </confElem> 51.25 + </confList> 51.26 + </data> 51.27 + </configuration> 51.28 +</project>
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 52.2 +++ b/SpiderMonkey_tests/Test1/first.cpp Sat Feb 01 14:26:10 2014 -0800 52.3 @@ -0,0 +1,176 @@ 52.4 +/* 52.5 + * File: first.cpp 52.6 + * Author: sara 52.7 + * 52.8 + * Created on December 30, 2013, 11:41 AM 52.9 + */ 52.10 + 52.11 +#include <cstdlib> 52.12 +/* Include the JSAPI header file to get access to SpiderMonkey. */ 52.13 +#include "jsapi.h" 52.14 +#include <pthread.h> 52.15 + 52.16 +using namespace std; 52.17 +struct thread_parameter 52.18 +{ 52.19 + // char *uncompiledScript; 52.20 + // JSObject *sharedGlobalObject; 52.21 + // JSRuntime *currRt; 52.22 + char *tempstr; 52.23 + 52.24 + 52.25 +}; 52.26 +/* The class of the global object. */ 52.27 +JSRuntime *rt; 52.28 +JSObject *global; 52.29 +static JSClass global_class = { 52.30 + "global", JSCLASS_GLOBAL_FLAGS, 52.31 + JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 52.32 + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 52.33 + JSCLASS_NO_OPTIONAL_MEMBERS 52.34 +}; 52.35 + 52.36 +/* The error reporter callback. */ 52.37 +void reportError(JSContext *cx, const char *message, JSErrorReport *report) 52.38 +{ 52.39 + fprintf(stderr, "%s:%u:%s\n", 52.40 + report->filename ? report->filename : "<no filename=\"filename\">", 52.41 + (unsigned int) report->lineno, 52.42 + message); 52.43 +} 52.44 +/** the function which the thread executes when is created at main 52.45 + *@parameter structure of all the argument the function needs 52.46 + *@return return null at the end 52.47 +*/ 52.48 +void *threadFunction(void* arg){ 52.49 + /* indicates that the execution of the script is executed successfully or not*/ 52.50 + bool execute; 52.51 + int temp = 1; 52.52 +// char *script = "'Hi' + 'Sara'"; 52.53 + char threadScript[] = "'Hi ' + 'Sara!'"; 52.54 + char *scr = threadScript; 52.55 + JSString *outStr; 52.56 +/* carries the value of the last expression of the script*/ 52.57 + jsval rval1; 52.58 + 52.59 +/* The new context which is created by the thread*/ 52.60 + JSContext *currContext; 52.61 +/* pass the incoming argument of the function */ 52.62 +// struct thread_parameter *arg1 = (struct thread_parameter *) arg; 52.63 +//const char *uncScript = (const char*)arg->uncompiledScript; 52.64 + //scr = (char *)arg; 52.65 +/*Creates new context to be attached to the creator thread*/ 52.66 +currContext = JS_NewContext(rt, 8192); 52.67 + if (currContext == NULL) 52.68 + return NULL; 52.69 +/* In a thread safe build every entry to the api that uses 52.70 + context must be in a request for thread safety*/ 52.71 + JS_BeginRequest(currContext); 52.72 + JS_SetOptions(currContext, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 52.73 + JS_SetVersion(currContext, JSVERSION_LATEST); 52.74 +/*Compiles the incoming script*/ 52.75 + JSObject *compiledScript = JS_CompileScript(currContext, global, scr,strlen(scr), "threadFilename", 0); 52.76 +/*Executes the compiled script*/ 52.77 + execute = JS_ExecuteScript(currContext, global, compiledScript, &rval1); 52.78 + if ( rval1 == JS_FALSE)//rval == JS_NULL | 52.79 + return NULL; 52.80 + /*gets the returned value of the last expression of the executed script*/ 52.81 + outStr = JS_ValueToString(currContext, rval1); 52.82 + printf("%s\n", JS_EncodeString(currContext, outStr)); 52.83 +/*Ends the request */ 52.84 + JS_EndRequest(currContext); 52.85 +/*Destroy the context of that thread*/ 52.86 + JS_DestroyContext(currContext); 52.87 + //printf("HI, Sara"); 52.88 + return NULL; 52.89 + 52.90 +} 52.91 +/* 52.92 + * 52.93 + */ 52.94 +int main(int argc, const char *argv[]) { 52.95 + 52.96 + /* JSAPI variables. */ 52.97 + //JSRuntime *rt; 52.98 + JSContext *cx; 52.99 + // JSObject *global; 52.100 +/* id of the created thread*/ 52.101 + pthread_t thread_id; 52.102 + 52.103 + /* Create a JS runtime. You always need at least one runtime per process. */ 52.104 + rt = JS_NewRuntime(8 * 1024 * 1024); 52.105 + if (rt == NULL) 52.106 + return 1; 52.107 + 52.108 + /* 52.109 + * Create a context. You always need a context per thread. 52.110 + * Note that this program is not multi-threaded. 52.111 + This thread is used by the main thread only 52.112 + */ 52.113 + cx = JS_NewContext(rt, 8192); 52.114 + if (cx == NULL) 52.115 + return 1; 52.116 + JS_BeginRequest(cx); 52.117 + JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 52.118 + JS_SetVersion(cx, JSVERSION_LATEST); 52.119 + JS_SetErrorReporter(cx, reportError); 52.120 + 52.121 + /* 52.122 + * Create the global object in a new compartment. 52.123 + * You always need a global object per context. 52.124 + */ 52.125 + 52.126 + global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 52.127 + if (global == NULL) 52.128 + return 1; 52.129 + 52.130 + /* 52.131 + * Populate the global object with the standard JavaScript 52.132 + * function and object classes, such as Object, Array, Date. 52.133 + */ 52.134 + if (!JS_InitStandardClasses(cx, global)) 52.135 + return 1; 52.136 + 52.137 + /* Your application code here. This may include JSAPI calls 52.138 + * to create your own custom JavaScript objects and to run scripts. 52.139 + * 52.140 + * The following example code creates a literal JavaScript script, 52.141 + * evaluates it, and prints the result to stdout. 52.142 + * 52.143 + * Errors are conventionally saved in a JSBool variable named ok. 52.144 + */ 52.145 + 52.146 + 52.147 + /** Create the thread here....*/ 52.148 + struct thread_parameter threadArg; 52.149 + //threadArg.sharedGlobalObject = global; 52.150 + char threadScript[] = "'Hi ' + 'Sara!'"; 52.151 + //threadArg.tempstr = threadScript; 52.152 + //threadArg.currRt = rt; 52.153 + 52.154 + pthread_create(&thread_id, NULL, &threadFunction,NULL); 52.155 +/*****************************************************************/ 52.156 + const char *script = "'Hello ' + 'World!'"; 52.157 + jsval rval; 52.158 + JSString *str; 52.159 + JSBool ok; 52.160 + const char *filename = "noname"; 52.161 + uintN lineno = 0; 52.162 + ok = JS_EvaluateScript(cx, global, script, strlen(script), 52.163 + filename, lineno, &rval); 52.164 + if ( rval == JS_FALSE)//rval == JS_NULL | 52.165 + return 1; 52.166 + str = JS_ValueToString(cx, rval); 52.167 + printf("%s\n", JS_EncodeString(cx, str)); 52.168 + 52.169 + /* End of your application code */ 52.170 + 52.171 + /* Clean things up and shut down SpiderMonkey. */ 52.172 + JS_EndRequest(cx); 52.173 + JS_DestroyContext(cx); 52.174 + JS_DestroyRuntime(rt); 52.175 + JS_ShutDown(); 52.176 + 52.177 + return 0; 52.178 +} 52.179 +
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 53.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/Makefile Sat Feb 01 14:26:10 2014 -0800 53.3 @@ -0,0 +1,128 @@ 53.4 +# 53.5 +# There exist several targets which are by default empty and which can be 53.6 +# used for execution of your targets. These targets are usually executed 53.7 +# before and after some main targets. They are: 53.8 +# 53.9 +# .build-pre: called before 'build' target 53.10 +# .build-post: called after 'build' target 53.11 +# .clean-pre: called before 'clean' target 53.12 +# .clean-post: called after 'clean' target 53.13 +# .clobber-pre: called before 'clobber' target 53.14 +# .clobber-post: called after 'clobber' target 53.15 +# .all-pre: called before 'all' target 53.16 +# .all-post: called after 'all' target 53.17 +# .help-pre: called before 'help' target 53.18 +# .help-post: called after 'help' target 53.19 +# 53.20 +# Targets beginning with '.' are not intended to be called on their own. 53.21 +# 53.22 +# Main targets can be executed directly, and they are: 53.23 +# 53.24 +# build build a specific configuration 53.25 +# clean remove built files from a configuration 53.26 +# clobber remove all built files 53.27 +# all build all configurations 53.28 +# help print help mesage 53.29 +# 53.30 +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and 53.31 +# .help-impl are implemented in nbproject/makefile-impl.mk. 53.32 +# 53.33 +# Available make variables: 53.34 +# 53.35 +# CND_BASEDIR base directory for relative paths 53.36 +# CND_DISTDIR default top distribution directory (build artifacts) 53.37 +# CND_BUILDDIR default top build directory (object files, ...) 53.38 +# CONF name of current configuration 53.39 +# CND_PLATFORM_${CONF} platform name (current configuration) 53.40 +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) 53.41 +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) 53.42 +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) 53.43 +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) 53.44 +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) 53.45 +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) 53.46 +# 53.47 +# NOCDDL 53.48 + 53.49 + 53.50 +# Environment 53.51 +MKDIR=mkdir 53.52 +CP=cp 53.53 +CCADMIN=CCadmin 53.54 + 53.55 + 53.56 +# build 53.57 +build: .build-post 53.58 + 53.59 +.build-pre: 53.60 +# Add your pre 'build' code here... 53.61 + 53.62 +.build-post: .build-impl 53.63 +# Add your post 'build' code here... 53.64 + 53.65 + 53.66 +# clean 53.67 +clean: .clean-post 53.68 + 53.69 +.clean-pre: 53.70 +# Add your pre 'clean' code here... 53.71 + 53.72 +.clean-post: .clean-impl 53.73 +# Add your post 'clean' code here... 53.74 + 53.75 + 53.76 +# clobber 53.77 +clobber: .clobber-post 53.78 + 53.79 +.clobber-pre: 53.80 +# Add your pre 'clobber' code here... 53.81 + 53.82 +.clobber-post: .clobber-impl 53.83 +# Add your post 'clobber' code here... 53.84 + 53.85 + 53.86 +# all 53.87 +all: .all-post 53.88 + 53.89 +.all-pre: 53.90 +# Add your pre 'all' code here... 53.91 + 53.92 +.all-post: .all-impl 53.93 +# Add your post 'all' code here... 53.94 + 53.95 + 53.96 +# build tests 53.97 +build-tests: .build-tests-post 53.98 + 53.99 +.build-tests-pre: 53.100 +# Add your pre 'build-tests' code here... 53.101 + 53.102 +.build-tests-post: .build-tests-impl 53.103 +# Add your post 'build-tests' code here... 53.104 + 53.105 + 53.106 +# run tests 53.107 +test: .test-post 53.108 + 53.109 +.test-pre: 53.110 +# Add your pre 'test' code here... 53.111 + 53.112 +.test-post: .test-impl 53.113 +# Add your post 'test' code here... 53.114 + 53.115 + 53.116 +# help 53.117 +help: .help-post 53.118 + 53.119 +.help-pre: 53.120 +# Add your pre 'help' code here... 53.121 + 53.122 +.help-post: .help-impl 53.123 +# Add your post 'help' code here... 53.124 + 53.125 + 53.126 + 53.127 +# include project implementation makefile 53.128 +include nbproject/Makefile-impl.mk 53.129 + 53.130 +# include project make variables 53.131 +include nbproject/Makefile-variables.mk
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 54.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Makefile-Debug.mk Sat Feb 01 14:26:10 2014 -0800 54.3 @@ -0,0 +1,77 @@ 54.4 +# 54.5 +# Generated Makefile - do not edit! 54.6 +# 54.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 54.8 +# has a -pre and a -post target defined where you can add customized code. 54.9 +# 54.10 +# This makefile implements configuration specific macros and targets. 54.11 + 54.12 + 54.13 +# Environment 54.14 +MKDIR=mkdir 54.15 +CP=cp 54.16 +GREP=grep 54.17 +NM=nm 54.18 +CCADMIN=CCadmin 54.19 +RANLIB=ranlib 54.20 +CC=gcc 54.21 +CCC=gcc-4.6 54.22 +CXX=gcc-4.6 54.23 +FC=gfortran 54.24 +AS=as 54.25 + 54.26 +# Macros 54.27 +CND_PLATFORM=GNU-Linux-x86 54.28 +CND_CONF=Debug 54.29 +CND_DISTDIR=dist 54.30 +CND_BUILDDIR=build 54.31 + 54.32 +# Include project Makefile 54.33 +include Makefile 54.34 + 54.35 +# Object Directory 54.36 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 54.37 + 54.38 +# Object Files 54.39 +OBJECTFILES= 54.40 + 54.41 + 54.42 +# C Compiler Flags 54.43 +CFLAGS= 54.44 + 54.45 +# CC Compiler Flags 54.46 +CCFLAGS= 54.47 +CXXFLAGS= 54.48 + 54.49 +# Fortran Compiler Flags 54.50 +FFLAGS= 54.51 + 54.52 +# Assembler Flags 54.53 +ASFLAGS= 54.54 + 54.55 +# Link Libraries and Options 54.56 +LDLIBSOPTIONS= 54.57 + 54.58 +# Build Targets 54.59 +.build-conf: ${BUILD_SUBPROJECTS} 54.60 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 54.61 + 54.62 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1: ${OBJECTFILES} 54.63 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 54.64 + ${LINK.c} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 ${OBJECTFILES} ${LDLIBSOPTIONS} 54.65 + 54.66 +# Subprojects 54.67 +.build-subprojects: 54.68 + 54.69 +# Clean Targets 54.70 +.clean-conf: ${CLEAN_SUBPROJECTS} 54.71 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 54.72 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 54.73 + 54.74 +# Subprojects 54.75 +.clean-subprojects: 54.76 + 54.77 +# Enable dependency checking 54.78 +.dep.inc: .depcheck-impl 54.79 + 54.80 +include .dep.inc
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 55.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Makefile-Release.mk Sat Feb 01 14:26:10 2014 -0800 55.3 @@ -0,0 +1,77 @@ 55.4 +# 55.5 +# Generated Makefile - do not edit! 55.6 +# 55.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 55.8 +# has a -pre and a -post target defined where you can add customized code. 55.9 +# 55.10 +# This makefile implements configuration specific macros and targets. 55.11 + 55.12 + 55.13 +# Environment 55.14 +MKDIR=mkdir 55.15 +CP=cp 55.16 +GREP=grep 55.17 +NM=nm 55.18 +CCADMIN=CCadmin 55.19 +RANLIB=ranlib 55.20 +CC=gcc 55.21 +CCC=gcc-4.6 55.22 +CXX=gcc-4.6 55.23 +FC=gfortran 55.24 +AS=as 55.25 + 55.26 +# Macros 55.27 +CND_PLATFORM=GNU-Linux-x86 55.28 +CND_CONF=Release 55.29 +CND_DISTDIR=dist 55.30 +CND_BUILDDIR=build 55.31 + 55.32 +# Include project Makefile 55.33 +include Makefile 55.34 + 55.35 +# Object Directory 55.36 +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 55.37 + 55.38 +# Object Files 55.39 +OBJECTFILES= 55.40 + 55.41 + 55.42 +# C Compiler Flags 55.43 +CFLAGS= 55.44 + 55.45 +# CC Compiler Flags 55.46 +CCFLAGS= 55.47 +CXXFLAGS= 55.48 + 55.49 +# Fortran Compiler Flags 55.50 +FFLAGS= 55.51 + 55.52 +# Assembler Flags 55.53 +ASFLAGS= 55.54 + 55.55 +# Link Libraries and Options 55.56 +LDLIBSOPTIONS= 55.57 + 55.58 +# Build Targets 55.59 +.build-conf: ${BUILD_SUBPROJECTS} 55.60 + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 55.61 + 55.62 +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1: ${OBJECTFILES} 55.63 + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 55.64 + ${LINK.c} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 ${OBJECTFILES} ${LDLIBSOPTIONS} 55.65 + 55.66 +# Subprojects 55.67 +.build-subprojects: 55.68 + 55.69 +# Clean Targets 55.70 +.clean-conf: ${CLEAN_SUBPROJECTS} 55.71 + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 55.72 + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 55.73 + 55.74 +# Subprojects 55.75 +.clean-subprojects: 55.76 + 55.77 +# Enable dependency checking 55.78 +.dep.inc: .depcheck-impl 55.79 + 55.80 +include .dep.inc
56.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 56.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Makefile-impl.mk Sat Feb 01 14:26:10 2014 -0800 56.3 @@ -0,0 +1,133 @@ 56.4 +# 56.5 +# Generated Makefile - do not edit! 56.6 +# 56.7 +# Edit the Makefile in the project folder instead (../Makefile). Each target 56.8 +# has a pre- and a post- target defined where you can add customization code. 56.9 +# 56.10 +# This makefile implements macros and targets common to all configurations. 56.11 +# 56.12 +# NOCDDL 56.13 + 56.14 + 56.15 +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB 56.16 +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro 56.17 +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 56.18 +# and .clean-reqprojects-conf unless SUB has the value 'no' 56.19 +SUB_no=NO 56.20 +SUBPROJECTS=${SUB_${SUB}} 56.21 +BUILD_SUBPROJECTS_=.build-subprojects 56.22 +BUILD_SUBPROJECTS_NO= 56.23 +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 56.24 +CLEAN_SUBPROJECTS_=.clean-subprojects 56.25 +CLEAN_SUBPROJECTS_NO= 56.26 +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 56.27 + 56.28 + 56.29 +# Project Name 56.30 +PROJECTNAME=nb__Test1 56.31 + 56.32 +# Active Configuration 56.33 +DEFAULTCONF=Debug 56.34 +CONF=${DEFAULTCONF} 56.35 + 56.36 +# All Configurations 56.37 +ALLCONFS=Debug Release 56.38 + 56.39 + 56.40 +# build 56.41 +.build-impl: .build-pre .validate-impl .depcheck-impl 56.42 + @#echo "=> Running $@... Configuration=$(CONF)" 56.43 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 56.44 + 56.45 + 56.46 +# clean 56.47 +.clean-impl: .clean-pre .validate-impl .depcheck-impl 56.48 + @#echo "=> Running $@... Configuration=$(CONF)" 56.49 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 56.50 + 56.51 + 56.52 +# clobber 56.53 +.clobber-impl: .clobber-pre .depcheck-impl 56.54 + @#echo "=> Running $@..." 56.55 + for CONF in ${ALLCONFS}; \ 56.56 + do \ 56.57 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 56.58 + done 56.59 + 56.60 +# all 56.61 +.all-impl: .all-pre .depcheck-impl 56.62 + @#echo "=> Running $@..." 56.63 + for CONF in ${ALLCONFS}; \ 56.64 + do \ 56.65 + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 56.66 + done 56.67 + 56.68 +# build tests 56.69 +.build-tests-impl: .build-impl .build-tests-pre 56.70 + @#echo "=> Running $@... Configuration=$(CONF)" 56.71 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 56.72 + 56.73 +# run tests 56.74 +.test-impl: .build-tests-impl .test-pre 56.75 + @#echo "=> Running $@... Configuration=$(CONF)" 56.76 + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 56.77 + 56.78 +# dependency checking support 56.79 +.depcheck-impl: 56.80 + @echo "# This code depends on make tool being used" >.dep.inc 56.81 + @if [ -n "${MAKE_VERSION}" ]; then \ 56.82 + echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ 56.83 + echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 56.84 + echo "include \$${DEPFILES}" >>.dep.inc; \ 56.85 + echo "endif" >>.dep.inc; \ 56.86 + else \ 56.87 + echo ".KEEP_STATE:" >>.dep.inc; \ 56.88 + echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 56.89 + fi 56.90 + 56.91 +# configuration validation 56.92 +.validate-impl: 56.93 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 56.94 + then \ 56.95 + echo ""; \ 56.96 + echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 56.97 + echo "See 'make help' for details."; \ 56.98 + echo "Current directory: " `pwd`; \ 56.99 + echo ""; \ 56.100 + fi 56.101 + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 56.102 + then \ 56.103 + exit 1; \ 56.104 + fi 56.105 + 56.106 + 56.107 +# help 56.108 +.help-impl: .help-pre 56.109 + @echo "This makefile supports the following configurations:" 56.110 + @echo " ${ALLCONFS}" 56.111 + @echo "" 56.112 + @echo "and the following targets:" 56.113 + @echo " build (default target)" 56.114 + @echo " clean" 56.115 + @echo " clobber" 56.116 + @echo " all" 56.117 + @echo " help" 56.118 + @echo "" 56.119 + @echo "Makefile Usage:" 56.120 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] build" 56.121 + @echo " make [CONF=<CONFIGURATION>] [SUB=no] clean" 56.122 + @echo " make [SUB=no] clobber" 56.123 + @echo " make [SUB=no] all" 56.124 + @echo " make help" 56.125 + @echo "" 56.126 + @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 56.127 + @echo " also build subprojects." 56.128 + @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 56.129 + @echo " also clean subprojects." 56.130 + @echo "Target 'clobber' will remove all built files from all configurations and," 56.131 + @echo " unless 'SUB=no', also from subprojects." 56.132 + @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 56.133 + @echo " also build subprojects." 56.134 + @echo "Target 'help' prints this message." 56.135 + @echo "" 56.136 +
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 57.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Makefile-variables.mk Sat Feb 01 14:26:10 2014 -0800 57.3 @@ -0,0 +1,35 @@ 57.4 +# 57.5 +# Generated - do not edit! 57.6 +# 57.7 +# NOCDDL 57.8 +# 57.9 +CND_BASEDIR=`pwd` 57.10 +CND_BUILDDIR=build 57.11 +CND_DISTDIR=dist 57.12 +# Debug configuration 57.13 +CND_PLATFORM_Debug=GNU-Linux-x86 57.14 +CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 57.15 +CND_ARTIFACT_NAME_Debug=nb__test1 57.16 +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/nb__test1 57.17 +CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package 57.18 +CND_PACKAGE_NAME_Debug=nbtest1.tar 57.19 +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/nbtest1.tar 57.20 +# Release configuration 57.21 +CND_PLATFORM_Release=GNU-Linux-x86 57.22 +CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 57.23 +CND_ARTIFACT_NAME_Release=nb__test1 57.24 +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/nb__test1 57.25 +CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package 57.26 +CND_PACKAGE_NAME_Release=nbtest1.tar 57.27 +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/nbtest1.tar 57.28 +# 57.29 +# include compiler specific variables 57.30 +# 57.31 +# dmake command 57.32 +ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 57.33 + (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 57.34 +# 57.35 +# gmake command 57.36 +.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 57.37 +# 57.38 +include nbproject/private/Makefile-variables.mk
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 58.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Package-Debug.bash Sat Feb 01 14:26:10 2014 -0800 58.3 @@ -0,0 +1,75 @@ 58.4 +#!/bin/bash -x 58.5 + 58.6 +# 58.7 +# Generated - do not edit! 58.8 +# 58.9 + 58.10 +# Macros 58.11 +TOP=`pwd` 58.12 +CND_PLATFORM=GNU-Linux-x86 58.13 +CND_CONF=Debug 58.14 +CND_DISTDIR=dist 58.15 +CND_BUILDDIR=build 58.16 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 58.17 +TMPDIRNAME=tmp-packaging 58.18 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 58.19 +OUTPUT_BASENAME=nb__test1 58.20 +PACKAGE_TOP_DIR=nbtest1/ 58.21 + 58.22 +# Functions 58.23 +function checkReturnCode 58.24 +{ 58.25 + rc=$? 58.26 + if [ $rc != 0 ] 58.27 + then 58.28 + exit $rc 58.29 + fi 58.30 +} 58.31 +function makeDirectory 58.32 +# $1 directory path 58.33 +# $2 permission (optional) 58.34 +{ 58.35 + mkdir -p "$1" 58.36 + checkReturnCode 58.37 + if [ "$2" != "" ] 58.38 + then 58.39 + chmod $2 "$1" 58.40 + checkReturnCode 58.41 + fi 58.42 +} 58.43 +function copyFileToTmpDir 58.44 +# $1 from-file path 58.45 +# $2 to-file path 58.46 +# $3 permission 58.47 +{ 58.48 + cp "$1" "$2" 58.49 + checkReturnCode 58.50 + if [ "$3" != "" ] 58.51 + then 58.52 + chmod $3 "$2" 58.53 + checkReturnCode 58.54 + fi 58.55 +} 58.56 + 58.57 +# Setup 58.58 +cd "${TOP}" 58.59 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 58.60 +rm -rf ${NBTMPDIR} 58.61 +mkdir -p ${NBTMPDIR} 58.62 + 58.63 +# Copy files and create directories and links 58.64 +cd "${TOP}" 58.65 +makeDirectory "${NBTMPDIR}/nbtest1/bin" 58.66 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 58.67 + 58.68 + 58.69 +# Generate tar file 58.70 +cd "${TOP}" 58.71 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/nbtest1.tar 58.72 +cd ${NBTMPDIR} 58.73 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/nbtest1.tar * 58.74 +checkReturnCode 58.75 + 58.76 +# Cleanup 58.77 +cd "${TOP}" 58.78 +rm -rf ${NBTMPDIR}
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 59.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/Package-Release.bash Sat Feb 01 14:26:10 2014 -0800 59.3 @@ -0,0 +1,75 @@ 59.4 +#!/bin/bash -x 59.5 + 59.6 +# 59.7 +# Generated - do not edit! 59.8 +# 59.9 + 59.10 +# Macros 59.11 +TOP=`pwd` 59.12 +CND_PLATFORM=GNU-Linux-x86 59.13 +CND_CONF=Release 59.14 +CND_DISTDIR=dist 59.15 +CND_BUILDDIR=build 59.16 +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 59.17 +TMPDIRNAME=tmp-packaging 59.18 +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/nb__test1 59.19 +OUTPUT_BASENAME=nb__test1 59.20 +PACKAGE_TOP_DIR=nbtest1/ 59.21 + 59.22 +# Functions 59.23 +function checkReturnCode 59.24 +{ 59.25 + rc=$? 59.26 + if [ $rc != 0 ] 59.27 + then 59.28 + exit $rc 59.29 + fi 59.30 +} 59.31 +function makeDirectory 59.32 +# $1 directory path 59.33 +# $2 permission (optional) 59.34 +{ 59.35 + mkdir -p "$1" 59.36 + checkReturnCode 59.37 + if [ "$2" != "" ] 59.38 + then 59.39 + chmod $2 "$1" 59.40 + checkReturnCode 59.41 + fi 59.42 +} 59.43 +function copyFileToTmpDir 59.44 +# $1 from-file path 59.45 +# $2 to-file path 59.46 +# $3 permission 59.47 +{ 59.48 + cp "$1" "$2" 59.49 + checkReturnCode 59.50 + if [ "$3" != "" ] 59.51 + then 59.52 + chmod $3 "$2" 59.53 + checkReturnCode 59.54 + fi 59.55 +} 59.56 + 59.57 +# Setup 59.58 +cd "${TOP}" 59.59 +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 59.60 +rm -rf ${NBTMPDIR} 59.61 +mkdir -p ${NBTMPDIR} 59.62 + 59.63 +# Copy files and create directories and links 59.64 +cd "${TOP}" 59.65 +makeDirectory "${NBTMPDIR}/nbtest1/bin" 59.66 +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 59.67 + 59.68 + 59.69 +# Generate tar file 59.70 +cd "${TOP}" 59.71 +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/nbtest1.tar 59.72 +cd ${NBTMPDIR} 59.73 +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/nbtest1.tar * 59.74 +checkReturnCode 59.75 + 59.76 +# Cleanup 59.77 +cd "${TOP}" 59.78 +rm -rf ${NBTMPDIR}
60.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 60.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/configurations.xml Sat Feb 01 14:26:10 2014 -0800 60.3 @@ -0,0 +1,59 @@ 60.4 +<?xml version="1.0" encoding="UTF-8"?> 60.5 +<configurationDescriptor version="80"> 60.6 + <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> 60.7 + <logicalFolder name="HeaderFiles" 60.8 + displayName="Header Files" 60.9 + projectFiles="true"> 60.10 + </logicalFolder> 60.11 + <logicalFolder name="ResourceFiles" 60.12 + displayName="Resource Files" 60.13 + projectFiles="true"> 60.14 + </logicalFolder> 60.15 + <logicalFolder name="SourceFiles" 60.16 + displayName="Source Files" 60.17 + projectFiles="true"> 60.18 + </logicalFolder> 60.19 + <logicalFolder name="TestFiles" 60.20 + displayName="Test Files" 60.21 + projectFiles="false" 60.22 + kind="TEST_LOGICAL_FOLDER"> 60.23 + </logicalFolder> 60.24 + <logicalFolder name="ExternalFiles" 60.25 + displayName="Important Files" 60.26 + projectFiles="false" 60.27 + kind="IMPORTANT_FILES_FOLDER"> 60.28 + <itemPath>Makefile</itemPath> 60.29 + </logicalFolder> 60.30 + </logicalFolder> 60.31 + <projectmakefile>Makefile</projectmakefile> 60.32 + <confs> 60.33 + <conf name="Debug" type="1"> 60.34 + <toolsSet> 60.35 + <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 60.36 + <compilerSet>default</compilerSet> 60.37 + </toolsSet> 60.38 + <compileType> 60.39 + </compileType> 60.40 + </conf> 60.41 + <conf name="Release" type="1"> 60.42 + <toolsSet> 60.43 + <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode> 60.44 + <compilerSet>default</compilerSet> 60.45 + </toolsSet> 60.46 + <compileType> 60.47 + <cTool> 60.48 + <developmentMode>5</developmentMode> 60.49 + </cTool> 60.50 + <ccTool> 60.51 + <developmentMode>5</developmentMode> 60.52 + </ccTool> 60.53 + <fortranCompilerTool> 60.54 + <developmentMode>5</developmentMode> 60.55 + </fortranCompilerTool> 60.56 + <asmTool> 60.57 + <developmentMode>5</developmentMode> 60.58 + </asmTool> 60.59 + </compileType> 60.60 + </conf> 60.61 + </confs> 60.62 +</configurationDescriptor>
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 61.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/private/Makefile-variables.mk Sat Feb 01 14:26:10 2014 -0800 61.3 @@ -0,0 +1,7 @@ 61.4 +# 61.5 +# Generated - do not edit! 61.6 +# 61.7 +# NOCDDL 61.8 +# 61.9 +# Debug configuration 61.10 +# Release configuration
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 62.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/private/configurations.xml Sat Feb 01 14:26:10 2014 -0800 62.3 @@ -0,0 +1,76 @@ 62.4 +<?xml version="1.0" encoding="UTF-8"?> 62.5 +<configurationDescriptor version="80"> 62.6 + <projectmakefile>Makefile</projectmakefile> 62.7 + <confs> 62.8 + <conf name="Debug" type="1"> 62.9 + <toolsSet> 62.10 + <developmentServer>localhost</developmentServer> 62.11 + <platform>2</platform> 62.12 + </toolsSet> 62.13 + <dbx_gdbdebugger version="1"> 62.14 + <gdb_pathmaps> 62.15 + </gdb_pathmaps> 62.16 + <gdb_interceptlist> 62.17 + <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 62.18 + </gdb_interceptlist> 62.19 + <gdb_options> 62.20 + <DebugOptions> 62.21 + </DebugOptions> 62.22 + </gdb_options> 62.23 + <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 62.24 + </dbx_gdbdebugger> 62.25 + <gizmo_options version="3"> 62.26 + </gizmo_options> 62.27 + <nativedebugger version="1"> 62.28 + <engine>gdb</engine> 62.29 + </nativedebugger> 62.30 + <runprofile version="9"> 62.31 + <runcommandpicklist> 62.32 + <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 62.33 + </runcommandpicklist> 62.34 + <runcommand>"${OUTPUT_PATH}"</runcommand> 62.35 + <rundir></rundir> 62.36 + <buildfirst>true</buildfirst> 62.37 + <terminal-type>0</terminal-type> 62.38 + <remove-instrumentation>0</remove-instrumentation> 62.39 + <environment> 62.40 + </environment> 62.41 + </runprofile> 62.42 + </conf> 62.43 + <conf name="Release" type="1"> 62.44 + <toolsSet> 62.45 + <developmentServer>localhost</developmentServer> 62.46 + <platform>2</platform> 62.47 + </toolsSet> 62.48 + <dbx_gdbdebugger version="1"> 62.49 + <gdb_pathmaps> 62.50 + </gdb_pathmaps> 62.51 + <gdb_interceptlist> 62.52 + <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/> 62.53 + </gdb_interceptlist> 62.54 + <gdb_options> 62.55 + <DebugOptions> 62.56 + </DebugOptions> 62.57 + </gdb_options> 62.58 + <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/> 62.59 + </dbx_gdbdebugger> 62.60 + <gizmo_options version="3"> 62.61 + </gizmo_options> 62.62 + <nativedebugger version="1"> 62.63 + <engine>gdb</engine> 62.64 + </nativedebugger> 62.65 + <runprofile version="9"> 62.66 + <runcommandpicklist> 62.67 + <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem> 62.68 + </runcommandpicklist> 62.69 + <runcommand>"${OUTPUT_PATH}"</runcommand> 62.70 + <rundir></rundir> 62.71 + <buildfirst>true</buildfirst> 62.72 + <terminal-type>0</terminal-type> 62.73 + <remove-instrumentation>0</remove-instrumentation> 62.74 + <environment> 62.75 + </environment> 62.76 + </runprofile> 62.77 + </conf> 62.78 + </confs> 62.79 +</configurationDescriptor>
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 63.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/private/private.xml Sat Feb 01 14:26:10 2014 -0800 63.3 @@ -0,0 +1,7 @@ 63.4 +<?xml version="1.0" encoding="UTF-8"?> 63.5 +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> 63.6 + <data xmlns="http://www.netbeans.org/ns/make-project-private/1"> 63.7 + <activeConfTypeElem>1</activeConfTypeElem> 63.8 + <activeConfIndexElem>0</activeConfIndexElem> 63.9 + </data> 63.10 +</project-private>
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 64.2 +++ b/SpiderMonkey_tests/Test1/nb__Test1/nbproject/project.xml Sat Feb 01 14:26:10 2014 -0800 64.3 @@ -0,0 +1,25 @@ 64.4 +<?xml version="1.0" encoding="UTF-8"?> 64.5 +<project xmlns="http://www.netbeans.org/ns/project/1"> 64.6 + <type>org.netbeans.modules.cnd.makeproject</type> 64.7 + <configuration> 64.8 + <data xmlns="http://www.netbeans.org/ns/make-project/1"> 64.9 + <name>nb__Test1</name> 64.10 + <c-extensions/> 64.11 + <cpp-extensions/> 64.12 + <header-extensions/> 64.13 + <make-dep-projects/> 64.14 + <sourceRootList/> 64.15 + <confList> 64.16 + <confElem> 64.17 + <name>Debug</name> 64.18 + <type>1</type> 64.19 + </confElem> 64.20 + <confElem> 64.21 + <name>Release</name> 64.22 + <type>1</type> 64.23 + </confElem> 64.24 + </confList> 64.25 + <sourceEncoding>UTF-8</sourceEncoding> 64.26 + </data> 64.27 + </configuration> 64.28 +</project>
65.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 65.2 +++ b/SpiderMonkey_tests/helloworld.cpp Sat Feb 01 14:26:10 2014 -0800 65.3 @@ -0,0 +1,91 @@ 65.4 + 65.5 + 65.6 +/* Include the JSAPI header file to get access to SpiderMonkey. */ 65.7 +#include "jsapi.h" 65.8 + 65.9 +/* The class of the global object. */ 65.10 +static JSClass global_class = { 65.11 + "global", JSCLASS_GLOBAL_FLAGS, 65.12 + JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 65.13 + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 65.14 + JSCLASS_NO_OPTIONAL_MEMBERS 65.15 +}; 65.16 + 65.17 +/* The error reporter callback. */ 65.18 +void reportError(JSContext *cx, const char *message, JSErrorReport *report) 65.19 +{ 65.20 + fprintf(stderr, "%s:%u:%s\n", 65.21 + report->filename ? report->filename : "<no filename=\"filename\">", 65.22 + (unsigned int) report->lineno, 65.23 + message); 65.24 +} 65.25 + 65.26 +int main(int argc, const char *argv[]) 65.27 +{ 65.28 + /* JSAPI variables. */ 65.29 + JSRuntime *rt; 65.30 + JSContext *cx; 65.31 + JSObject *global; 65.32 + 65.33 + /* Create a JS runtime. You always need at least one runtime per process. */ 65.34 + rt = JS_NewRuntime(8 * 1024 * 1024); 65.35 + if (rt == NULL) 65.36 + return 1; 65.37 + 65.38 + /* 65.39 + * Create a context. You always need a context per thread. 65.40 + * Note that this program is not multi-threaded. 65.41 + */ 65.42 + cx = JS_NewContext(rt, 8192); 65.43 + if (cx == NULL) 65.44 + return 1; 65.45 + JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 65.46 + JS_SetVersion(cx, JSVERSION_LATEST); 65.47 + JS_SetErrorReporter(cx, reportError); 65.48 + 65.49 + /* 65.50 + * Create the global object in a new compartment. 65.51 + * You always need a global object per context. 65.52 + */ 65.53 + global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 65.54 + if (global == NULL) 65.55 + return 1; 65.56 + 65.57 + /* 65.58 + * Populate the global object with the standard JavaScript 65.59 + * function and object classes, such as Object, Array, Date. 65.60 + */ 65.61 + if (!JS_InitStandardClasses(cx, global)) 65.62 + return 1; 65.63 + 65.64 + /* Your application code here. This may include JSAPI calls 65.65 + * to create your own custom JavaScript objects and to run scripts. 65.66 + * 65.67 + * The following example code creates a literal JavaScript script, 65.68 + * evaluates it, and prints the result to stdout. 65.69 + * 65.70 + * Errors are conventionally saved in a JSBool variable named ok. 65.71 + */ 65.72 + const char *script = "'Hello ' + 'World!'"; 65.73 + jsval rval; 65.74 + JSString *str; 65.75 + JSBool ok; 65.76 + const char *filename = "noname"; 65.77 + uintN lineno = 0; 65.78 + 65.79 + ok = JS_EvaluateScript(cx, global, script, strlen(script), 65.80 + filename, lineno, &rval); 65.81 + if ( rval == JS_FALSE)//rval == JS_NULL | 65.82 + return 1; 65.83 + 65.84 + str = JS_ValueToString(cx, rval); 65.85 + printf("%s\n", JS_EncodeString(cx, str)); 65.86 + 65.87 + /* End of your application code */ 65.88 + 65.89 + /* Clean things up and shut down SpiderMonkey. */ 65.90 + JS_DestroyContext(cx); 65.91 + JS_DestroyRuntime(rt); 65.92 + JS_ShutDown(); 65.93 + return 0; 65.94 +}
66.1 --- a/V8/Hello_World.cpp Sat Feb 01 08:51:00 2014 -0800 66.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 66.3 @@ -1,31 +0,0 @@ 66.4 -#include <v8.h> 66.5 - 66.6 -using namespace v8; 66.7 - 66.8 -int main(int argc, char* argv[]) { 66.9 - // Get the default Isolate created at startup. 66.10 - Isolate* isolate = Isolate::GetCurrent(); 66.11 - 66.12 - // Create a stack-allocated handle scope. 66.13 - HandleScope handle_scope(isolate); 66.14 - 66.15 - // Create a new context. 66.16 - Handle<Context> context = Context::New(isolate); 66.17 - 66.18 - // Enter the context for compiling and running the hello world script. 66.19 - Context::Scope context_scope(context); 66.20 - 66.21 - // Create a string containing the JavaScript source code. 66.22 - Handle<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); 66.23 - 66.24 - // Compile the source code. 66.25 - Handle<Script> script = Script::Compile(source); 66.26 - 66.27 - // Run the script to get the result. 66.28 - Handle<Value> result = script->Run(); 66.29 - 66.30 - // Convert the result to an UTF8 string and print it. 66.31 - String::Utf8Value utf8(result); 66.32 - printf("%s\n", *utf8); 66.33 - return 0; 66.34 -}
67.1 --- a/V8/Two_threads.cpp Sat Feb 01 08:51:00 2014 -0800 67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 67.3 @@ -1,63 +0,0 @@ 67.4 -#include <v8.h> 67.5 -#include <pthread.h> 67.6 -using namespace v8; 67.7 -Isolate* isolate; 67.8 -void* threadFunction(void*){ 67.9 -//Isolate* isolate1 = Isolate::New(); 67.10 -//{ 67.11 - if(isolate == NULL){ 67.12 - printf("Error1"); 67.13 - return 0; 67.14 -} 67.15 -Locker locker1(isolate); 67.16 -//isolate->Enter(); 67.17 -Isolate::Scope isolate_scope1(isolate); 67.18 -HandleScope handle_scope1(isolate); 67.19 -Handle<Context> context1 = Context::New(isolate); 67.20 - Context::Scope context_scope1(context1); 67.21 - Handle<String> source1 = String::NewFromUtf8(isolate, "'Hi' + ', Sara'"); 67.22 - Handle<Script> script1 = Script::Compile(source1); 67.23 - Handle<Value> result1 = script1->Run(); 67.24 - String::Utf8Value utf81(result1); 67.25 - printf("%s\n", *utf81); 67.26 -//isolate->Exit(); 67.27 -Unlocker unlocker1(isolate); 67.28 - 67.29 - return 0; 67.30 - 67.31 -} 67.32 -int main(int argc, char* argv[]) { 67.33 - 67.34 - // Get the default Isolate created at startup. 67.35 - isolate = Isolate::New(); 67.36 -{ 67.37 - if(isolate == NULL){ 67.38 - printf("Error"); 67.39 - return 0; 67.40 -} 67.41 -Locker locker(isolate); 67.42 -Isolate::Scope isolate_scope(isolate); 67.43 - // Create a stack-allocated handle scope. 67.44 - HandleScope handle_scope(isolate); 67.45 - // Create a new context. 67.46 - Handle<Context> context = Context::New(isolate); 67.47 - // Enter the context for compiling and running the hello world script. 67.48 - Context::Scope context_scope(context); 67.49 - // Create a string containing the JavaScript source code. 67.50 - //isolate->Exit(); 67.51 - Unlocker unlocker(isolate); 67.52 - pthread_t thread_id; 67.53 - pthread_create(&thread_id, NULL, &threadFunction,NULL); 67.54 -//isolate->Enter(); 67.55 - Handle<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); 67.56 - // Compile the source code. 67.57 - Handle<Script> script = Script::Compile(source); 67.58 - // Run the script to get the result. 67.59 - Handle<Value> result = script->Run(); 67.60 - // Convert the result to an UTF8 string and print it. 67.61 - String::Utf8Value utf8(result); 67.62 - printf("%s\n", *utf8); 67.63 - return 0; 67.64 -} 67.65 -//isolate->Dispose(); 67.66 -}
68.1 Binary file V8_docs/V8 Doc Summary for Embedder.pdf has changed
69.1 Binary file V8_docs/V8_Engine.pdf has changed
70.1 Binary file V8_docs/V8_Engine_brief_summary_for_C++_embedder.pdf has changed
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 71.2 +++ b/V8_tests/Hello_World.cpp Sat Feb 01 14:26:10 2014 -0800 71.3 @@ -0,0 +1,31 @@ 71.4 +#include <v8.h> 71.5 + 71.6 +using namespace v8; 71.7 + 71.8 +int main(int argc, char* argv[]) { 71.9 + // Get the default Isolate created at startup. 71.10 + Isolate* isolate = Isolate::GetCurrent(); 71.11 + 71.12 + // Create a stack-allocated handle scope. 71.13 + HandleScope handle_scope(isolate); 71.14 + 71.15 + // Create a new context. 71.16 + Handle<Context> context = Context::New(isolate); 71.17 + 71.18 + // Enter the context for compiling and running the hello world script. 71.19 + Context::Scope context_scope(context); 71.20 + 71.21 + // Create a string containing the JavaScript source code. 71.22 + Handle<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); 71.23 + 71.24 + // Compile the source code. 71.25 + Handle<Script> script = Script::Compile(source); 71.26 + 71.27 + // Run the script to get the result. 71.28 + Handle<Value> result = script->Run(); 71.29 + 71.30 + // Convert the result to an UTF8 string and print it. 71.31 + String::Utf8Value utf8(result); 71.32 + printf("%s\n", *utf8); 71.33 + return 0; 71.34 +}
72.1 Binary file V8_tests/Task_ 1-2-2014.pdf has changed
73.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 73.2 +++ b/V8_tests/Two_threads.cpp Sat Feb 01 14:26:10 2014 -0800 73.3 @@ -0,0 +1,68 @@ 73.4 +#include <v8.h> 73.5 +#include <pthread.h> 73.6 +using namespace v8; 73.7 +Isolate* isolate; 73.8 +void* threadFunction(void*) 73.9 + { 73.10 + //Isolate* isolate1 = Isolate::New(); 73.11 + //{ 73.12 + if(isolate == NULL) 73.13 + { 73.14 + printf("Error1"); 73.15 + return 0; 73.16 + } 73.17 + 73.18 + Locker locker1(isolate); 73.19 + //isolate->Enter(); 73.20 + Isolate::Scope isolate_scope1(isolate); 73.21 + HandleScope handle_scope1(isolate); 73.22 + Handle<Context> context1 = Context::New(isolate); 73.23 + Context::Scope context_scope1(context1); 73.24 + Handle<String> source1 = String::NewFromUtf8(isolate, "'Hi' + ', Sara'"); 73.25 + Handle<Script> script1 = Script::Compile(source1); 73.26 + Handle<Value> result1 = script1->Run(); 73.27 + String::Utf8Value utf81(result1); 73.28 + printf("%s\n", *utf81); 73.29 + //isolate->Exit(); 73.30 + Unlocker unlocker1(isolate); 73.31 + 73.32 + return 0; 73.33 + } 73.34 + 73.35 +int main(int argc, char* argv[]) 73.36 + { 73.37 + // Get the default Isolate created at startup. 73.38 + isolate = Isolate::New(); 73.39 + if(isolate == NULL) 73.40 + { 73.41 + printf("Error"); 73.42 + return 0; 73.43 + } 73.44 + //Sara: the "locker" looks like it's purpose is to make sure only a single 73.45 + // thread is modifying the isolate.. this goes against the purpose, which 73.46 + // is for multiple scripts to be running at the same time.. 73.47 + Locker locker(isolate); 73.48 + Isolate::Scope isolate_scope(isolate); 73.49 + // Create a stack-allocated handle scope. 73.50 + HandleScope handle_scope(isolate); 73.51 + // Create a new context. 73.52 + Handle<Context> context = Context::New(isolate); 73.53 + // Enter the context for compiling and running the hello world script. 73.54 + Context::Scope context_scope(context); 73.55 + // Create a string containing the JavaScript source code. 73.56 + //isolate->Exit(); 73.57 + Unlocker unlocker(isolate); 73.58 + pthread_t thread_id; 73.59 + pthread_create(&thread_id, NULL, &threadFunction,NULL); 73.60 + //isolate->Enter(); 73.61 + Handle<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); 73.62 + // Compile the source code. 73.63 + Handle<Script> script = Script::Compile(source); 73.64 + // Run the script to get the result. 73.65 + Handle<Value> result = script->Run(); 73.66 + // Convert the result to an UTF8 string and print it. 73.67 + String::Utf8Value utf8(result); 73.68 + printf("%s\n", *utf8); 73.69 + return 0; 73.70 + //isolate->Dispose(); 73.71 + }
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 74.2 +++ b/V8_tests/Two_threads_two_context_test.cpp Sat Feb 01 14:26:10 2014 -0800 74.3 @@ -0,0 +1,78 @@ 74.4 +#include <v8.h> 74.5 + 74.6 +using namespace v8; 74.7 + 74.8 +int main(int argc, char* argv[]) 74.9 + { 74.10 + // Get the default Isolate created at startup. 74.11 + Isolate* isolate = Isolate::GetCurrent(); 74.12 + 74.13 + // Create a stack-allocated handle scope. 74.14 + HandleScope handle_scope(isolate); 74.15 + 74.16 + // Create a new context. 74.17 + Handle<Context> context1 = Context::New(isolate); 74.18 + 74.19 + // Enter the context for compiling and running the hello world script. 74.20 + Context::Scope context_scope(context1); 74.21 + 74.22 + // Create a string containing the JavaScript source code. 74.23 + Handle<String> source1 = String::NewFromUtf8(isolate, "'Hello' + ', World!'"); 74.24 + 74.25 + // Compile the source code. 74.26 + Handle<Script> script1 = Script::Compile(source1); 74.27 + 74.28 + // Run the script to get the result. 74.29 + Handle<Value> result1 = script1->Run(); 74.30 + 74.31 + // Convert the result to an UTF8 string and print it. 74.32 + String::Utf8Value utf8(result1); 74.33 + printf("%s\n", *utf8); 74.34 + 74.35 + 74.36 + 74.37 + // Create a new context. 74.38 + Handle<Context> context2 = Context::New(isolate); 74.39 + 74.40 + // Enter the context for compiling and running the hello world script. 74.41 + Context::Scope context_scope(context2); 74.42 + 74.43 + // Create a string containing the JavaScript source code. 74.44 + Handle<String> source2 = String::NewFromUtf8(isolate, "'Hi' + ', Sara!'"); 74.45 + 74.46 + // Compile the source code. 74.47 + Handle<Script> script2 = Script::Compile(source1); 74.48 + 74.49 + // Run the script to get the result. 74.50 + Handle<Value> result2 = script2->Run(); 74.51 + 74.52 + // Convert the result to an UTF8 string and print it. 74.53 + String::Utf8Value utf8(result2); 74.54 + printf("%s\n", *utf8); 74.55 + 74.56 + //At this point, we know both compiled sources work, for sure, so the 74.57 + // only error is due to threading issues.. 74.58 + 74.59 + //Sara: here's comments for the rest, the way you said at the bottom 74.60 + // of the pdf -- this is the 2nd test. If it works, then copy to a new 74.61 + // file and modify that to make the first test and try that.. 74.62 + 74.63 + //create two child threads 74.64 + pthread_t thread_id1, thread_id2; 74.65 + define a struct that holds the compiled script and the context 74.66 + TestStruct testStruct1 = malloc( sizeof(testStruct) ); 74.67 + testStruct1->context = context1; 74.68 + testStruct1->script = script1; 74.69 + create and fill testStruct2 74.70 + pthread_create(&thread_id1, NULL, &threadFunction, testStruct1 ); 74.71 + pthread_create(&thread_id1, NULL, &threadFunction, testStruct2 ); 74.72 + 74.73 + return 0; 74.74 + } 74.75 + 74.76 +//Sara: just writing this in a hurry, to show the shape -- I'm sure it's full 74.77 +// of mistakes, not sure what the signature is for a pthread birth function.. 74.78 +// and so on.. 74.79 +void threadFunction() 74.80 + { sets the context then runs the script 74.81 + } 74.82 \ No newline at end of file
75.1 --- a/helloworld.cpp Sat Feb 01 08:51:00 2014 -0800 75.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 75.3 @@ -1,91 +0,0 @@ 75.4 - 75.5 - 75.6 -/* Include the JSAPI header file to get access to SpiderMonkey. */ 75.7 -#include "jsapi.h" 75.8 - 75.9 -/* The class of the global object. */ 75.10 -static JSClass global_class = { 75.11 - "global", JSCLASS_GLOBAL_FLAGS, 75.12 - JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub, 75.13 - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, 75.14 - JSCLASS_NO_OPTIONAL_MEMBERS 75.15 -}; 75.16 - 75.17 -/* The error reporter callback. */ 75.18 -void reportError(JSContext *cx, const char *message, JSErrorReport *report) 75.19 -{ 75.20 - fprintf(stderr, "%s:%u:%s\n", 75.21 - report->filename ? report->filename : "<no filename=\"filename\">", 75.22 - (unsigned int) report->lineno, 75.23 - message); 75.24 -} 75.25 - 75.26 -int main(int argc, const char *argv[]) 75.27 -{ 75.28 - /* JSAPI variables. */ 75.29 - JSRuntime *rt; 75.30 - JSContext *cx; 75.31 - JSObject *global; 75.32 - 75.33 - /* Create a JS runtime. You always need at least one runtime per process. */ 75.34 - rt = JS_NewRuntime(8 * 1024 * 1024); 75.35 - if (rt == NULL) 75.36 - return 1; 75.37 - 75.38 - /* 75.39 - * Create a context. You always need a context per thread. 75.40 - * Note that this program is not multi-threaded. 75.41 - */ 75.42 - cx = JS_NewContext(rt, 8192); 75.43 - if (cx == NULL) 75.44 - return 1; 75.45 - JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT); 75.46 - JS_SetVersion(cx, JSVERSION_LATEST); 75.47 - JS_SetErrorReporter(cx, reportError); 75.48 - 75.49 - /* 75.50 - * Create the global object in a new compartment. 75.51 - * You always need a global object per context. 75.52 - */ 75.53 - global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); 75.54 - if (global == NULL) 75.55 - return 1; 75.56 - 75.57 - /* 75.58 - * Populate the global object with the standard JavaScript 75.59 - * function and object classes, such as Object, Array, Date. 75.60 - */ 75.61 - if (!JS_InitStandardClasses(cx, global)) 75.62 - return 1; 75.63 - 75.64 - /* Your application code here. This may include JSAPI calls 75.65 - * to create your own custom JavaScript objects and to run scripts. 75.66 - * 75.67 - * The following example code creates a literal JavaScript script, 75.68 - * evaluates it, and prints the result to stdout. 75.69 - * 75.70 - * Errors are conventionally saved in a JSBool variable named ok. 75.71 - */ 75.72 - const char *script = "'Hello ' + 'World!'"; 75.73 - jsval rval; 75.74 - JSString *str; 75.75 - JSBool ok; 75.76 - const char *filename = "noname"; 75.77 - uintN lineno = 0; 75.78 - 75.79 - ok = JS_EvaluateScript(cx, global, script, strlen(script), 75.80 - filename, lineno, &rval); 75.81 - if ( rval == JS_FALSE)//rval == JS_NULL | 75.82 - return 1; 75.83 - 75.84 - str = JS_ValueToString(cx, rval); 75.85 - printf("%s\n", JS_EncodeString(cx, str)); 75.86 - 75.87 - /* End of your application code */ 75.88 - 75.89 - /* Clean things up and shut down SpiderMonkey. */ 75.90 - JS_DestroyContext(cx); 75.91 - JS_DestroyRuntime(rt); 75.92 - JS_ShutDown(); 75.93 - return 0; 75.94 -}
