Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/hotspot/share/c1/c1_Canonicalizer.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -40,10 +40,6 @@ class Canonicalizer: InstructionVisitor {
void set_constant(jlong x) { set_canonical(new Constant(new LongConstant(x))); }
void set_constant(jfloat x) { set_canonical(new Constant(new FloatConstant(x))); }
void set_constant(jdouble x) { set_canonical(new Constant(new DoubleConstant(x))); }
#ifdef _WINDOWS
// jint is defined as long in jni_md.h, so convert from int to jint
void set_constant(int x) { set_constant((jint)x); }
#endif
void move_const_to_right(Op2* x);
void do_Op2(Op2* x);

Expand Down
7 changes: 3 additions & 4 deletions src/java.base/windows/native/include/jni_md.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -32,9 +32,8 @@
#define JNIIMPORT __declspec(dllimport)
#define JNICALL __stdcall

// 'long' is always 32 bit on windows so this matches what jdk expects
typedef long jint;
typedef __int64 jlong;
typedef int jint;
typedef long long jlong;
typedef signed char jbyte;

#endif /* !_JAVASOFT_JNI_MD_H_ */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -49,7 +49,7 @@ extern "C" {

#define POLYTEMPSIZE (512 / sizeof(POINT))

static void AngleToCoord(jint angle, jint w, jint h, jint *x, jint *y)
static void AngleToCoord(int angle, int w, int h, int *x, int *y)
{
const double pi = 3.1415926535;
const double toRadians = 2 * pi / 360;
Expand Down Expand Up @@ -322,7 +322,7 @@ Java_sun_java2d_windows_GDIRenderer_doDrawArc
return;
}

long sx, sy, ex, ey;
int sx, sy, ex, ey;
if (angleExtent >= 360 || angleExtent <= -360) {
sx = ex = x + w;
sy = ey = y + h/2;
Expand Down Expand Up @@ -602,7 +602,7 @@ Java_sun_java2d_windows_GDIRenderer_doFillArc
if (wsdo == NULL) {
return;
}
long sx, sy, ex, ey;
int sx, sy, ex, ey;
int angleEnd;
if (angleExtent < 0) {
angleEnd = angleStart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -897,7 +897,7 @@ static void GDIWinSD_GetRasInfo(JNIEnv *env,
}
if (wsdo->lockFlags & SD_LOCK_LUT) {
pRasInfo->lutBase =
(long *) wsdo->device->GetSystemPaletteEntries();
(jint *) wsdo->device->GetSystemPaletteEntries();
pRasInfo->lutSize = 256;
} else {
pRasInfo->lutBase = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,12 +1080,12 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
// Extract the color bitmap
int nBits = iconSize * iconSize;

long *colorBits = NULL;
long *maskBits = NULL;
jint *colorBits = NULL;
int *maskBits = NULL;

try {
entry_point();
colorBits = (long*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long));
colorBits = (jint*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(jint));
GetDIBits(dc, iconInfo.hbmColor, 0, iconSize, colorBits, &bmi, DIB_RGB_COLORS);
// XP supports alpha in some icons, and depending on device.
// This should take precedence over the icon mask bits.
Expand All @@ -1100,7 +1100,7 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
}
if (!hasAlpha) {
// Extract the mask bitmap
maskBits = (long*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long));
maskBits = (int*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(int));
GetDIBits(dc, iconInfo.hbmMask, 0, iconSize, maskBits, &bmi, DIB_RGB_COLORS);
// Copy the mask alphas into the color bits
for (int i = 0; i < nBits; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/windows/native/libawt/windows/awt_Menu.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -73,7 +73,7 @@ class AwtMenu : public AwtMenuItem {

/*for multifont menu */
BOOL IsTopMenu();
virtual AwtMenuItem* GetItem(jobject target, long index);
virtual AwtMenuItem* GetItem(jobject target, jint index);

virtual int CountItem(jobject target);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -145,7 +145,7 @@ int AwtMenuBar::CountItem(jobject menuBar)
return nCount;
}

AwtMenuItem* AwtMenuBar::GetItem(jobject target, long index)
AwtMenuItem* AwtMenuBar::GetItem(jobject target, jint index)
{
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
if (env->EnsureLocalCapacity(2) < 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/windows/native/libawt/windows/awt_MenuBar.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -66,7 +66,7 @@ class AwtMenuBar : public AwtMenu {
virtual HWND GetOwnerHWnd();
virtual void RedrawMenuBar();

AwtMenuItem* GetItem(jobject target, long index);
AwtMenuItem* GetItem(jobject target, jint index);
int CountItem(jobject menuBar);

void DrawItem(DRAWITEMSTRUCT& drawInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ void Jaccesswalker::addComponentNodes(long vmID, AccessibleContext context,
} else {
char s[LINE_BUFSIZE];
snprintf( s, sizeof(s),
"ERROR calling GetAccessibleContextInfo; vmID = %X, context = %p",
"ERROR calling GetAccessibleContextInfo; vmID = %lX, context = %p",
vmID, (void*)context );

TVITEM tvi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ char *getAccessibleInfo(long vmID, AccessibleContext ac, int x, int y,
wchar_t tmpBuf[LINE_BUFSIZE];
wchar_t name[LINE_BUFSIZE];
int i, j;
long start;
long end;
jint start;
jint end;

if (buffer == NULL || bufsize <= 0) {
return NULL;
Expand Down