Skip to content

Commit 93bef40

Browse files
committed
LLInt interpreter code should be generated as part of one function
https://bugs.webkit.org/show_bug.cgi?id=131205 Reviewed by Mark Lam. Source/JavaScriptCore: Changed the generation of llint opcodes so that they are all part of the same global function, llint_entry. That function is used to fill in an entry point table that includes each of the opcodes and helpers. * CMakeLists.txt: * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh: * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: * JavaScriptCore.xcodeproj/project.pbxproj: Added appropriate use of new -I option to offline assembler and offset generator scripts. * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: * llint/LowLevelInterpreter.h: * offlineasm/arm.rb: * offlineasm/arm64.rb: * offlineasm/asm.rb: * offlineasm/ast.rb: * offlineasm/backends.rb: * offlineasm/cloop.rb: * offlineasm/generate_offset_extractor.rb: * offlineasm/instructions.rb: * offlineasm/parser.rb: * offlineasm/registers.rb: * offlineasm/self_hash.rb: * offlineasm/settings.rb: * offlineasm/transform.rb: * offlineasm/x86.rb: Added a new "global" keyword to the offline assembler that denotes a label that should be exported. Added opcode and operand support to get the absolute address of a local label using position independent calculations. Updated the offline assembler to handle included files, both when generating the checksum as well as including files from other than the local directory via a newly added -I option. The offline assembler now automatically determines external functions by keeping track of referenced functions that are defined within the assembly source. This is used both for choosing the correct macro for external references as well as generating the needed EXTERN directives for masm. Updated the generation of the masm only .sym file to be written once at the end of the offline assembler. * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::createLLIntCodePtr): (JSC::MacroAssemblerCodeRef::createLLIntCodeRef): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dumpBytecode): (JSC::CodeBlock::CodeBlock): * bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt): * bytecode/Opcode.h: (JSC::padOpcodeName): * bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFromLLInt): * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): * jit/JITStubs.h: * llint/LLIntCLoop.cpp: (JSC::LLInt::initialize): * llint/LLIntData.h: (JSC::LLInt::getCodeFunctionPtr): (JSC::LLInt::getOpcode): Deleted. (JSC::LLInt::getCodePtr): Deleted. * llint/LLIntOpcode.h: * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): * llint/LLIntThunks.cpp: (JSC::LLInt::functionForCallEntryThunkGenerator): (JSC::LLInt::functionForConstructEntryThunkGenerator): (JSC::LLInt::functionForCallArityCheckThunkGenerator): (JSC::LLInt::functionForConstructArityCheckThunkGenerator): (JSC::LLInt::evalEntryThunkGenerator): (JSC::LLInt::programEntryThunkGenerator): * llint/LLIntThunks.h: Changed references to llint helpers to go through the entry point table populated by llint_entry. Added helpers to OpcodeID enum for all builds. * bytecode/BytecodeList.json: * generate-bytecode-files: * llint/LLIntCLoop.cpp: (JSC::LLInt::CLoop::initialize): Reordered sections to match the order that the functions are added to the entry point table. Added new "asmPrefix" property for symbols that have one name but are generated with a prefix, e.g. op_enter -> llint_op_enter. Eliminated the "emitDefineID" property as we are using enums for all bytecode references. Changed the C Loop only llint_c_loop_init to llint_entry. Source/WebKit: Updated VS dependencies for JavaScriptCore changes. * WebKit.vcxproj/WebKit.sln: Canonical link: https://commits.webkit.org/149575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 0cb8b63 commit 93bef40

40 files changed

Lines changed: 586 additions & 164 deletions

‎Source/JavaScriptCore/CMakeLists.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ if (ENABLE_LLINT)
604604
add_custom_command(
605605
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
606606
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
607-
DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
608-
COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
607+
DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
608+
COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
609609
VERBATIM)
610610

611611
# We add the header files directly to the ADD_EXECUTABLE call instead of setting the
@@ -633,7 +633,7 @@ if (ENABLE_LLINT)
633633
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
634634
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
635635
DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
636-
COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
636+
COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
637637
COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
638638
VERBATIM)
639639

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,95 @@
1+
2014-04-10 Michael Saboff <msaboff@apple.com>
2+
3+
LLInt interpreter code should be generated as part of one function
4+
https://bugs.webkit.org/show_bug.cgi?id=131205
5+
6+
Reviewed by Mark Lam.
7+
8+
Changed the generation of llint opcodes so that they are all part of the same
9+
global function, llint_entry. That function is used to fill in an entry point
10+
table that includes each of the opcodes and helpers.
11+
12+
* CMakeLists.txt:
13+
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh:
14+
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh:
15+
* JavaScriptCore.xcodeproj/project.pbxproj:
16+
Added appropriate use of new -I option to offline assembler and offset
17+
generator scripts.
18+
19+
* llint/LowLevelInterpreter.asm:
20+
* llint/LowLevelInterpreter.cpp:
21+
* llint/LowLevelInterpreter.h:
22+
* offlineasm/arm.rb:
23+
* offlineasm/arm64.rb:
24+
* offlineasm/asm.rb:
25+
* offlineasm/ast.rb:
26+
* offlineasm/backends.rb:
27+
* offlineasm/cloop.rb:
28+
* offlineasm/generate_offset_extractor.rb:
29+
* offlineasm/instructions.rb:
30+
* offlineasm/parser.rb:
31+
* offlineasm/registers.rb:
32+
* offlineasm/self_hash.rb:
33+
* offlineasm/settings.rb:
34+
* offlineasm/transform.rb:
35+
* offlineasm/x86.rb:
36+
Added a new "global" keyword to the offline assembler that denotes a label that
37+
should be exported. Added opcode and operand support to get the absolute
38+
address of a local label using position independent calculations. Updated the
39+
offline assembler to handle included files, both when generating the checksum
40+
as well as including files from other than the local directory via a newly
41+
added -I option. The offline assembler now automatically determines external
42+
functions by keeping track of referenced functions that are defined within the
43+
assembly source. This is used both for choosing the correct macro for external
44+
references as well as generating the needed EXTERN directives for masm.
45+
Updated the generation of the masm only .sym file to be written once at the end
46+
of the offline assembler.
47+
48+
* assembler/MacroAssemblerCodeRef.h:
49+
(JSC::MacroAssemblerCodePtr::createLLIntCodePtr):
50+
(JSC::MacroAssemblerCodeRef::createLLIntCodeRef):
51+
* bytecode/CodeBlock.cpp:
52+
(JSC::CodeBlock::dumpBytecode):
53+
(JSC::CodeBlock::CodeBlock):
54+
* bytecode/GetByIdStatus.cpp:
55+
(JSC::GetByIdStatus::computeFromLLInt):
56+
* bytecode/Opcode.h:
57+
(JSC::padOpcodeName):
58+
* bytecode/PutByIdStatus.cpp:
59+
(JSC::PutByIdStatus::computeFromLLInt):
60+
* jit/JIT.cpp:
61+
(JSC::JIT::privateCompileMainPass):
62+
* jit/JITStubs.h:
63+
* llint/LLIntCLoop.cpp:
64+
(JSC::LLInt::initialize):
65+
* llint/LLIntData.h:
66+
(JSC::LLInt::getCodeFunctionPtr):
67+
(JSC::LLInt::getOpcode): Deleted.
68+
(JSC::LLInt::getCodePtr): Deleted.
69+
* llint/LLIntOpcode.h:
70+
* llint/LLIntSlowPaths.cpp:
71+
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
72+
* llint/LLIntThunks.cpp:
73+
(JSC::LLInt::functionForCallEntryThunkGenerator):
74+
(JSC::LLInt::functionForConstructEntryThunkGenerator):
75+
(JSC::LLInt::functionForCallArityCheckThunkGenerator):
76+
(JSC::LLInt::functionForConstructArityCheckThunkGenerator):
77+
(JSC::LLInt::evalEntryThunkGenerator):
78+
(JSC::LLInt::programEntryThunkGenerator):
79+
* llint/LLIntThunks.h:
80+
Changed references to llint helpers to go through the entry point table populated
81+
by llint_entry. Added helpers to OpcodeID enum for all builds.
82+
83+
* bytecode/BytecodeList.json:
84+
* generate-bytecode-files:
85+
* llint/LLIntCLoop.cpp:
86+
(JSC::LLInt::CLoop::initialize):
87+
Reordered sections to match the order that the functions are added to the entry point
88+
table. Added new "asmPrefix" property for symbols that have one name but are generated
89+
with a prefix, e.g. op_enter -> llint_op_enter. Eliminated the "emitDefineID" property
90+
as we are using enums for all bytecode references. Changed the C Loop only
91+
llint_c_loop_init to llint_entry.
92+
193
2014-04-10 Matthew Mirman <mmirman@apple.com>
294

395
WIP for inlining C++. Added a build target to produce LLVM IR.

‎Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ else
3434
OUTPUTFILENAME="LLIntAssembly.h"
3535
fi
3636

37-
/usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor${3}.exe" "${OUTPUTFILENAME}" || exit 1
37+
/usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "-I." "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor${3}.exe" "${OUTPUTFILENAME}" || exit 1

‎Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${3}/JavaScriptCore/DerivedSources"
2222
# Step 1: Generate LLIntDesiredOffsets.h
2323
mkdir -p "${BUILT_PRODUCTS_DIR}"
2424

25-
/usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h"
25+
/usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "-I${BUILT_PRODUCTS_DIR}" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h"

‎Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj‎

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
buildPhases = (
1414
0F4680AA14BA7FD900BFE272 /* Generate Derived Sources */,
1515
);
16+
dependencies = (
17+
65442D5018EBB744007AF92F /* PBXTargetDependency */,
18+
);
1619
name = "LLInt Offsets";
1720
productName = "Derived Sources";
1821
};
@@ -36,6 +39,7 @@
3639
65788AA018B409EB00C189FF /* Offline Assemble */,
3740
);
3841
dependencies = (
42+
65244BD318ECB5000010B708 /* PBXTargetDependency */,
3943
65788A9E18B409EB00C189FF /* PBXTargetDependency */,
4044
);
4145
name = "Offline Assembler";
@@ -49,7 +53,6 @@
4953
5D35DEE10C7C140B008648B2 /* Generate DTrace header */,
5054
);
5155
dependencies = (
52-
65788AA918B40A3300C189FF /* PBXTargetDependency */,
5356
);
5457
name = "Derived Sources";
5558
productName = "Derived Sources";
@@ -1831,19 +1834,26 @@
18311834
remoteGlobalIDString = 5D6B2A47152B9E17005231DE;
18321835
remoteInfo = "Test Tools";
18331836
};
1834-
65788A9F18B409EB00C189FF /* PBXContainerItemProxy */ = {
1837+
65244BD218ECB5000010B708 /* PBXContainerItemProxy */ = {
18351838
isa = PBXContainerItemProxy;
18361839
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
18371840
proxyType = 1;
1838-
remoteGlobalIDString = 0FF922C314F46B130041A24E;
1839-
remoteInfo = JSCLLIntOffsetsExtractor;
1841+
remoteGlobalIDString = 65FB3F6609D11E9100F49DEB;
1842+
remoteInfo = "Derived Sources";
18401843
};
1841-
65788AA818B40A3300C189FF /* PBXContainerItemProxy */ = {
1844+
65442D4F18EBB744007AF92F /* PBXContainerItemProxy */ = {
18421845
isa = PBXContainerItemProxy;
18431846
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
18441847
proxyType = 1;
1845-
remoteGlobalIDString = 0F4680A914BA7FD900BFE272;
1846-
remoteInfo = "LLInt Offsets";
1848+
remoteGlobalIDString = 65FB3F6609D11E9100F49DEB;
1849+
remoteInfo = "Derived Sources";
1850+
};
1851+
65788A9F18B409EB00C189FF /* PBXContainerItemProxy */ = {
1852+
isa = PBXContainerItemProxy;
1853+
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
1854+
proxyType = 1;
1855+
remoteGlobalIDString = 0FF922C314F46B130041A24E;
1856+
remoteInfo = JSCLLIntOffsetsExtractor;
18471857
};
18481858
65788AAA18B40A3B00C189FF /* PBXContainerItemProxy */ = {
18491859
isa = PBXContainerItemProxy;
@@ -6527,7 +6537,7 @@
65276537
);
65286538
runOnlyForDeploymentPostprocessing = 0;
65296539
shellPath = /bin/sh;
6530-
shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/LLIntDesiredOffsets.h\"\n";
6540+
shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/LLIntDesiredOffsets.h\"\n";
65316541
};
65326542
0FCEFAD91806191800472CE4 /* Copy LLVM Library Into Framework */ = {
65336543
isa = PBXShellScriptBuildPhase;
@@ -6715,7 +6725,7 @@
67156725
);
67166726
runOnlyForDeploymentPostprocessing = 0;
67176727
shellPath = /bin/sh;
6718-
shellScript = "if [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n exit 0\nfi\n\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb JavaScriptCore/llint/LowLevelInterpreter.asm ${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor LLIntAssembly.h || exit 1";
6728+
shellScript = "if [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n exit 0\nfi\n\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb -I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore JavaScriptCore/llint/LowLevelInterpreter.asm ${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor LLIntAssembly.h || exit 1";
67196729
};
67206730
65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = {
67216731
isa = PBXShellScriptBuildPhase;
@@ -7428,16 +7438,21 @@
74287438
/* Test Tools */;
74297439
targetProxy = 5D6B2A56152B9E2E005231DE /* PBXContainerItemProxy */;
74307440
};
7441+
65244BD318ECB5000010B708 /* PBXTargetDependency */ = {
7442+
isa = PBXTargetDependency;
7443+
/* Derived Sources */;
7444+
targetProxy = 65244BD218ECB5000010B708 /* PBXContainerItemProxy */;
7445+
};
7446+
65442D5018EBB744007AF92F /* PBXTargetDependency */ = {
7447+
isa = PBXTargetDependency;
7448+
/* Derived Sources */;
7449+
targetProxy = 65442D4F18EBB744007AF92F /* PBXContainerItemProxy */;
7450+
};
74317451
65788A9E18B409EB00C189FF /* PBXTargetDependency */ = {
74327452
isa = PBXTargetDependency;
74337453
/* JSCLLIntOffsetsExtractor */;
74347454
targetProxy = 65788A9F18B409EB00C189FF /* PBXContainerItemProxy */;
74357455
};
7436-
65788AA918B40A3300C189FF /* PBXTargetDependency */ = {
7437-
isa = PBXTargetDependency;
7438-
/* LLInt Offsets */;
7439-
targetProxy = 65788AA818B40A3300C189FF /* PBXContainerItemProxy */;
7440-
};
74417456
65788AAB18B40A3B00C189FF /* PBXTargetDependency */ = {
74427457
isa = PBXTargetDependency;
74437458
/* Derived Sources */;

‎Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class MacroAssemblerCodePtr {
294294
}
295295

296296
#if ENABLE(LLINT)
297-
static MacroAssemblerCodePtr createLLIntCodePtr(LLIntCode codeId)
297+
static MacroAssemblerCodePtr createLLIntCodePtr(OpcodeID codeId)
298298
{
299299
return createFromExecutableAddress(LLInt::getCodePtr(codeId));
300300
}
@@ -412,7 +412,7 @@ class MacroAssemblerCodeRef {
412412

413413
#if ENABLE(LLINT)
414414
// Helper for creating self-managed code refs from LLInt.
415-
static MacroAssemblerCodeRef createLLIntCodeRef(LLIntCode codeId)
415+
static MacroAssemblerCodeRef createLLIntCodeRef(OpcodeID codeId)
416416
{
417417
return createSelfManagedCodeRef(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(codeId)));
418418
}

‎Source/JavaScriptCore/bytecode/BytecodeList.json‎

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[
22
{
3-
"section" : "Bytecodes", "emitInHFile" : true, "emitInASMFile" : true, "macroNameComponent" : "BYTECODE",
3+
"section" : "Bytecodes", "emitInHFile" : true, "emitInASMFile" : true,
4+
"macroNameComponent" : "BYTECODE", "asmPrefix" : "llint_",
45
"bytecodes" : [
56
{ "name" : "op_enter", "length" : 1 },
67
{ "name" : "op_create_activation", "length" : 2 },
@@ -124,33 +125,15 @@
124125
{ "name" : "op_end", "length" : 2 }
125126
]
126127
},
127-
{
128-
"section" : "NativeHelpers", "emitInHFile" : true, "emitInASMFile" : true, "defaultLength" : 1,
129-
"macroNameComponent" : "BYTECODE_HELPER", "emitDefineID" : true,
130-
"bytecodes" : [
131-
{ "name" : "llint_program_prologue" },
132-
{ "name" : "llint_eval_prologue" },
133-
{ "name" : "llint_function_for_call_prologue" },
134-
{ "name" : "llint_function_for_construct_prologue" },
135-
{ "name" : "llint_function_for_call_arity_check" },
136-
{ "name" : "llint_function_for_construct_arity_check" },
137-
{ "name" : "llint_generic_return_point" },
138-
{ "name" : "llint_throw_from_slow_path_trampoline" },
139-
{ "name" : "llint_throw_during_call_trampoline" },
140-
{ "name" : "llint_native_call_trampoline" },
141-
{ "name" : "llint_native_construct_trampoline" }
142-
]
143-
},
144128
{
145129
"section" : "CLoopHelpers", "emitInHFile" : true, "emitInASMFile" : false, "defaultLength" : 1,
146130
"macroNameComponent" : "CLOOP_BYTECODE_HELPER",
147131
"bytecodes" : [
148-
{ "name" : "llint_c_loop_init" },
132+
{ "name" : "llint_entry" },
149133
{ "name" : "getHostCallReturnValue" },
150134
{ "name" : "llint_return_to_host" },
151135
{ "name" : "llint_call_to_javascript" },
152136
{ "name" : "llint_call_to_native_function" },
153-
{ "name" : "handleUncaughtException" },
154137
{ "name" : "llint_cloop_did_return_from_js_1" },
155138
{ "name" : "llint_cloop_did_return_from_js_2" },
156139
{ "name" : "llint_cloop_did_return_from_js_3" },
@@ -160,5 +143,23 @@
160143
{ "name" : "llint_cloop_did_return_from_js_7" },
161144
{ "name" : "llint_cloop_did_return_from_js_8" }
162145
]
146+
},
147+
{
148+
"section" : "NativeHelpers", "emitInHFile" : true, "emitInASMFile" : true, "defaultLength" : 1,
149+
"macroNameComponent" : "BYTECODE_HELPER",
150+
"bytecodes" : [
151+
{ "name" : "llint_program_prologue" },
152+
{ "name" : "llint_eval_prologue" },
153+
{ "name" : "llint_function_for_call_prologue" },
154+
{ "name" : "llint_function_for_construct_prologue" },
155+
{ "name" : "llint_function_for_call_arity_check" },
156+
{ "name" : "llint_function_for_construct_arity_check" },
157+
{ "name" : "llint_generic_return_point" },
158+
{ "name" : "llint_throw_from_slow_path_trampoline" },
159+
{ "name" : "llint_throw_during_call_trampoline" },
160+
{ "name" : "llint_native_call_trampoline" },
161+
{ "name" : "llint_native_construct_trampoline" },
162+
{ "name" : "handleUncaughtException" }
163+
]
163164
}
164165
]

‎Source/JavaScriptCore/bytecode/CodeBlock.cpp‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,10 +1368,8 @@ void CodeBlock::dumpBytecode(
13681368
operand);
13691369
break;
13701370
}
1371-
#if ENABLE(LLINT_C_LOOP)
13721371
default:
13731372
RELEASE_ASSERT_NOT_REACHED();
1374-
#endif
13751373
}
13761374

13771375
dumpRareCaseProfile(out, "rare case: ", rareCaseProfileForBytecodeOffset(location), hasPrintedProfiling);
@@ -1587,7 +1585,7 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin
15871585
m_rareData->m_exceptionHandlers[i].target = handler.target;
15881586
m_rareData->m_exceptionHandlers[i].scopeDepth = nonLocalScopeDepth + handler.scopeDepth;
15891587
#if ENABLE(JIT) && ENABLE(LLINT)
1590-
m_rareData->m_exceptionHandlers[i].nativeCode = CodeLocationLabel(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(llint_op_catch)));
1588+
m_rareData->m_exceptionHandlers[i].nativeCode = CodeLocationLabel(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(op_catch)));
15911589
#endif
15921590
}
15931591
}

‎Source/JavaScriptCore/bytecode/GetByIdStatus.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned
6464
#if ENABLE(LLINT)
6565
Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;
6666

67-
if (instruction[0].u.opcode == LLInt::getOpcode(llint_op_get_array_length))
67+
if (instruction[0].u.opcode == LLInt::getOpcode(op_get_array_length))
6868
return GetByIdStatus(NoInformation, false);
6969

7070
Structure* structure = instruction[4].u.structure.get();

‎Source/JavaScriptCore/bytecode/Opcode.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ namespace JSC {
6060

6161
const int maxOpcodeLength = 9;
6262
#if ENABLE(LLINT_C_LOOP)
63-
const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_BYTECODE_HELPER_IDS + NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS;
63+
const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS + NUMBER_OF_BYTECODE_HELPER_IDS;
6464
#else
65-
const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS;
65+
const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_BYTECODE_HELPER_IDS;
6666
#endif
6767

6868
#define OPCODE_ID_LENGTHS(id, length) const int id##_length = length;

0 commit comments

Comments
 (0)