}
-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,
}
-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());
// 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.
// 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();
}
*/
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);
#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"
#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
length, NULL);
}
- if (capacity == NULL) {
- capacity = AddLoadFixedArrayLength(to_elements);
- }
-
LoopBuilder builder(this, context(), LoopBuilder::kPostDecrement);
HValue* key = builder.BeginBody(length, graph()->GetConstant0(),
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;
// 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);
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) {
HEnvironment* start_environment() const { return start_environment_; }
void FinalizeUniqueness();
- bool ProcessArgumentsObject();
void OrderBlocks();
void AssignDominators();
void RestoreActualValues();
phase.Run();
}
- void EliminateRedundantBoundsChecksUsingInductionVariables();
-
Isolate* isolate_;
int next_block_id_;
HBasicBlock* entry_block_;
void VisitLogicalExpression(BinaryOperation* expr);
void VisitArithmeticExpression(BinaryOperation* expr);
- bool PreProcessOsrEntry(IterationStatement* statement);
void VisitLoopBody(IterationStatement* stmt,
HBasicBlock* loop_entry);
#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 {
}
-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();
bool LoadIsUninitialized(TypeFeedbackId id);
bool StoreIsUninitialized(TypeFeedbackId id);
- bool StoreIsKeyedPolymorphic(TypeFeedbackId id);
bool CallIsMonomorphic(int slot);
bool CallIsMonomorphic(TypeFeedbackId aid);
bool KeyedArrayCallIsHoley(TypeFeedbackId id);
}
DCHECK_EQ(1 << bits, original_x);
return bits;
- return 0;
}