Skip to content

Commit 7029773

Browse files
committed
LibJS: Some Bytecode.def fixes
- Add missing @nothrow to a bunch of instructions. - Rename fields that were colliding between base and derived class.
1 parent 2d76e21 commit 7029773

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

Libraries/LibJS/Bytecode/Bytecode.def

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ endop
134134

135135
op ContinuePendingUnwind < Instruction
136136
@terminator
137+
@nothrow
137138
m_resume_target: Label
138139
endop
139140

@@ -161,7 +162,7 @@ endop
161162
op CreateImmutableBinding < Instruction
162163
m_environment: Operand
163164
m_identifier: IdentifierTableIndex
164-
m_strict: bool
165+
m_strict_binding: bool
165166
endop
166167

167168
op CreateMutableBinding < Instruction
@@ -236,6 +237,7 @@ endop
236237

237238
op End < Instruction
238239
@terminator
240+
@nothrow
239241
m_value: Operand
240242
endop
241243

@@ -245,6 +247,7 @@ endop
245247

246248
op EnterUnwindContext < Instruction
247249
@terminator
250+
@nothrow
248251
m_entry_point: Label
249252
endop
250253

@@ -451,17 +454,20 @@ endop
451454

452455
op Jump < Instruction
453456
@terminator
457+
@nothrow
454458
m_target: Label
455459
endop
456460

457461
op JumpFalse < Instruction
458462
@terminator
463+
@nothrow
459464
m_condition: Operand
460465
m_target: Label
461466
endop
462467

463468
op JumpGreaterThan < Instruction
464469
@terminator
470+
@nothrow
465471
m_lhs: Operand
466472
m_rhs: Operand
467473
m_true_target: Label
@@ -470,6 +476,7 @@ endop
470476

471477
op JumpGreaterThanEquals < Instruction
472478
@terminator
479+
@nothrow
473480
m_lhs: Operand
474481
m_rhs: Operand
475482
m_true_target: Label
@@ -478,13 +485,15 @@ endop
478485

479486
op JumpIf < Instruction
480487
@terminator
488+
@nothrow
481489
m_condition: Operand
482490
m_true_target: Label
483491
m_false_target: Label
484492
endop
485493

486494
op JumpLessThan < Instruction
487495
@terminator
496+
@nothrow
488497
m_lhs: Operand
489498
m_rhs: Operand
490499
m_true_target: Label
@@ -493,6 +502,7 @@ endop
493502

494503
op JumpLessThanEquals < Instruction
495504
@terminator
505+
@nothrow
496506
m_lhs: Operand
497507
m_rhs: Operand
498508
m_true_target: Label
@@ -501,6 +511,7 @@ endop
501511

502512
op JumpLooselyEquals < Instruction
503513
@terminator
514+
@nothrow
504515
m_lhs: Operand
505516
m_rhs: Operand
506517
m_true_target: Label
@@ -509,6 +520,7 @@ endop
509520

510521
op JumpLooselyInequals < Instruction
511522
@terminator
523+
@nothrow
512524
m_lhs: Operand
513525
m_rhs: Operand
514526
m_true_target: Label
@@ -517,13 +529,15 @@ endop
517529

518530
op JumpNullish < Instruction
519531
@terminator
532+
@nothrow
520533
m_condition: Operand
521534
m_true_target: Label
522535
m_false_target: Label
523536
endop
524537

525538
op JumpStrictlyEquals < Instruction
526539
@terminator
540+
@nothrow
527541
m_lhs: Operand
528542
m_rhs: Operand
529543
m_true_target: Label
@@ -532,6 +546,7 @@ endop
532546

533547
op JumpStrictlyInequals < Instruction
534548
@terminator
549+
@nothrow
535550
m_lhs: Operand
536551
m_rhs: Operand
537552
m_true_target: Label
@@ -540,12 +555,14 @@ endop
540555

541556
op JumpTrue < Instruction
542557
@terminator
558+
@nothrow
543559
m_condition: Operand
544560
m_target: Label
545561
endop
546562

547563
op JumpUndefined < Instruction
548564
@terminator
565+
@nothrow
549566
m_condition: Operand
550567
m_true_target: Label
551568
m_false_target: Label
@@ -604,6 +621,7 @@ op Mod < Instruction
604621
endop
605622

606623
op Mov < Instruction
624+
@nothrow
607625
m_dst: Operand
608626
m_src: Operand
609627
endop
@@ -954,13 +972,14 @@ endop
954972

955973
op ScheduleJump < Instruction
956974
@terminator
975+
@nothrow
957976
m_target: Label
958977
endop
959978

960979
op SetCompletionType < Instruction
961980
@nothrow
962981
m_completion: Operand
963-
m_type: Completion::Type
982+
m_completion_type: Completion::Type
964983
endop
965984

966985
op SetGlobal < Instruction

Libraries/LibJS/Bytecode/Interpreter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,13 +3284,13 @@ void SetCompletionType::execute_impl(Bytecode::Interpreter& interpreter) const
32843284
{
32853285
auto& completion_cell = static_cast<CompletionCell&>(interpreter.get(m_completion).as_cell());
32863286
auto completion = completion_cell.completion();
3287-
completion_cell.set_completion(Completion { m_type, completion.value() });
3287+
completion_cell.set_completion(Completion { m_completion_type, completion.value() });
32883288
}
32893289

32903290
ThrowCompletionOr<void> CreateImmutableBinding::execute_impl(Bytecode::Interpreter& interpreter) const
32913291
{
32923292
auto& environment = as<Environment>(interpreter.get(m_environment).as_cell());
3293-
return environment.create_immutable_binding(interpreter.vm(), interpreter.get_identifier(m_identifier), m_strict);
3293+
return environment.create_immutable_binding(interpreter.vm(), interpreter.get_identifier(m_identifier), m_strict_binding);
32943294
}
32953295

32963296
ThrowCompletionOr<void> CreateMutableBinding::execute_impl(Bytecode::Interpreter& interpreter) const

0 commit comments

Comments
 (0)