Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/compiler/bytecode-branch-analysis.h b/src/compiler/bytecode-branch-analysis.h
index 0ef33b6..7d32da8 100644
--- a/src/compiler/bytecode-branch-analysis.h
+++ b/src/compiler/bytecode-branch-analysis.h
@@ -7,7 +7,6 @@
#include "src/bit-vector.h"
#include "src/handles.h"
-#include "src/zone-containers.h"
namespace v8 {
namespace internal {
@@ -16,15 +15,13 @@
namespace compiler {
-class BytecodeBranchInfo;
-
-// A class for identifying the branch targets and their branch sites
-// within a bytecode array and also identifying which bytecodes are
-// reachable. This information can be used to construct the local
-// control flow logic for high-level IR graphs built from bytecode.
+// A class for identifying branch targets within a bytecode array.
+// This information can be used to construct the local control flow
+// logic for high-level IR graphs built from bytecode.
//
-// NB This class relies on the only backwards branches in bytecode
-// being jumps back to loop headers.
+// N.B. If this class is used to determine loop headers, then such a
+// usage relies on the only backwards branches in bytecode being jumps
+// back to loop headers.
class BytecodeBranchAnalysis BASE_EMBEDDED {
public:
BytecodeBranchAnalysis(Handle<BytecodeArray> bytecode_array, Zone* zone);
@@ -34,27 +31,16 @@
// until this has been called.
void Analyze();
- // Offsets of bytecodes having a backward branch to the bytecode at |offset|.
- const ZoneVector<int>* BackwardBranchesTargetting(int offset) const;
-
- // Offsets of bytecodes having a forward branch to the bytecode at |offset|.
- const ZoneVector<int>* ForwardBranchesTargetting(int offset) const;
-
- // Returns true if the bytecode at |offset| is reachable.
- bool is_reachable(int offset) const { return reachable_.Contains(offset); }
-
// Returns true if there are any forward branches to the bytecode at
// |offset|.
bool forward_branches_target(int offset) const {
- const ZoneVector<int>* sites = ForwardBranchesTargetting(offset);
- return sites != nullptr && sites->size() > 0;
+ return is_forward_target_.Contains(offset);
}
// Returns true if there are any backward branches to the bytecode
// at |offset|.
bool backward_branches_target(int offset) const {
- const ZoneVector<int>* sites = BackwardBranchesTargetting(offset);
- return sites != nullptr && sites->size() > 0;
+ return is_backward_target_.Contains(offset);
}
private:
@@ -63,9 +49,9 @@
Zone* zone() const { return zone_; }
Handle<BytecodeArray> bytecode_array() const { return bytecode_array_; }
- ZoneMap<int, BytecodeBranchInfo*> branch_infos_;
Handle<BytecodeArray> bytecode_array_;
- BitVector reachable_;
+ BitVector is_backward_target_;
+ BitVector is_forward_target_;
Zone* zone_;
DISALLOW_COPY_AND_ASSIGN(BytecodeBranchAnalysis);