Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
7308254f
Commit
7308254f
authored
Jun 19, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now handles the case of pipeline raising exception correctly
parent
1ccf0b8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+9
-6
No files found.
Cython/Compiler/Main.py
View file @
7308254f
...
...
@@ -325,15 +325,15 @@ def create_parse(context):
return
tree
return
parse
def
create_generate_code
(
context
,
options
):
def
create_generate_code
(
context
,
options
,
result
):
def
generate_code
(
module_node
):
scope
=
module_node
.
scope
result
=
create_default_resultobj
(
module_node
.
compilation_source
,
options
)
module_node
.
process_implementation
(
options
,
result
)
result
.
compilation_source
=
module_node
.
compilation_source
return
result
return
generate_code
def
create_default_pipeline
(
context
,
options
):
def
create_default_pipeline
(
context
,
options
,
result
):
from
ParseTreeTransforms
import
WithTransform
,
PostParse
from
ParseTreeTransforms
import
AnalyseDeclarationsTransform
,
AnalyseExpressionsTransform
from
ModuleNode
import
check_c_classes
...
...
@@ -345,7 +345,7 @@ def create_default_pipeline(context, options):
AnalyseDeclarationsTransform
(),
check_c_classes
,
AnalyseExpressionsTransform
(),
create_generate_code
(
context
,
options
)
create_generate_code
(
context
,
options
,
result
)
]
def
create_default_resultobj
(
compilation_source
,
options
):
...
...
@@ -380,11 +380,14 @@ def run_pipeline(source, options, full_module_name = None):
full_module_name
=
full_module_name
or
context
.
extract_module_name
(
source
,
options
)
source
=
CompilationSource
(
source_desc
,
full_module_name
,
cwd
)
# Set up result object
result
=
create_default_resultobj
(
source
,
options
)
# Get pipeline
pipeline
=
create_default_pipeline
(
context
,
options
)
pipeline
=
create_default_pipeline
(
context
,
options
,
result
)
context
.
setup_errors
(
options
)
errors_occurred
,
result
=
context
.
run_pipeline
(
pipeline
,
source
)
errors_occurred
,
enddata
=
context
.
run_pipeline
(
pipeline
,
source
)
context
.
teardown_errors
(
errors_occurred
,
options
,
result
)
return
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment