Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
676ab98b
Commit
676ab98b
authored
Apr 30, 2015
by
Travis Hance
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify the loadConst function, it doesn't need to initialize in a register
parent
e3850872
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
11 deletions
+1
-11
src/asm_writing/rewriter.cpp
src/asm_writing/rewriter.cpp
+0
-10
src/asm_writing/rewriter.h
src/asm_writing/rewriter.h
+1
-1
No files found.
src/asm_writing/rewriter.cpp
View file @
676ab98b
...
@@ -620,21 +620,11 @@ RewriterVar* Rewriter::loadConst(int64_t val, Location dest) {
...
@@ -620,21 +620,11 @@ RewriterVar* Rewriter::loadConst(int64_t val, Location dest) {
return
var
;
return
var
;
}
else
{
}
else
{
RewriterVar
*
result
=
createNewConstantVar
(
val
);
RewriterVar
*
result
=
createNewConstantVar
(
val
);
addAction
([
=
]()
{
this
->
_loadConst
(
result
,
val
,
dest
);
},
{},
ActionType
::
NORMAL
);
const_loader_var
=
result
;
const_loader_var
=
result
;
return
result
;
return
result
;
}
}
}
}
void
Rewriter
::
_loadConst
(
RewriterVar
*
result
,
int64_t
val
,
Location
dest
)
{
assembler
::
Register
reg
=
allocReg
(
dest
);
const_loader
.
loadConstIntoReg
(
val
,
reg
);
result
->
initializeInReg
(
reg
);
result
->
releaseIfNoUses
();
assertConsistent
();
}
RewriterVar
*
Rewriter
::
call
(
bool
can_call_into_python
,
void
*
func_addr
)
{
RewriterVar
*
Rewriter
::
call
(
bool
can_call_into_python
,
void
*
func_addr
)
{
RewriterVar
::
SmallVector
args
;
RewriterVar
::
SmallVector
args
;
RewriterVar
::
SmallVector
args_xmm
;
RewriterVar
::
SmallVector
args_xmm
;
...
...
src/asm_writing/rewriter.h
View file @
676ab98b
...
@@ -420,7 +420,7 @@ private:
...
@@ -420,7 +420,7 @@ private:
bool
finishAssembly
(
ICSlotInfo
*
picked_slot
,
int
continue_offset
)
override
;
bool
finishAssembly
(
ICSlotInfo
*
picked_slot
,
int
continue_offset
)
override
;
void
_trap
();
void
_trap
();
void
_loadConst
(
RewriterVar
*
result
,
int64_t
val
,
Location
loc
);
void
_loadConst
(
RewriterVar
*
result
,
int64_t
val
);
void
_call
(
RewriterVar
*
result
,
bool
can_call_into_python
,
void
*
func_addr
,
const
RewriterVar
::
SmallVector
&
args
,
void
_call
(
RewriterVar
*
result
,
bool
can_call_into_python
,
void
*
func_addr
,
const
RewriterVar
::
SmallVector
&
args
,
const
RewriterVar
::
SmallVector
&
args_xmm
);
const
RewriterVar
::
SmallVector
&
args_xmm
);
void
_add
(
RewriterVar
*
result
,
RewriterVar
*
a
,
int64_t
b
,
Location
dest
);
void
_add
(
RewriterVar
*
result
,
RewriterVar
*
a
,
int64_t
b
,
Location
dest
);
...
...
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