Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-12 Thread 임민수
Hi. In removeFirst, if size is not 0, the logic is the same as the remove logic. removeLast also has the same logic as remove when size is not exceeded. I want to fix this. thank you.

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread forax
> From: "Chen Liang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Sunday, May 11, 2025 5:41:25 PM > Subject: Re: Unnecessary logic is added to removeFirst and removeLast of > ArrayList. > > where the generated assembly code by the JITs

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread Chen Liang
led code eliminates that field. From: core-libs-dev on behalf of Remi Forax Sent: Sunday, May 11, 2025 5:16 AM To: 임민수 Cc: core-libs-dev Subject: Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList. Duplicating the logic is bad in some cases and

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread Remi Forax
> From: "임민수" > To: "core-libs-dev" > Sent: Friday, May 9, 2025 10:33:30 AM > Subject: Unnecessary logic is added to removeFirst and removeLast of > ArrayList. > Hi. > In removeFirst, if size is not 0, the logic is the same as the remove logic. >

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-09 Thread Raffaello Giulietti
Hi, when the size if not zero, the logic in removeFirst() avoids an index check, which however must be enforced in remove(int). There's no need for a "fix". On 2025-05-09 10:31, 임민수 wrote: Hi. In removeFirst, if size is not 0, the logic is the same as the remove logic. removeLast also has

Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-09 Thread 임민수
Hi. In removeFirst, if size is not 0, the logic is the same as the remove logic. removeLast also has the same logic as remove when size is not exceeded. I want to fix this. thank you.

Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-09 Thread 임민수
Hi. In removeFirst, if size is not 0, the logic is the same as the remove logic. removeLast also has the same logic as remove when size is not exceeded. I want to fix this. thank you.