Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: src/data-flow.cc

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/data-flow.h ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/data-flow.cc
diff --git a/src/data-flow.cc b/src/data-flow.cc
index be824460f0a1fb1b559cccc89391912c84ff784c..9c02ff48e10211ca4cc8df5c9db6cf6192463584 100644
--- a/src/data-flow.cc
+++ b/src/data-flow.cc
@@ -33,7 +33,6 @@
namespace v8 {
namespace internal {
-
#ifdef DEBUG
void BitVector::Print() {
bool first = true;
@@ -50,13 +49,39 @@ void BitVector::Print() {
#endif
+void BitVector::Iterator::Advance() {
+ current_++;
+ uint32_t val = current_value_;
+ while (val == 0) {
+ current_index_++;
+ if (Done()) return;
+ val = target_->data_[current_index_];
+ current_ = current_index_ << 5;
+ }
+ val = SkipZeroBytes(val);
+ val = SkipZeroBits(val);
+ current_value_ = val >> 1;
+}
+
+
bool AssignedVariablesAnalyzer::Analyze(CompilationInfo* info) {
- info_ = info;
Scope* scope = info->scope();
- int variables = scope->num_parameters() + scope->num_stack_slots();
- if (variables == 0) return true;
- av_.ExpandTo(variables);
- VisitStatements(info->function()->body());
+ int size = scope->num_parameters() + scope->num_stack_slots();
+ if (size == 0) return true;
+ AssignedVariablesAnalyzer analyzer(info, size);
+ return analyzer.Analyze();
+}
+
+
+AssignedVariablesAnalyzer::AssignedVariablesAnalyzer(CompilationInfo* info,
+ int size)
+ : info_(info), av_(size) {
+}
+
+
+bool AssignedVariablesAnalyzer::Analyze() {
+ ASSERT(av_.length() > 0);
+ VisitStatements(info_->function()->body());
return !HasStackOverflow();
}
@@ -318,11 +343,6 @@ void AssignedVariablesAnalyzer::VisitConditional(Conditional* expr) {
}
-void AssignedVariablesAnalyzer::VisitSlot(Slot* expr) {
- UNREACHABLE();
-}
-
-
void AssignedVariablesAnalyzer::VisitVariableProxy(VariableProxy* expr) {
// Nothing to do.
ASSERT(av_.IsEmpty());
« no previous file with comments | « src/data-flow.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698