Reviewers: Yang,
Message:
Some fallout from the last round of bug investigations. PTAL.
Description:
Drop some unused code
Bonus: fix bitrot in (disabled) Hydrogen-BCH
Please review this at https://codereview.chromium.org/623513002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -53 lines):
M src/accessors.h
M src/accessors.cc
M src/hydrogen.h
M src/hydrogen.cc
M src/hydrogen-bch.cc
M src/hydrogen-instructions.cc
M src/type-info.h
M src/type-info.cc
M src/utils.h
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index
011372cbff7f237ed06d526369fffb04a4e0e1cb..9bd6e5bb2c1b9bba335606f1ce6e3c1f47c04e92
100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -56,17 +56,6 @@ Handle<ExecutableAccessorInfo> Accessors::CloneAccessor(
}
-template <class C>
-static C* FindInstanceOf(Isolate* isolate, Object* obj) {
- for (PrototypeIterator iter(isolate, obj,
- PrototypeIterator::START_AT_RECEIVER);
- !iter.IsAtEnd(); iter.Advance()) {
- if (Is<C>(iter.GetCurrent())) return C::cast(iter.GetCurrent());
- }
- return NULL;
-}
-
-
static V8_INLINE bool CheckForName(Handle<Name> name,
Handle<String> property_name,
int offset,
@@ -916,11 +905,6 @@ static Handle<Object> SetFunctionPrototype(Isolate*
isolate,
}
-Handle<Object> Accessors::FunctionGetPrototype(Handle<JSFunction>
function) {
- return GetFunctionPrototype(function->GetIsolate(), function);
-}
-
-
Handle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function,
Handle<Object> prototype) {
DCHECK(function->should_have_prototype());
Index: src/accessors.h
diff --git a/src/accessors.h b/src/accessors.h
index
8fc1f84be3d6ea898507a89fcc8ddd882c2013f2..1677c1da3b4c85968d0b23e94e11fe3682942574
100644
--- a/src/accessors.h
+++ b/src/accessors.h
@@ -68,7 +68,6 @@ class Accessors : public AllStatic {
// Accessor functions called directly from the runtime system.
static Handle<Object> FunctionSetPrototype(Handle<JSFunction> object,
Handle<Object> value);
- static Handle<Object> FunctionGetPrototype(Handle<JSFunction> object);
static Handle<Object> FunctionGetArguments(Handle<JSFunction> object);
// Accessor infos.
Index: src/hydrogen-bch.cc
diff --git a/src/hydrogen-bch.cc b/src/hydrogen-bch.cc
index
5af6030346a56a588d4a9a24b48fd55b1f1b0ac3..2feb1587f8ef6344b6b07072f0a9a3a7966e6ad7
100644
--- a/src/hydrogen-bch.cc
+++ b/src/hydrogen-bch.cc
@@ -237,14 +237,13 @@ class InductionVariableBlocksTable BASE_EMBEDDED {
// constant limit we will use that instead of the induction limit.
bool has_upper_constant_limit = true;
int32_t upper_constant_limit =
- check != NULL && check->HasUpperLimit() ? check->upper_limit() : 0;
+ check->HasUpperLimit() ? check->upper_limit() : 0;
for (InductionVariableData::InductionVariableCheck* current_check =
check;
current_check != NULL;
current_check = current_check->next()) {
has_upper_constant_limit =
- has_upper_constant_limit &&
- check->HasUpperLimit() &&
- check->upper_limit() == upper_constant_limit;
+ has_upper_constant_limit && current_check->HasUpperLimit() &&
+ current_check->upper_limit() == upper_constant_limit;
counters()->bounds_checks_eliminated()->Increment();
current_check->check()->set_skip_check();
}
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
eb6d4f0a1d9ef755eaeb15a8196d58f30f2ddb01..1544bad992b5dd11f051916b4c88f2fbe4ced788
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -2211,7 +2211,7 @@ void
InductionVariableData::ChecksRelatedToLength::AddCheck(
*/
int32_t InductionVariableData::ComputeIncrement(HPhi* phi,
HValue* phi_operand) {
- if (!phi_operand->representation().IsInteger32()) return 0;
+ if (!phi_operand->representation().IsSmiOrInteger32()) return 0;
if (phi_operand->IsAdd()) {
HAdd* operation = HAdd::cast(phi_operand);
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
e1e3af2f1e54c05d49273672abfea60278335133..54adfea6c06b2b470bf65c5eb09e535669a51f93
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4,15 +4,12 @@
#include "src/hydrogen.h"
-#include <algorithm>
#include <sstream>
#include "src/v8.h"
#include "src/allocation-site-scopes.h"
-#include "src/codegen.h"
#include "src/full-codegen.h"
-#include "src/hashmap.h"
#include "src/hydrogen-bce.h"
#include "src/hydrogen-bch.h"
#include "src/hydrogen-canonicalize.h"
@@ -43,7 +40,6 @@
#include "src/parser.h"
#include "src/runtime/runtime.h"
#include "src/scopeinfo.h"
-#include "src/scopes.h"
#include "src/typing.h"
#if V8_TARGET_ARCH_IA32
@@ -2903,10 +2899,6 @@ void HGraphBuilder::BuildCopyElements(HValue*
from_elements,
length, NULL);
}
- if (capacity == NULL) {
- capacity = AddLoadFixedArrayLength(to_elements);
- }
-
LoopBuilder builder(this, context(), LoopBuilder::kPostDecrement);
HValue* key = builder.BeginBody(length, graph()->GetConstant0(),
@@ -6313,7 +6305,7 @@ void
HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess(
HControlInstruction* smi_check = NULL;
handled_string = false;
- for (int i = 0; i < types->length() && count < kMaxLoadPolymorphism;
++i) {
+ for (i = 0; i < types->length() && count < kMaxLoadPolymorphism; ++i) {
PropertyAccessInfo info(this, access_type, ToType(types->at(i)), name);
if (info.type()->Is(Type::String())) {
if (handled_string) continue;
@@ -6391,7 +6383,7 @@ void
HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess(
// know about and do not want to handle ones we've never seen. Otherwise
// use a generic IC.
if (count == types->length() && FLAG_deoptimize_uncommon_cases) {
- FinishExitWithHardDeoptimization("Uknown map in polymorphic access");
+ FinishExitWithHardDeoptimization("Unknown map in polymorphic access");
} else {
HInstruction* instr = BuildNamedGeneric(access_type, expr, object,
name,
value);
@@ -9111,7 +9103,6 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) {
LookupIterator::OWN_SKIP_INTERCEPTOR);
GlobalPropertyAccess type = LookupGlobalProperty(var, &it, LOAD);
if (type == kUseCell) {
- Handle<GlobalObject> global(current_info()->global_object());
known_global_function = expr->ComputeGlobalTarget(global, &it);
}
if (known_global_function) {
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index
5c34b683d22c4d6d8f6a98780af32e2bbaee4e9d..29885b333999f44940416a1937f1575a2d5b6ca9
100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -315,7 +315,6 @@ class HGraph FINAL : public ZoneObject {
HEnvironment* start_environment() const { return start_environment_; }
void FinalizeUniqueness();
- bool ProcessArgumentsObject();
void OrderBlocks();
void AssignDominators();
void RestoreActualValues();
@@ -479,8 +478,6 @@ class HGraph FINAL : public ZoneObject {
phase.Run();
}
- void EliminateRedundantBoundsChecksUsingInductionVariables();
-
Isolate* isolate_;
int next_block_id_;
HBasicBlock* entry_block_;
@@ -2204,7 +2201,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
public AstVisitor {
void VisitLogicalExpression(BinaryOperation* expr);
void VisitArithmeticExpression(BinaryOperation* expr);
- bool PreProcessOsrEntry(IterationStatement* statement);
void VisitLoopBody(IterationStatement* stmt,
HBasicBlock* loop_entry);
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index
cf3950f4f01b2af65111bb10c5e02b93a33bc796..5b9a71dcb9bae6dc5aed3cc78f301ba27cb08175
100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -9,11 +9,8 @@
#include "src/compiler.h"
#include "src/ic/ic.h"
#include "src/ic/stub-cache.h"
-#include "src/macro-assembler.h"
#include "src/type-info.h"
-#include "src/objects-inl.h"
-
namespace v8 {
namespace internal {
@@ -81,17 +78,6 @@ bool
TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) {
}
-bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) {
- Handle<Object> maybe_code = GetInfo(ast_id);
- if (maybe_code->IsCode()) {
- Handle<Code> code = Handle<Code>::cast(maybe_code);
- return code->is_keyed_store_stub() &&
- code->ic_state() == POLYMORPHIC;
- }
- return false;
-}
-
-
bool TypeFeedbackOracle::CallIsMonomorphic(int slot) {
Handle<Object> value = GetInfo(slot);
return value->IsAllocationSite() || value->IsJSFunction();
Index: src/type-info.h
diff --git a/src/type-info.h b/src/type-info.h
index
434ddd675983b6457aa325b0bb3d2f9e2ae41560..1343e0a76bf865015b93a3343946cb22e4d4a51a
100644
--- a/src/type-info.h
+++ b/src/type-info.h
@@ -25,7 +25,6 @@ class TypeFeedbackOracle: public ZoneObject {
bool LoadIsUninitialized(TypeFeedbackId id);
bool StoreIsUninitialized(TypeFeedbackId id);
- bool StoreIsKeyedPolymorphic(TypeFeedbackId id);
bool CallIsMonomorphic(int slot);
bool CallIsMonomorphic(TypeFeedbackId aid);
bool KeyedArrayCallIsHoley(TypeFeedbackId id);
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index
2991815e576310cdf112297087b6526d24c96459..ad8c020ca61d91fa98ac5860266a12f0d8896db9
100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -61,7 +61,6 @@ inline int WhichPowerOf2(uint32_t x) {
}
DCHECK_EQ(1 << bits, original_x);
return bits;
- return 0;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.