Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision c2a506e40e9135bfd17b59fffc62261dc95bc535 authored by Victor Stinner on 14 June 2017, 12:26:52 UTC, committed by GitHub on 14 June 2017, 12:26:52 UTC
* bpo-30649: test_os tolerates 50 ms delta for utime (#2156) On Windows, tolerate a delta of 50 ms instead of 20 ms in test_utime_current() and test_utime_current_old() of test_os. On other platforms, reduce the delta from 20 ms to 10 ms. (cherry picked from commit c94caca65cd38802243b5279cf85ee44ffb2abb8) * bpo-30649: Revert utime delta in test_os (#2176) PPC64 Fedora 3.x buildbot requires at least a delta of 14 ms: revert the utime delta to 20 ms. I tried 10 ms, but test_os failed on the PPC64 Fedora 3.x buildbot. (cherry picked from commit 3402f7268897db15053866e1e68404cfa0e02706)
1 parent 22d909f
Tip revision: c2a506e40e9135bfd17b59fffc62261dc95bc535 authored by Victor Stinner on 14 June 2017, 12:26:52 UTC
[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)
[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)
Tip revision: c2a506e
wordcode_helpers.h
/* This file contains code shared by the compiler and the peephole
optimizer.
*/
#ifdef WORDS_BIGENDIAN
# define PACKOPARG(opcode, oparg) ((_Py_CODEUNIT)(((opcode) << 8) | (oparg)))
#else
# define PACKOPARG(opcode, oparg) ((_Py_CODEUNIT)(((oparg) << 8) | (opcode)))
#endif
/* Minimum number of code units necessary to encode instruction with
EXTENDED_ARGs */
static int
instrsize(unsigned int oparg)
{
return oparg <= 0xff ? 1 :
oparg <= 0xffff ? 2 :
oparg <= 0xffffff ? 3 :
4;
}
/* Spits out op/oparg pair using ilen bytes. codestr should be pointed at the
desired location of the first EXTENDED_ARG */
static void
write_op_arg(_Py_CODEUNIT *codestr, unsigned char opcode,
unsigned int oparg, int ilen)
{
switch (ilen) {
case 4:
*codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 24) & 0xff);
case 3:
*codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 16) & 0xff);
case 2:
*codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 8) & 0xff);
case 1:
*codestr++ = PACKOPARG(opcode, oparg & 0xff);
break;
default:
assert(0);
}
}
Computing file changes ...