forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenbaseline.cmd
More file actions
52 lines (46 loc) · 1.33 KB
/
genbaseline.cmd
File metadata and controls
52 lines (46 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
::-------------------------------------------------------------------------------------------------------
:: Copyright (C) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
::-------------------------------------------------------------------------------------------------------
@echo off
setlocal
IF "%1" == "" (
set _BIN=%_NTTREE%\jscript\jc.exe
) ELSE (
set _BIN=%1
)
for /F "usebackq" %%i in (`dir/b *.js`) DO (
call :Gen %%i
)
del /Q __temp.out
exit /B 0
:Gen
IF /I "%1" == "propname.js" (
set _VERSION=1
) ELSE IF /I "%1" == "multi_funcname.js" (
set _VERSION=1
) ELSE (
set _VERSION=5
)
IF EXIST "%~n1.baseline" (
call :Gen1 %1 %~n1.baseline
)
IF EXIST "%~n1.deferparse.baseline" (
call :Gen1 %1 %~n1.deferparse.baseline -forcedeferparse
)
IF EXIST "%~n1.baseline.v2" (
set _VERSION=2
call :Gen1 %1 %~n1.baseline.v2
)
IF EXIST "%~n1.deferparse.baseline.v2" (
set _VERSION=2
call :Gen1 %1 %~n1.deferparse.baseline.v2 -forcedeferparse
)
exit /B 0
:Gen1
%_BIN% %1 -on:stackfunc -testtrace:stackfunc -bvt -version:%_VERSION% %3 -maxinterpretcount:1 -bgjit- > __temp.out
fc %2 __temp.out > nul
IF NOT "%ERRORLEVEL%" == "0" (
sd edit %2
copy __temp.out %2
)