WebKit Bugzilla
Attachment 356595 Details for
Bug 174212
: [JSC] Add support for instance class fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Placeholder baseline JIT for private field opcodes
baseline-jit-dummy.diff (text/plain), 4.32 KB, created by
Xan Lopez
on 2018-12-05 03:37:26 PST
(
hide
)
Description:
Placeholder baseline JIT for private field opcodes
Filename:
MIME Type:
Creator:
Xan Lopez
Created:
2018-12-05 03:37:26 PST
Size:
4.32 KB
patch
obsolete
>From 1d233031e798850c4484f9662f3a76c8e9432a2f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Xan=20L=C3=B3pez?= <xan@igalia.com> >Date: Wed, 5 Dec 2018 11:53:58 +0100 >Subject: [PATCH] [JSC] Add support for class fields > https://bugs.webkit.org/show_bug.cgi?id=174212 > >Reviewed by NOBODY (OOPS!). > >Add placeholder baseline JIT implementations for the private field >opcodes. This avoids a crash when the first JIT compilation for >any of them is triggered. > >* jit/JIT.cpp: >(JSC::JIT::privateCompileMainPass): >(JSC::JIT::privateCompileSlowCases): >* jit/JIT.h: >* jit/JITOpcodes.cpp: >(JSC::JIT::emit_op_add_private_field): >(JSC::JIT::emit_op_get_private_field): >(JSC::JIT::emit_op_put_private_field): >--- > Source/JavaScriptCore/ChangeLog | 20 ++++++++++++++++++++ > Source/JavaScriptCore/jit/JIT.cpp | 6 ++++++ > Source/JavaScriptCore/jit/JIT.h | 3 +++ > Source/JavaScriptCore/jit/JITOpcodes.cpp | 13 +++++++++++++ > 4 files changed, 42 insertions(+) > >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 57dcca3ddd4..14629dad83a 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-05 Xan Lopez <xan@igalia.com> >+ >+ [JSC] Add support for class fields >+ https://bugs.webkit.org/show_bug.cgi?id=174212 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add placeholder baseline JIT implementations for the private field >+ opcodes. This avoids a crash when the first JIT compilation for >+ any of them is triggered. >+ >+ * jit/JIT.cpp: >+ (JSC::JIT::privateCompileMainPass): >+ (JSC::JIT::privateCompileSlowCases): >+ * jit/JIT.h: >+ * jit/JITOpcodes.cpp: >+ (JSC::JIT::emit_op_add_private_field): >+ (JSC::JIT::emit_op_get_private_field): >+ (JSC::JIT::emit_op_put_private_field): >+ > 2018-11-02 Xan López <xan@igalia.com> > > [JSC] Add support for class fields >diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp >index 4263d287a09..edc6f2bf6ed 100644 >--- a/Source/JavaScriptCore/jit/JIT.cpp >+++ b/Source/JavaScriptCore/jit/JIT.cpp >@@ -409,6 +409,9 @@ void JIT::privateCompileMainPass() > DEFINE_OP(op_put_getter_setter_by_id) > DEFINE_OP(op_put_getter_by_val) > DEFINE_OP(op_put_setter_by_val) >+ DEFINE_OP(op_get_private_field) >+ DEFINE_OP(op_add_private_field) >+ DEFINE_OP(op_put_private_field) > > DEFINE_OP(op_ret) > DEFINE_OP(op_rshift) >@@ -563,6 +566,9 @@ void JIT::privateCompileSlowCases() > DEFINE_SLOWCASE_SLOW_OP(has_structure_property) > DEFINE_SLOWCASE_SLOW_OP(resolve_scope) > DEFINE_SLOWCASE_SLOW_OP(check_tdz) >+ DEFINE_SLOWCASE_SLOW_OP(add_private_field) >+ DEFINE_SLOWCASE_SLOW_OP(get_private_field) >+ DEFINE_SLOWCASE_SLOW_OP(put_private_field) > > default: > RELEASE_ASSERT_NOT_REACHED(); >diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h >index fc710b0eb6d..efcf47bd408 100644 >--- a/Source/JavaScriptCore/jit/JIT.h >+++ b/Source/JavaScriptCore/jit/JIT.h >@@ -634,6 +634,9 @@ namespace JSC { > void emit_op_enumerator_generic_pname(const Instruction*); > void emit_op_log_shadow_chicken_prologue(const Instruction*); > void emit_op_log_shadow_chicken_tail(const Instruction*); >+ void emit_op_add_private_field(const Instruction*); >+ void emit_op_get_private_field(const Instruction*); >+ void emit_op_put_private_field(const Instruction*); > > void emitSlow_op_add(const Instruction*, Vector<SlowCaseEntry>::iterator&); > void emitSlow_op_call(const Instruction*, Vector<SlowCaseEntry>::iterator&); >diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp >index 801a6a82215..b5557d3cad8 100644 >--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp >+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp >@@ -1549,6 +1549,19 @@ void JIT::emit_op_get_argument(const Instruction* currentInstruction) > emitPutVirtualRegister(dst, resultRegs); > } > >+void JIT::emit_op_add_private_field(const Instruction*) >+{ >+ addSlowCase(jump()); >+} >+void JIT::emit_op_get_private_field(const Instruction*) >+{ >+ addSlowCase(jump()); >+} >+void JIT::emit_op_put_private_field(const Instruction*) >+{ >+ addSlowCase(jump()); >+} >+ > } // namespace JSC > > #endif // ENABLE(JIT) >-- >2.19.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 174212
:
314736
|
327359
|
335960
|
344172
|
344176
|
348905
|
348907
|
350893
|
350896
|
350917
|
350923
|
350924
|
350925
|
350935
|
350962
|
351261
|
351286
|
351354
|
353696
|
353698
|
353699
|
353848
|
353849
|
353857
|
353954
|
356594
|
356595
|
360454
|
366588
|
367749
|
368117
|
369295
|
369383
|
371258
|
371265
|
371266
|
371267
|
371268
|
371270
|
371272
|
371273
|
371276
|
371277
|
371278
|
371383
|
371384
|
371387
|
371392
|
373112
|
373117
|
373142
|
373153
|
380353
|
380552
|
380560
|
380757
|
380826
|
381427
|
381457
|
381711
|
382314
|
382318
|
383468
|
384358
|
384359
|
384927
|
384930
|
385494
|
385496
|
387356
|
387361
|
387363
|
387818
|
387827
|
387927