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
ac3dedc2
Commit
ac3dedc2
authored
Jul 07, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch some more things to DenseMap
parent
7fd78399
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
src/analysis/scoping_analysis.h
src/analysis/scoping_analysis.h
+5
-3
src/asm_writing/rewriter.cpp
src/asm_writing/rewriter.cpp
+3
-2
No files found.
src/analysis/scoping_analysis.h
View file @
ac3dedc2
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#ifndef PYSTON_ANALYSIS_SCOPINGANALYSIS_H
#ifndef PYSTON_ANALYSIS_SCOPINGANALYSIS_H
#define PYSTON_ANALYSIS_SCOPINGANALYSIS_H
#define PYSTON_ANALYSIS_SCOPINGANALYSIS_H
#include "llvm/ADT/DenseMap.h"
#include "core/common.h"
#include "core/common.h"
#include "core/stringpool.h"
#include "core/stringpool.h"
...
@@ -146,14 +148,14 @@ public:
...
@@ -146,14 +148,14 @@ public:
class
ScopingAnalysis
{
class
ScopingAnalysis
{
public:
public:
struct
ScopeNameUsage
;
struct
ScopeNameUsage
;
typedef
std
::
unordered_m
ap
<
AST
*
,
ScopeNameUsage
*>
NameUsageMap
;
typedef
llvm
::
DenseM
ap
<
AST
*
,
ScopeNameUsage
*>
NameUsageMap
;
private:
private:
std
::
unordered_m
ap
<
AST
*
,
ScopeInfo
*>
scopes
;
llvm
::
DenseM
ap
<
AST
*
,
ScopeInfo
*>
scopes
;
AST_Module
*
parent_module
;
AST_Module
*
parent_module
;
InternedStringPool
*
interned_strings
;
InternedStringPool
*
interned_strings
;
std
::
unordered_m
ap
<
AST
*
,
AST
*>
scope_replacements
;
llvm
::
DenseM
ap
<
AST
*
,
AST
*>
scope_replacements
;
ScopeInfo
*
analyzeSubtree
(
AST
*
node
);
ScopeInfo
*
analyzeSubtree
(
AST
*
node
);
void
processNameUsages
(
NameUsageMap
*
usages
);
void
processNameUsages
(
NameUsageMap
*
usages
);
...
...
src/asm_writing/rewriter.cpp
View file @
ac3dedc2
...
@@ -186,8 +186,9 @@ void Rewriter::ConstLoader::moveImmediate(uint64_t val, assembler::Register dst_
...
@@ -186,8 +186,9 @@ void Rewriter::ConstLoader::moveImmediate(uint64_t val, assembler::Register dst_
assembler
::
Register
Rewriter
::
ConstLoader
::
findConst
(
uint64_t
val
,
bool
&
found_value
)
{
assembler
::
Register
Rewriter
::
ConstLoader
::
findConst
(
uint64_t
val
,
bool
&
found_value
)
{
assert
(
rewriter
->
phase_emitting
);
assert
(
rewriter
->
phase_emitting
);
if
(
constToVar
.
count
(
val
)
>
0
)
{
auto
it
=
constToVar
.
find
(
val
);
RewriterVar
*
var
=
constToVar
[
val
];
if
(
it
!=
constToVar
.
end
())
{
RewriterVar
*
var
=
it
->
second
;
for
(
Location
l
:
var
->
locations
)
{
for
(
Location
l
:
var
->
locations
)
{
if
(
l
.
type
==
Location
::
Register
)
{
if
(
l
.
type
==
Location
::
Register
)
{
found_value
=
true
;
found_value
=
true
;
...
...
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