Skip to content

Commit 769f14d

Browse files
author
Harold Seigel
committed
8278384: Bytecodes::result_type() for arraylength returns T_VOID instead of T_INT
Reviewed-by: lfoltan, dholmes
1 parent e45e0b0 commit 769f14d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/hotspot/share/interpreter/bytecodeUtils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,6 @@ int ExceptionMessageBuilder::do_instruction(int bci) {
10291029
break;
10301030

10311031
case Bytecodes::_arraylength:
1032-
// The return type of arraylength is wrong in the bytecodes table (T_VOID).
10331032
stack->pop(1);
10341033
stack->push(bci, T_INT);
10351034
break;

src/hotspot/share/interpreter/bytecodes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -471,7 +471,7 @@ void Bytecodes::initialize() {
471471
def(_new , "new" , "bkk" , NULL , T_OBJECT , 1, true );
472472
def(_newarray , "newarray" , "bc" , NULL , T_OBJECT , 0, true );
473473
def(_anewarray , "anewarray" , "bkk" , NULL , T_OBJECT , 0, true );
474-
def(_arraylength , "arraylength" , "b" , NULL , T_VOID , 0, true );
474+
def(_arraylength , "arraylength" , "b" , NULL , T_INT , 0, true );
475475
def(_athrow , "athrow" , "b" , NULL , T_VOID , -1, true );
476476
def(_checkcast , "checkcast" , "bkk" , NULL , T_OBJECT , 0, true );
477477
def(_instanceof , "instanceof" , "bkk" , NULL , T_INT , 0, true );

0 commit comments

Comments
 (0)