コード例 #1
0
def read_timestamp():
    # Returns a longlong on 32-bit, and a regular int on 64-bit.
    # When running on top of python, build the result a bit arbitrarily.
    x = long(time.time() * 500000000)
    if _is_64_bit:
        return intmask(x)
    else:
        return longlongmask(x)
コード例 #2
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def ldiv(vm, frame, offset, bytecode):
    b, a = frame.pop(), frame.pop()
    frame.push(longlongmask(a) / longlongmask(b))
コード例 #3
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lmul(vm, frame, offset, bytecode):
    a, b = frame.pop(), frame.pop()
    assert isinstance(a, (int, long)) and isinstance(b, (int, long))
    frame.push(longlongmask(a * b))
コード例 #4
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lstore_n(vm, frame, offset, bytecode):
    local = frame.pop()
    frame.insert_local(offset, longlongmask(local))
コード例 #5
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lreturn(vm, frame, offset, bytecode):
    return_value = long(frame.pop())
    #assert not len(frame.stack)
    frame.return_value = longlongmask(return_value)
コード例 #6
0
ファイル: test_typed.py プロジェクト: soIu/rpython
 def func(n):
     m = r_ulonglong(n)
     m *= 100000
     return longlongmask(m)
コード例 #7
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lushr(vm, frame, offset, bytecode):
    shift, value = frame.pop(), frame.pop()
    assert 0 <= shift <= 63
    frame.push(longlongmask(value >> shift))
コード例 #8
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lushr(vm, frame, offset, bytecode):
    shift, value = frame.pop(), frame.pop()
    assert 0 <= shift <= 63
    frame.push(longlongmask(value >> shift))
コード例 #9
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def land(vm, frame, offset, bytecode):
    a, b = frame.pop(), frame.pop()
    assert isinstance(a, (long, int)) and isinstance(b, (long, int)), 'Mismatched type "%s", "%s"' % (a, b)
    frame.push(longlongmask(a&b))
コード例 #10
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lshl(vm, frame, offset, bytecode):
    shift, value = frame.pop(), frame.pop()
    assert 0 <= shift <= 63
    frame.push(longlongmask(long(value) << shift))
コード例 #11
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def ldiv(vm, frame, offset, bytecode):
    b, a = frame.pop(), frame.pop()
    frame.push(longlongmask(a)/longlongmask(b))
コード例 #12
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lmul(vm, frame, offset, bytecode):
    a, b = frame.pop(), frame.pop()
    assert isinstance(a, (int, long)) and isinstance(b, (int, long))
    frame.push(longlongmask(a*b))
コード例 #13
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def ladd(vm, frame, offset, bytecode):
    frame.push(longlongmask(longlongmask(frame.pop())+longlongmask(frame.pop())))
コード例 #14
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def land(vm, frame, offset, bytecode):
    a, b = frame.pop(), frame.pop()
    assert isinstance(a, (long, int)) and isinstance(
        b, (long, int)), 'Mismatched type "%s", "%s"' % (a, b)
    frame.push(longlongmask(a & b))
コード例 #15
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lxor(vm, frame, offset, bytecode):
    val1, val2 = frame.pop(), frame.pop()
    frame.push(longlongmask(val1 ^ val2))
コード例 #16
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lshl(vm, frame, offset, bytecode):
    shift, value = frame.pop(), frame.pop()
    assert 0 <= shift <= 63
    frame.push(longlongmask(long(value) << shift))
コード例 #17
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lreturn(vm, frame, offset, bytecode):
    return_value = long(frame.pop())
    #assert not len(frame.stack)
    frame.return_value = longlongmask(return_value)
コード例 #18
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lxor(vm, frame, offset, bytecode):
    val1, val2 = frame.pop(), frame.pop()
    frame.push(longlongmask(val1 ^ val2))
コード例 #19
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lload_n(vm, frame, offset, bytecode):
    local = frame.get_local(offset)
    frame.push(longlongmask(local))
コード例 #20
0
ファイル: test_typed.py プロジェクト: charred/pypy
 def func(n):
     m = r_ulonglong(n)
     m *= 100000
     return longlongmask(m)
コード例 #21
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lstore_n(vm, frame, offset, bytecode):
    local = frame.pop()
    frame.insert_local(offset, longlongmask(local))
コード例 #22
0
ファイル: ieee.py プロジェクト: yuanleilei/pypy
def pack_float(wbuf, pos, x, size, be):
    unsigned = float_pack(x, size)
    value = rarithmetic.longlongmask(unsigned)
    pack_float_to_buffer(wbuf, pos, value, size, be)
コード例 #23
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def ladd(vm, frame, offset, bytecode):
    frame.push(
        longlongmask(longlongmask(frame.pop()) + longlongmask(frame.pop())))
コード例 #24
0
 def f(x=r_ulonglong):
     try:
         return longlongmask(x)
     except ValueError:
         return 0
コード例 #25
0
ファイル: bytecode.py プロジェクト: MrHamdulay/myjvm
def lload_n(vm, frame, offset, bytecode):
    local = frame.get_local(offset)
    frame.push(longlongmask(local))