Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 9681de2

Browse files
committed
do not require full lib-ruby-parser.hpp to run benchmarks
1 parent 9db89ed commit 9681de2

File tree

6 files changed

+28
-16
lines changed

6 files changed

+28
-16
lines changed

.depend

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,27 @@ tests/runner: tests/runner.cpp tests/test_helper.hpp \
5959
utils.hpp tests/comment_test.cpp comment.hpp \
6060
loc.hpp decoded_input.hpp string.hpp \
6161
source_line.hpp tests/decoded_input_test.cpp \
62-
tests/decoder_test.cpp decoder.hpp tests/diagnostic_test.cpp \
63-
diagnostic.hpp messages.hpp tests/loc_test.cpp \
64-
tests/magic_comment_test.cpp magic_comment.hpp \
65-
tests/messages_test.cpp tests/nodes_test.cpp nodes.hpp \
66-
tests/parser_options_test.cpp parser_options.hpp \
67-
token_rewriter.hpp token.hpp token_ids.hpp \
68-
shared_byte_list.hpp tests/parser_result_test.cpp \
69-
parser_result.hpp tests/shared_byte_list_test.cpp \
70-
tests/source_line_test.cpp tests/string_test.cpp \
71-
tests/token_rewriter_test.cpp tests/token_test.cpp tests/api_test.cpp \
72-
api.hpp
62+
tests/decoder_test.cpp decoder.hpp api.hpp \
63+
parser_options.hpp token_rewriter.hpp \
64+
token.hpp token_ids.hpp \
65+
shared_byte_list.hpp parser_result.hpp \
66+
nodes.hpp diagnostic.hpp messages.hpp \
67+
magic_comment.hpp tests/diagnostic_test.cpp \
68+
tests/loc_test.cpp tests/magic_comment_test.cpp \
69+
tests/messages_test.cpp tests/nodes_test.cpp \
70+
tests/parser_options_test.cpp tests/parser_result_test.cpp \
71+
tests/shared_byte_list_test.cpp tests/source_line_test.cpp \
72+
tests/string_test.cpp tests/token_rewriter_test.cpp \
73+
tests/token_test.cpp tests/api_test.cpp
7374

7475
benchmark/cpp-parser: benchmark/benchmark.cpp benchmark/rb_filelist.hpp \
75-
benchmark/../lib-ruby-parser.hpp
76+
api.hpp parser_options.hpp \
77+
string.hpp decoder.hpp \
78+
bytes.hpp token_rewriter.hpp \
79+
token.hpp loc.hpp \
80+
decoded_input.hpp source_line.hpp \
81+
token_ids.hpp shared_byte_list.hpp \
82+
parser_result.hpp nodes.hpp \
83+
diagnostic.hpp messages.hpp \
84+
comment.hpp magic_comment.hpp
7685

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ include tests/build.mk
5050
include benchmark/build.mk
5151

5252
# deps
53-
update-depend: $(CPP_FILES) $(HPP_FILES)
53+
update-depend: $(CPP_FILES) $(HPP_FILES) tests/messages_test.cpp tests/nodes_test.cpp
5454
CC=$(CC) ./scripts/update-depend.sh
5555
include .depend
5656

benchmark/benchmark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <chrono>
44

55
#include "rb_filelist.hpp"
6-
#include "../lib-ruby-parser.hpp"
6+
#include "../api.hpp"
77

88
int main()
99
{

benchmark/build.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
benchmark/cpp-parser: $(STATIC_LIB) lib-ruby-parser.hpp benchmark/benchmark.cpp
1+
benchmark/cpp-parser: $(STATIC_LIB)
22
$(call build_cxx_exe,benchmark/benchmark.cpp $(STATIC_LIB),benchmark/cpp-parser)
33

44
define download_latest_bench_asset

benchmark/rb_filelist.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <vector>
33
#include <string>
44
#include <streambuf>
5-
#include "../lib-ruby-parser.hpp"
5+
#include "../api.hpp"
66

77
class FileToParse
88
{

scripts/update-depend.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ echo "" >> .depend
2020

2121
sed 's/tests\/\.\.\///g' .depend > .depend-tmp
2222
mv .depend-tmp .depend
23+
24+
sed 's/benchmark\/\.\.\///g' .depend > .depend-tmp
25+
mv .depend-tmp .depend

0 commit comments

Comments
 (0)