Author: Brian Kearns <[email protected]>
Branch:
Changeset: r73321:3bf469df25da
Date: 2014-09-05 13:46 -0400
http://bitbucket.org/pypy/pypy/changeset/3bf469df25da/
Log: these seem obsolete for rpython-level OSError
diff --git a/rpython/rtyper/exceptiondata.py b/rpython/rtyper/exceptiondata.py
--- a/rpython/rtyper/exceptiondata.py
+++ b/rpython/rtyper/exceptiondata.py
@@ -44,13 +44,6 @@
classdef = bk.getuniqueclassdef(cls)
rclass.getclassrepr(rtyper, classdef).setup()
- def make_raise_OSError(self, rtyper):
- # ll_raise_OSError(errno)
- def ll_raise_OSError(errno):
- raise OSError(errno, None)
- helper_fn = rtyper.annotate_helper_fn(ll_raise_OSError,
[annmodel.SomeInteger()])
- return helper_fn
-
def get_standard_ll_exc_instance(self, rtyper, clsdef):
from rpython.rtyper.lltypesystem.rclass import getinstancerepr
r_inst = getinstancerepr(rtyper, clsdef)
@@ -69,7 +62,6 @@
# create helper functionptrs
self.fn_exception_match = self.make_exception_matcher(rtyper)
self.fn_type_of_exc_inst = self.make_type_of_exc_inst(rtyper)
- self.fn_raise_OSError = self.make_raise_OSError(rtyper)
def make_exception_matcher(self, rtyper):
# ll_exception_matcher(real_exception_vtable, match_exception_vtable)
diff --git a/rpython/rtyper/llinterp.py b/rpython/rtyper/llinterp.py
--- a/rpython/rtyper/llinterp.py
+++ b/rpython/rtyper/llinterp.py
@@ -441,12 +441,8 @@
extraargs = ()
typer = self.llinterpreter.typer
exdata = typer.exceptiondata
- if isinstance(exc, OSError):
- self.op_direct_call(exdata.fn_raise_OSError, exc.errno)
- assert False, "op_direct_call above should have raised"
- else:
- evalue =
exdata.get_standard_ll_exc_instance_by_class(exc.__class__)
- etype = self.op_direct_call(exdata.fn_type_of_exc_inst, evalue)
+ evalue = exdata.get_standard_ll_exc_instance_by_class(exc.__class__)
+ etype = self.op_direct_call(exdata.fn_type_of_exc_inst, evalue)
raise LLException(etype, evalue, *extraargs)
def invoke_callable_with_pyexceptions(self, fptr, *args):
diff --git a/rpython/translator/c/extfunc.py b/rpython/translator/c/extfunc.py
--- a/rpython/translator/c/extfunc.py
+++ b/rpython/translator/c/extfunc.py
@@ -90,7 +90,6 @@
yield ('RPYTHON_EXCEPTION_MATCH', exceptiondata.fn_exception_match)
yield ('RPYTHON_TYPE_OF_EXC_INST', exceptiondata.fn_type_of_exc_inst)
- yield ('RPYTHON_RAISE_OSERROR', exceptiondata.fn_raise_OSError)
yield ('RPyExceptionOccurred1', exctransformer.rpyexc_occured_ptr.value)
yield ('RPyFetchExceptionType',
exctransformer.rpyexc_fetch_type_ptr.value)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit