리비전 비교

Introduction to the JavaScript shell

리비전 195931:

리비전 195931 Heyjin

리비전 195932:

리비전 195932 Heyjin

제목:
Introduction to the JavaScript shell
Introduction to the JavaScript shell
슬러그:
Introduction_to_the_JavaScript_shell
Introduction_to_the_JavaScript_shell
태그:
JavaScript, SpiderMonkey
JavaScript, SpiderMonkey
내용:

Revision 195931
Revision 195932
n7    <h2 name=".EB.93.A4.EC.96.B4.EA.B0.80.EB.A9.B0">n7    <h2 id=".EB.93.A4.EC.96.B4.EA.B0.80.EB.A9.B0" name=".EB.93.A4
 >.EC.96.B4.EA.B0.80.EB.A9.B0">
n16    <h2 name=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8An16    <h2 id=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B
>.B8_.EC.85.B8_.EC.84.A4.EC.B9.98.ED.95.98.EA.B8.B0">>8_.EC.85.B8_.EC.84.A4.EC.B9.98.ED.95.98.EA.B8.B0" name=".EC.9E.90
 >.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B8_.EC.85.B8_.EC.84.A4
 >.EC.B9.98.ED.95.98.EA.B8.B0">
n19    <h3 name="CVS_.EC.84.9C.EB.B2.84.EC.97.90_.EC.A0.91.EC.86.8D.n19    <h3 id="CVS_.EC.84.9C.EB.B2.84.EC.97.90_.EC.A0.91.EC.86.8D.ED
>ED.95.A9.EC.8B.9C.EB.8B.A4">>.95.A9.EC.8B.9C.EB.8B.A4" name="CVS_.EC.84.9C.EB.B2.84.EC.97.90_.
 >EC.A0.91.EC.86.8D.ED.95.A9.EC.8B.9C.EB.8B.A4">
n26cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot loginn26cvs -d <a class=" link-mailto" href="mailto::pserver:anonymous@cv
 >s-mirror.mozilla.org" rel="freelink">:pserver:anonymous@cvs-mirro
 >r.mozilla.org</a>:/cvsroot login
n31    <h3 name=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8An31    <h3 id=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B
>.B8_.EC.85.B8_.ED.8A.B8.EB.A0.81.ED.81.AC_.EB.B2.84.EC.A0.84_.EC.>8_.EC.85.B8_.ED.8A.B8.EB.A0.81.ED.81.AC_.EB.B2.84.EC.A0.84_.EC.84
>84.A4.EC.B9.98.ED.95.98.EA.B8.B0">>.A4.EC.B9.98.ED.95.98.EA.B8.B0" name=".EC.9E.90.EB.B0.94.EC.8A.A4
 >.ED.81.AC.EB.A6.BD.ED.8A.B8_.EC.85.B8_.ED.8A.B8.EB.A0.81.ED.81.AC
 >_.EB.B2.84.EC.A0.84_.EC.84.A4.EC.B9.98.ED.95.98.EA.B8.B0">
n53    <h3 name=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8An53    <h3 id=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B
>.B8_.EC.85.B8_.EB.B8.8C.EB.9E.9C.EC.B9.98_.EB.B2.84.EC.A0.84_.EC.>8_.EC.85.B8_.EB.B8.8C.EB.9E.9C.EC.B9.98_.EB.B2.84.EC.A0.84_.EC.84
>84.A4.EC.B9.98.ED.95.98.EA.B8.B0">>.A4.EC.B9.98.ED.95.98.EA.B8.B0" name=".EC.9E.90.EB.B0.94.EC.8A.A4
 >.ED.81.AC.EB.A6.BD.ED.8A.B8_.EC.85.B8_.EB.B8.8C.EB.9E.9C.EC.B9.98
 >_.EB.B2.84.EC.A0.84_.EC.84.A4.EC.B9.98.ED.95.98.EA.B8.B0">
n63cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -l -n63cvs -d <a class=" link-mailto" href="mailto::pserver:anonymous@cv
>r <i>branch_name</i> mozilla/js/src mozilla/js/src/config mozilla>s-mirror.mozilla.org" rel="freelink">:pserver:anonymous@cvs-mirro
>/js/src/editline mozilla/js/src/fdlibm>r.mozilla.org</a>:/cvsroot co -l -r <i>branch_name</i> mozilla/js
 >/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src
 >/fdlibm
n71    <h2 name=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8An71    <h2 id=".EC.9E.90.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B
>.B8_.EC.85.B8_.EC.82.AC.EC.9A.A9.ED.95.98.EA.B8.B0">>8_.EC.85.B8_.EC.82.AC.EC.9A.A9.ED.95.98.EA.B8.B0" name=".EC.9E.90
 >.EB.B0.94.EC.8A.A4.ED.81.AC.EB.A6.BD.ED.8A.B8_.EC.85.B8_.EC.82.AC
 >.EC.9A.A9.ED.95.98.EA.B8.B0">
n80    <h3 name=".EB.AA.85.EB.A0.B9.ED.96.89_.EC.98.B5.EC.85.98">n80    <h3 id=".EB.AA.85.EB.A0.B9.ED.96.89_.EC.98.B5.EC.85.98" name=
 >".EB.AA.85.EB.A0.B9.ED.96.89_.EC.98.B5.EC.85.98">
n181    <h3 name=".EC.85.B8_.EC.8B.A4.ED.96.89.ED.95.98.EA.B8.B0">n181    <h3 id=".EC.85.B8_.EC.8B.A4.ED.96.89.ED.95.98.EA.B8.B0" name=
 >".EC.85.B8_.EC.8B.A4.ED.96.89.ED.95.98.EA.B8.B0">
n202    <h4 name=".EC.9D.B8.ED.84.B0.EB.9E.99.ED.8B.B0.EB.B8.8C_.EB.An202    <h4 id=".EC.9D.B8.ED.84.B0.EB.9E.99.ED.8B.B0.EB.B8.8C_.EB.AA.
>A.A8.EB.93.9C.EC.97.90.EC.84.9C_.EC.85.B8_.EC.82.AC.EC.9A.A9.ED.9>A8.EB.93.9C.EC.97.90.EC.84.9C_.EC.85.B8_.EC.82.AC.EC.9A.A9.ED.95.
>5.98.EA.B8.B0">>98.EA.B8.B0" name=".EC.9D.B8.ED.84.B0.EB.9E.99.ED.8B.B0.EB.B8.8C_
 >.EB.AA.A8.EB.93.9C.EC.97.90.EC.84.9C_.EC.85.B8_.EC.82.AC.EC.9A.A9
 >.ED.95.98.EA.B8.B0">
n208    <h3 name=".EB.B9.8C.ED.8A.B8-.EC.9D.B8_.ED.95.A8.EC.88.98">n208    <h3 id=".EB.B9.8C.ED.8A.B8-.EC.9D.B8_.ED.95.A8.EC.88.98" name
 >=".EB.B9.8C.ED.8A.B8-.EC.9D.B8_.ED.95.A8.EC.88.98">
n214    <h4 name="build.28.29">n214    <h4 id="build.28.29" name="build.28.29">
n220    <h4 name="clear.28.5Bobject.5D.29">n220    <h4 id="clear.28.5Bobject.5D.29" name="clear.28.5Bobject.5D.2
 >9">
n229    <h4 name="clone.28function.2C_.5Bscope.5D.29">n229    <h4 id="clone.28function.2C_.5Bscope.5D.29" name="clone.28fun
 >ction.2C_.5Bscope.5D.29">
n235    <h4 name="dis.28.5Bfunction.5D.29">n235    <h4 id="dis.28.5Bfunction.5D.29" name="dis.28.5Bfunction.5D.2
 >9">
n274    <h4 name="dissrc.28.5Bfunction.5D.29">n274    <h4 id="dissrc.28.5Bfunction.5D.29" name="dissrc.28.5Bfunctio
 >n.5D.29">
n278      Disassembles the JavaScript bytecode for the entire programn278      다른 프로그램에 사용하거나 특별한 함수로 만들기 위해 자바스크립트를 바이트코드로 만들고 소스를 보여주는 함
>, or for the specified <i>function</i>, showing the source lines.>수입니다. 이 함수는 파일에서 로딩된 함수에만 적용할 수 있으며, 셸에서 명령을 입력할 때에도 <code>-f</co
> This function only works with programs loaded from files, either>de> 옵션을 주거나 <code>load()</code> 함수를 사용해야 합니다.
> using the <code>-f</code> flag on launching the shell, or by usi 
>ng the <code>load()</code> function. 
279    </p>
280    <p>279    </p>
281      If your program includes a function, <code>doStuff()</code>280    <p>
>, like this: 
281      당신의 프로그램에 <code>doStuff()</code> 함수가 포함되어 있다고 가정합시다.
n294      Calling <code>dissrc(doStuff)</code> function would give thn294      그러면 <code>dissrc(doStuff)</code> 함수를 실행한 결과를 보겠습니다.:
>is output: 
n338    <h4 name="evalcx.28string.5B.2C_object.5D.29">n338    <h4 id="evalcx.28string.5B.2C_object.5D.29" name="evalcx.28st
 >ring.5B.2C_object.5D.29">
n353    <h4 name="gc.28.29">n353    <h4 id="gc.28.29" name="gc.28.29">
n359    <h4 name="getpda.28object.29">n359    <h4 id="getpda.28object.29" name="getpda.28object.29">
n365    <h4 name="getslx.28object.29">n365    <h4 id="getslx.28object.29" name="getslx.28object.29">
n371    <h4 name="help.28.5Bcommand_....5D.29">n371    <h4 id="help.28.5Bcommand_....5D.29" name="help.28.5Bcommand_
 >....5D.29">
n377    <h4 name="intern.28string.29">n377    <h4 id="intern.28string.29" name="intern.28string.29">
n386    <h4 name="line2pc.28.5Bfunction.2C_.5D_line.29">n386    <h4 id="line2pc.28.5Bfunction.2C_.5D_line.29" name="line2pc.2
 >8.5Bfunction.2C_.5D_line.29">
n392    <h4 name="load.28filename1_.5Bfilename.5D.29">n392    <h4 id="load.28filename1_.5Bfilename.5D.29" name="load.28file
 >name1_.5Bfilename.5D.29">
n398    <h4 name="notes.28.5Bfunction.5D.29">n398    <h4 id="notes.28.5Bfunction.5D.29" name="notes.28.5Bfunction.
 >5D.29">
n404    <h4 name="options.28.5Boption_....5D.29">n404    <h4 id="options.28.5Boption_....5D.29" name="options.28.5Bopt
 >ion_....5D.29">
n434            Strict mode is enabled.n434            Strict 모드를 활성화합니다.
n442            Warnings should be treated as errors.n442            경고를 에러로 속여 출력합니다.
n458            XML mode is enabled.n458            XML 모드를 활성화합니다.
n463    <h4 name="pc2line.28function.2C_.5Bpc.5D.29">n463    <h4 id="pc2line.28function.2C_.5Bpc.5D.29" name="pc2line.28fu
 >nction.2C_.5Bpc.5D.29">
n469    <h4 name="print.28.5Bexpression_....5D.29">n469    <h4 id="print.28.5Bexpression_....5D.29" name="print.28.5Bexp
 >ression_....5D.29">
n473      Evaluates the <i>expression</i> and displays the result on n473      문자열이면 문자열, 식이면 식으로 <i>expression</i>의 값을 구하여 그 결과를 <tt>stdo
><tt>stdout</tt>.>ut</tt> 으로 출력합니다.
n475    <h4 name="quit.28.29">n475    <h4 id="quit.28.29" name="quit.28.29">
n479      Exits the shell.n479      셸에서 빠져나옵니다.
n481    <h4 name="readline.28.29">n481    <h4 id="readline.28.29" name="readline.28.29">
n485      Reads a single line of input from <tt>stdin</tt>, returningn485      표준 입력으로 읽어들여 호출자에게 되돌려줍니다. 이 함수를 사용하여 자바스크립트에서 인터랙티브 셸 프로그램
> it to the caller. You can use this to create interactive shell p>을 만들 수 있습니다.
>rograms in JavaScript. 
n487    <h4 name="seal.28object.5B.2C_deep.5D.29">n487    <h4 id="seal.28object.5B.2C_deep.5D.29" name="seal.28object.5
 >B.2C_deep.5D.29">
n493    <h4 name="stats.28.5Bstring_....5D.29">n493    <h4 id="stats.28.5Bstring_....5D.29" name="stats.28.5Bstring_
 >....5D.29">
n544    <h4 name="stringsAreUtf8.28.29">n544    <h4 id="stringsAreUtf8.28.29" name="stringsAreUtf8.28.29">
n548      Returns <code>true</code> if strings are encoded in UTF8 fon548      문자열이 UTF8 형식으로 인코드 되어있을 경우 <code>true</code>를, 그 외의 경우 <cod
>rmat; otherwise, returns <code>false</code>.>e>false</code>를 반환합니다.
n550    <h4 name="testUtf8.28mode.29">n550    <h4 id="testUtf8.28mode.29" name="testUtf8.28mode.29">
n554      Performs UTF-8 tests. The mode parameter may be an integer n554      UTF-8이 제대로 동작하는지 1에서 4까지의 정수 변수를 입력하여 테스트합니다. 이것은 UTF-8 문자열
>from 1 to 4.>이 제대로 처리되는지 확인하는 간단한 디버깅 명령으로, 일반적으로는 이 명령을 사용하여 따로 확인하기보다는 자바스크립
 >트 엔진에서 직접 작업하며 확인하는 것이 빠릅니다.
555    </p>
556    <p>555    </p>
557      This is a debugging command that simply runs some checks on556    <h4 id="throwError.28.29" name="throwError.28.29">
> UTF8 string handling, and isn't of general use, unless you're wo 
>rking on the JavaScript engine itself. 
558    </p>
559    <h4 name="throwError.28.29">
n563      Throws an error from the <code>JS_ReportError()</code> funcn560      <code>JS_ReportError()</code> 함수에서 에러를 받아 지정된 방식으로 처리합니다.
>tion. 
n566      <b>Note:</b> This function is intended only for use when ten563      <b>Note:</b> 이 함수는 자바스크립트 엔진을 시험하는 목적으로만 사용하세요.
>sting the JavaScript engine. 
n568    <h4 name="tracing.28.5Btoggle.5D.29">n565    <h4 id="tracing.28.5Btoggle.5D.29" name="tracing.28.5Btoggle.
 >5D.29">
n572      Enables or disables tracing mode. Pass <code>true</code> ton569      <code>true</code> 혹은 <code>false</code>로 지정하여 트레이스 모드를 켜거나 
> enable tracing or <code>false</code> to turn it off. If you don'>끌 때 사용합니다. 따로 설정한 것이 없다면 <code>tracing()</code> 함수는 일반적인 설정사항을 반환
>t specify a parameter, <code>tracing()</code> returns the current>할 것입니다.
> setting. 
n575      <b>Tip:</b> This only works if you build JavaScript with <cn572      <b>Tip:</b> 이 함수는 자바스크립트를 <code>JS_THREADED_INTERP</code>로 
>ode>JS_THREADED_INTERP</code> turned off in the file <tt>jsinterp>빌드했을 때만 사용할 수 있습니다. 이 옵션은 <tt>jsinterp.c</tt>에서 지정할 수 있습니다.
>.c</tt>. 
n577    <h4 name="trap.28.5Bfunction.2C_.5Bpc.2C.5D.5D_expression.29"n574    <h4 id="trap.28.5Bfunction.2C_.5Bpc.2C.5D.5D_expression.29" n
>>>ame="trap.28.5Bfunction.2C_.5Bpc.2C.5D.5D_expression.29">
n581      Sets a trap at the specific point in the JavaScript code. Wn578      자바스크립트 코드의 지정된 위치에 트랩을 설정합니다. 해당 <i>function</i>의 <i>pc</i>
>hen the bytecode at the offset specified by <i>pc</i> in the func> 오프셋에 <i>expression</i>에 해당하는 바이트 코드를 집어넣을 수 있습니다.
>tion <i>function</i> is about to be executed, the <i>expression</ 
>i> is evaluated. 
582    </p>
583    <p>579    </p>
584      This is a powerful debugging mechanism when used in concert580    <p>
> with <code>line2pc()</code>. For example, if you want to display 
> a message when line 6 of a function, <code>doSomething()</code>  
>is executed, you can enter the following: 
581      <code>line2pc()</code>와 함께 사용하면 강력한 디버깅 방법이 됩니다 예를 들어 원래는 <
 >code>doSomething()</code>을 사용하는 함수의 6번째 줄을 실행할 때 메시지를 출력하고 싶다면 다음
 >과 같이 사용할 수 있습니다.
n590      <b>Note:</b> When a trap is set, the corresponding bytecoden587      <b>Note:</b> 트랩이 설정된 동안 프로그램 내의 해당 바이트 코드는 <code>untrap()</
> in the program is replaced with a <code>trap</code> bytecode unt>code>을 사용하여 트랩을 해제할 때 까지 <code>trap</code> 바이트 코드로 대체됩니다.
>il you use <code>untrap()</code> to remove the trap. 
n592    <h4 name="untrap.28function_.5B.2C_pc.5D.29">n589    <h4 id="untrap.28function_.5B.2C_pc.5D.29" name="untrap.28fun
 >ction_.5B.2C_pc.5D.29">
t598    <h4 name="version.28.5Bnumber.5D.29">t595    <h4 id="version.28.5Bnumber.5D.29" name="version.28.5Bnumber.
 >5D.29">

이력으로 돌아가기