hotspot/src/share/vm/code/compressedStream.cpp
changeset 24424 2658d7834c6e
parent 22234 da823d78ad65
child 46600 fdde0f192cde
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   210   // move l upwards, maybe
   210   // move l upwards, maybe
   211   l <<= (x >> 16);
   211   l <<= (x >> 16);
   212   return h ^ l;
   212   return h ^ l;
   213 }
   213 }
   214 
   214 
       
   215 PRAGMA_DIAG_PUSH
       
   216 PRAGMA_FORMAT_IGNORED // Someone needs to deal with this.
   215 void test_compressed_stream(int trace) {
   217 void test_compressed_stream(int trace) {
   216   CompressedWriteStream bytes(stretch_limit * 100);
   218   CompressedWriteStream bytes(stretch_limit * 100);
   217   jint n;
   219   jint n;
   218   int step = 0, fails = 0;
   220   int step = 0, fails = 0;
   219 #define CHECKXY(x, y, fmt) { \
   221 #define CHECKXY(x, y, fmt) { \
   273   if (trace != 0)
   275   if (trace != 0)
   274     tty->print_cr("finished test of %d stream values, size %d", step, length2);
   276     tty->print_cr("finished test of %d stream values, size %d", step, length2);
   275   guarantee(length == length2, "bad length");
   277   guarantee(length == length2, "bad length");
   276   guarantee(fails == 0, "test failures");
   278   guarantee(fails == 0, "test failures");
   277 }
   279 }
       
   280 PRAGMA_DIAG_POP
   278 
   281 
   279 #if defined(_MSC_VER) &&_MSC_VER >=1400 && !defined(_WIN64)
   282 #if defined(_MSC_VER) &&_MSC_VER >=1400 && !defined(_WIN64)
   280 #pragma warning(default: 4748)
   283 #pragma warning(default: 4748)
   281 #pragma optimize("", on)
   284 #pragma optimize("", on)
   282 #endif
   285 #endif