5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_
31 class HInferRepresentationPhase;
33 class HLoopInformation;
34 class HStoreNamedField;
40 #define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \
41 V(ArithmeticBinaryOperation) \
43 V(BitwiseBinaryOperation) \
44 V(ControlInstruction) \
48 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \
50 V(AccessArgumentsAt) \
52 V(AllocateBlockContext) \
55 V(ArgumentsElements) \
61 V(BoundsCheckBaseIndexInformation) \
63 V(CallWithDescriptor) \
73 V(CheckInstanceType) \
79 V(ClassOfTestAndBranch) \
80 V(CompareNumericAndBranch) \
81 V(CompareHoleAndBranch) \
83 V(CompareMinusZeroAndBranch) \
84 V(CompareObjectEqAndBranch) \
97 V(EnvironmentMarker) \
98 V(ForceRepresentation) \
102 V(GetCachedArrayIndex) \
104 V(HasCachedArrayIndexAndBranch) \
105 V(HasInstanceTypeAndBranch) \
106 V(InnerAllocatedObject) \
108 V(InstanceOfKnownGlobal) \
110 V(IsConstructCallAndBranch) \
111 V(IsObjectAndBranch) \
112 V(IsStringAndBranch) \
114 V(IsUndetectableAndBranch) \
117 V(LoadFieldByIndex) \
118 V(LoadFunctionPrototype) \
120 V(LoadGlobalGeneric) \
122 V(LoadKeyedGeneric) \
124 V(LoadNamedGeneric) \
139 V(SeqStringGetChar) \
140 V(SeqStringSetChar) \
146 V(StoreContextSlot) \
147 V(StoreFrameContext) \
150 V(StoreKeyedGeneric) \
152 V(StoreNamedGeneric) \
154 V(StringCharCodeAt) \
155 V(StringCharFromCode) \
156 V(StringCompareAndBranch) \
158 V(TailCallThroughMegamorphicCache) \
160 V(ToFastProperties) \
161 V(TransitionElementsKind) \
162 V(TrapAllocationMemento) \
164 V(TypeofIsAndBranch) \
165 V(UnaryMathOperation) \
170 #define GVN_TRACKED_FLAG_LIST(V) \
173 #define GVN_UNTRACKED_FLAG_LIST(V) \
177 V(BackingStoreFields) \
180 V(DoubleArrayElements) \
190 V(TypedArrayElements)
193 #define DECLARE_ABSTRACT_INSTRUCTION(type) \
194 virtual bool Is##type() const FINAL OVERRIDE { return true; } \
195 static H##type* cast(HValue* value) { \
196 DCHECK(value->Is##type()); \
197 return reinterpret_cast<H##type*>(value); \
201 #define DECLARE_CONCRETE_INSTRUCTION(type) \
202 virtual LInstruction* CompileToLithium( \
203 LChunkBuilder* builder) FINAL OVERRIDE; \
204 static H##type* cast(HValue* value) { \
205 DCHECK(value->Is##type()); \
206 return reinterpret_cast<H##type*>(value); \
208 virtual Opcode opcode() const FINAL OVERRIDE { \
209 return HValue::k##type; \
216 class Range
FINAL :
public ZoneObject {
222 can_be_minus_zero_(
false) { }
228 can_be_minus_zero_(
false) { }
232 Range*
next()
const {
return next_; }
234 return new(zone) Range(
kMinInt, upper_);
237 return new(zone) Range(lower_,
kMaxInt);
240 Range* result =
new(zone) Range(lower_, upper_);
241 result->set_can_be_minus_zero(CanBeMinusZero());
247 bool CanBeZero()
const {
return upper_ >= 0 && lower_ <= 0; }
250 bool Includes(
int value)
const {
return lower_ <= value && upper_ >= value; }
252 return lower_ ==
kMinInt && upper_ ==
kMaxInt && CanBeMinusZero();
350 #define DECLARE_FLAG(Type) k##Type,
354 #define COUNT_FLAG(Type) + 1
377 bool Apply(
HValue* other_base,
int other_offset,
int other_scale = 0) {
380 offset_ = other_offset;
381 scale_ = other_scale;
386 offset_ += other_offset;
387 scale_ = other_scale;
396 swap(&base_, other_base);
397 swap(&offset_, other_offset);
398 swap(&scale_, other_scale);
402 template <
class T>
void swap(
T* a,
T* b) {
436 if (FLAG_hydrogen_track_positions) {
445 if (FLAG_hydrogen_track_positions) {
532 #define DECLARE_OPCODE(type) k##type,
535 #undef DECLARE_OPCODE
540 #define DECLARE_PREDICATE(type) \
541 bool Is##type() const { return opcode() == k##type; }
543 #undef DECLARE_PREDICATE
547 #define DECLARE_PREDICATE(type) \
548 virtual bool Is##type() const { return false; }
550 #undef DECLARE_PREDICATE
553 return IsShl() || IsShr() || IsSar();
563 range_poisoned_(
false),
607 if (t.IsHeapObject())
return r;
743 void PoisonRange() { range_poisoned_ =
true; }
807 virtual void Verify() = 0;
844 if (
type().IsTaggedPrimitive())
return false;
845 if (
type().IsJSObject())
return true;
877 #define ADD_FLAG(Type) result.Add(k##Type);
887 result.
Remove(kOsrEntries);
896 result.
Remove(kNewSpacePromotion);
897 result.
Remove(kElementsKind);
898 result.
Remove(kElementsPointer);
920 bool range_poisoned_;
957 #define DECLARE_INSTRUCTION_FACTORY_P0(I) \
958 static I* New(Zone* zone, HValue* context) { \
959 return new(zone) I(); \
962 #define DECLARE_INSTRUCTION_FACTORY_P1(I, P1) \
963 static I* New(Zone* zone, HValue* context, P1 p1) { \
964 return new(zone) I(p1); \
967 #define DECLARE_INSTRUCTION_FACTORY_P2(I, P1, P2) \
968 static I* New(Zone* zone, HValue* context, P1 p1, P2 p2) { \
969 return new(zone) I(p1, p2); \
972 #define DECLARE_INSTRUCTION_FACTORY_P3(I, P1, P2, P3) \
973 static I* New(Zone* zone, HValue* context, P1 p1, P2 p2, P3 p3) { \
974 return new(zone) I(p1, p2, p3); \
977 #define DECLARE_INSTRUCTION_FACTORY_P4(I, P1, P2, P3, P4) \
978 static I* New(Zone* zone, \
984 return new(zone) I(p1, p2, p3, p4); \
987 #define DECLARE_INSTRUCTION_FACTORY_P5(I, P1, P2, P3, P4, P5) \
988 static I* New(Zone* zone, \
995 return new(zone) I(p1, p2, p3, p4, p5); \
998 #define DECLARE_INSTRUCTION_FACTORY_P6(I, P1, P2, P3, P4, P5, P6) \
999 static I* New(Zone* zone, \
1007 return new(zone) I(p1, p2, p3, p4, p5, p6); \
1010 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P0(I) \
1011 static I* New(Zone* zone, HValue* context) { \
1012 return new(zone) I(context); \
1015 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(I, P1) \
1016 static I* New(Zone* zone, HValue* context, P1 p1) { \
1017 return new(zone) I(context, p1); \
1020 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(I, P1, P2) \
1021 static I* New(Zone* zone, HValue* context, P1 p1, P2 p2) { \
1022 return new(zone) I(context, p1, p2); \
1025 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(I, P1, P2, P3) \
1026 static I* New(Zone* zone, HValue* context, P1 p1, P2 p2, P3 p3) { \
1027 return new(zone) I(context, p1, p2, p3); \
1030 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(I, P1, P2, P3, P4) \
1031 static I* New(Zone* zone, \
1037 return new(zone) I(context, p1, p2, p3, p4); \
1040 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(I, P1, P2, P3, P4, P5) \
1041 static I* New(Zone* zone, \
1048 return new(zone) I(context, p1, p2, p3, p4, p5); \
1086 for (
int i = 0;
i < length;
i++) {
1091 data_ =
reinterpret_cast<intptr_t
>(positions);
1159 instr->InsertBefore(
this);
1166 instr->InsertAfter(
this);
1288 : instr_(instr), current_(0) {}
1290 bool Done() {
return current_ >= instr_->SuccessorCount(); }
1291 HBasicBlock*
Current() {
return instr_->SuccessorAt(current_); }
1300 template<
int S,
int V>
1334 class HDummyUse
FINAL :
public HTemplateInstruction<1> {
1338 SetOperandAt(0, value);
1370 class HGoto
FINAL :
public HTemplateControlInstruction<1, 0> {
1373 SetSuccessorAt(0, target);
1377 *block = FirstSuccessor();
1397 HBasicBlock* unreachable_continuation) {
1398 return new(zone) HDeoptimize(reason, type, unreachable_continuation);
1410 const char*
reason()
const {
return reason_; }
1418 HBasicBlock* unreachable_continuation)
1419 : reason_(reason), type_(type) {
1420 SetSuccessorAt(0, unreachable_continuation);
1444 class HBranch
FINAL :
public HUnaryControlInstruction {
1451 HBasicBlock*, HBasicBlock*);
1463 return expected_input_types_;
1471 HBasicBlock* true_target =
NULL,
1472 HBasicBlock* false_target =
NULL)
1474 expected_input_types_(expected_input_types) {
1475 SetFlag(kAllowUndefinedAsNaN);
1486 HBasicBlock*, HBasicBlock*);
1489 if (known_successor_index() != kNoKnownSuccessorIndex) {
1490 *block = SuccessorAt(known_successor_index());
1499 static const int kNoKnownSuccessorIndex = -1;
1502 known_successor_index_ = known_successor_index;
1520 HBasicBlock* true_target =
NULL,
1521 HBasicBlock* false_target =
NULL)
1523 known_successor_index_(kNoKnownSuccessorIndex),
1524 map_is_stable_(
map->is_stable()),
1538 return new(zone) HContext();
1560 class HReturn
FINAL :
public HTemplateControlInstruction<0, 3> {
1581 SetOperandAt(0, value);
1582 SetOperandAt(1, context);
1583 SetOperandAt(2, parameter_count);
1588 class HAbnormalExit
FINAL :
public HTemplateControlInstruction<0, 0> {
1618 class HUseConst
FINAL :
public HUnaryOperation {
1633 class HForceRepresentation
FINAL :
public HTemplateInstruction<1> {
1641 return representation();
1650 SetOperandAt(0, value);
1651 set_representation(required_representation);
1656 class HChange
FINAL :
public HUnaryOperation {
1660 bool is_truncating_to_smi,
1661 bool is_truncating_to_int32)
1666 set_representation(
to);
1668 SetFlag(kCanOverflow);
1669 if (is_truncating_to_smi &&
to.IsSmi()) {
1670 SetFlag(kTruncatingToSmi);
1671 SetFlag(kTruncatingToInt32);
1673 if (is_truncating_to_int32) SetFlag(kTruncatingToInt32);
1675 set_type(HType::Smi());
1677 set_type(HType::TaggedNumber());
1678 if (
to.IsTagged()) SetChangesFlag(kNewSpacePromotion);
1683 return CheckUsesForFlag(kAllowUndefinedAsNaN);
1692 return CheckFlag(kBailoutOnMinusZero);
1709 return !from().IsTagged() || value()->type().IsSmi();
1714 class HClampToUint8
FINAL :
public HUnaryOperation {
1731 SetFlag(kAllowUndefinedAsNaN);
1739 class HDoubleBits
FINAL :
public HUnaryOperation {
1754 return other->IsDoubleBits() && HDoubleBits::cast(other)->bits() == bits();
1790 SetOperandAt(0,
hi);
1791 SetOperandAt(1,
lo);
1804 class HSimulate
FINAL :
public HInstruction {
1811 pop_count_(pop_count),
1813 assigned_indexes_(2, zone),
1815 removable_(removable),
1816 done_with_replay_(
false) {}
1831 DCHECK(HasAssignedIndexAt(index));
1832 return assigned_indexes_[index];
1835 return assigned_indexes_[index] != kNoIndex;
1838 AddValue(index, value);
1841 AddValue(kNoIndex, value);
1844 for (
int i = 0;
i < assigned_indexes_.length(); ++
i) {
1845 if (assigned_indexes_[
i] == environment_index)
return i;
1851 return values_[index];
1875 values_[index] = value;
1879 static const int kNoIndex = -1;
1881 assigned_indexes_.Add(index, zone_);
1883 values_.Add(
NULL, zone_);
1886 SetOperandAt(values_.length() - 1, value);
1889 for (
int i = 0;
i < assigned_indexes_.length(); ++
i) {
1890 if (assigned_indexes_[
i] == index)
return true;
1918 next_simulate_ = simulate;
1929 DCHECK(closure_.is_null());
1940 : kind_(kind), index_(index), next_simulate_(
NULL) { }
1971 DeleteAndReplaceWith(
NULL);
1982 SetOperandAt(0, context);
1983 SetChangesFlag(kNewSpacePromotion);
1998 class HArgumentsObject;
2002 class HEnterInlined
FINAL :
public HTemplateInstruction<0> {
2006 HConstant* closure_context,
int arguments_count,
2007 FunctionLiteral*
function,
2009 HArgumentsObject* arguments_object) {
2010 return new (zone) HEnterInlined(return_id, closure, closure_context,
2011 arguments_count,
function, inlining_kind,
2012 arguments_var, arguments_object, zone);
2025 FunctionLiteral*
function()
const {
return function_; }
2040 HConstant* closure_context,
int arguments_count,
2042 Variable* arguments_var, HArgumentsObject* arguments_object,
2044 : return_id_(return_id),
2046 closure_context_(closure_context),
2047 arguments_count_(arguments_count),
2048 arguments_pushed_(
false),
2049 function_(function),
2050 inlining_kind_(inlining_kind),
2051 arguments_var_(arguments_var),
2052 arguments_object_(arguments_object),
2053 return_targets_(2, zone) {}
2073 drop_count_(drop_count) { }
2080 return entry_->arguments_pushed() ? -drop_count_ : 0;
2094 return new(zone) HPushArguments(zone);
2097 HPushArguments* instr =
new(zone) HPushArguments(zone);
2098 instr->AddInput(arg1);
2103 HPushArguments* instr =
new(zone) HPushArguments(zone);
2104 instr->AddInput(arg1);
2105 instr->AddInput(arg2);
2110 HPushArguments* instr =
new(zone) HPushArguments(zone);
2111 instr->AddInput(arg1);
2112 instr->AddInput(arg2);
2113 instr->AddInput(arg3);
2118 HPushArguments* instr =
new(zone) HPushArguments(zone);
2119 instr->AddInput(arg1);
2120 instr->AddInput(arg2);
2121 instr->AddInput(arg3);
2122 instr->AddInput(arg4);
2134 return inputs_.length();
2182 class HDeclareGlobals
FINAL :
public HUnaryOperation {
2206 SetAllSideEffects();
2224 return HType::Tagged();
2278 class HCallJSFunction
FINAL :
public HCall<1> {
2284 bool pass_argument_count);
2286 HValue*
function()
const {
return OperandAt(0); }
2299 return has_stack_check_;
2308 bool pass_argument_count,
2309 bool has_stack_check)
2310 :
HCall<1>(argument_count),
2311 pass_argument_count_(pass_argument_count),
2312 has_stack_check_(has_stack_check) {
2313 SetOperandAt(0,
function);
2328 HCallWithDescriptor* res =
new (zone)
2329 HCallWithDescriptor(target, argument_count, descriptor, operands, zone);
2334 return values_.length();
2337 return values_[index];
2345 int par_index = index - 1;
2346 DCHECK(par_index < descriptor_.GetEnvironmentLength());
2347 return descriptor_.GetParameterRepresentation(par_index);
2354 return HType::Tagged();
2358 return argument_count_;
2362 return -argument_count_;
2368 return OperandAt(0);
2378 : descriptor_(descriptor),
2379 values_(descriptor.GetEnvironmentLength() + 1, zone) {
2380 argument_count_ = argument_count;
2381 AddOperand(target, zone);
2382 for (
int i = 0;
i < operands.
length();
i++) {
2383 AddOperand(operands[
i], zone);
2386 this->SetAllSideEffects();
2390 values_.Add(
NULL, zone);
2391 SetOperandAt(values_.length() - 1, v);
2396 values_[index] = value;
2414 known_function_(known_function) {
2415 formal_parameter_count_ = known_function.
is_null()
2416 ? 0 : known_function->shared()->formal_parameter_count();
2417 has_stack_check_ = !known_function.
is_null() &&
2418 (known_function->code()->kind() == Code::FUNCTION ||
2419 known_function->code()->kind() == Code::OPTIMIZED_FUNCTION);
2426 int argument_count) {
2427 return new(zone) HInvokeFunction(context,
function,
2428 known_function, argument_count);
2437 return has_stack_check_;
2445 has_stack_check_(
false) {
2450 bool has_stack_check_;
2466 virtual
int argument_delta() const
OVERRIDE {
return -argument_count(); }
2490 :
HBinaryCall(context, constructor, argument_count) {}
2494 class HCallNewArray
FINAL :
public HBinaryCall {
2513 :
HBinaryCall(context, constructor, argument_count),
2514 elements_kind_(elements_kind) {}
2534 save_doubles_ = save_doubles;
2548 :
HCall<1>(argument_count), c_function_(c_function), name_(
name),
2550 SetOperandAt(0, context);
2577 SetDependsOnFlag(kMaps);
2584 class HUnaryMathOperation
FINAL :
public HTemplateInstruction<2> {
2610 return representation();
2633 HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
2634 return op_ == b->op();
2641 #ifdef V8_TARGET_ARCH_ARM64
2649 SetOperandAt(0, context);
2650 SetOperandAt(1, value);
2654 if (SupportsFlexibleFloorAndRound()) {
2655 SetFlag(kFlexibleRepresentation);
2665 SetFlag(kFlexibleRepresentation);
2668 SetChangesFlag(kNewSpacePromotion);
2681 SetFlag(kAllowUndefinedAsNaN);
2708 HLoadRoot* b = HLoadRoot::cast(other);
2709 return index_ == b->index_;
2718 SetDependsOnFlag(kCalls);
2735 HValue* value, SmallMapList* map_list,
2738 for (
int i = 0;
i < map_list->length(); ++
i) {
2741 return new(zone) HCheckMaps(value, maps, typecheck);
2746 maps_are_stable_ =
true;
2747 has_migration_target_ =
false;
2748 is_stability_check_ =
true;
2749 ClearChangesFlag(kNewSpacePromotion);
2750 ClearDependsOnFlag(kElementsKind);
2751 ClearDependsOnFlag(kMaps);
2760 if (value()->type().IsHeapObject())
return value()->type();
2761 return HType::HeapObject();
2778 static HCheckMaps* CreateAndInsertAfter(
Zone* zone,
2783 return instr->Append(
new(zone) HCheckMaps(
2790 bool maps_are_stable,
2792 return instr->
Prepend(
new(zone) HCheckMaps(value, maps, maps_are_stable));
2799 return this->maps()->Equals(HCheckMaps::cast(other)->maps());
2807 has_migration_target_(
false), is_stability_check_(
false),
2808 maps_are_stable_(maps_are_stable) {
2810 SetOperandAt(0, value);
2812 SetOperandAt(1, value);
2815 SetDependsOnFlag(kMaps);
2816 SetDependsOnFlag(kElementsKind);
2821 has_migration_target_(
false), is_stability_check_(
false),
2822 maps_are_stable_(
true) {
2824 SetOperandAt(0, value);
2826 SetOperandAt(1, typecheck ? typecheck : value);
2829 SetDependsOnFlag(kMaps);
2830 SetDependsOnFlag(kElementsKind);
2831 for (
int i = 0;
i < maps->size(); ++
i) {
2833 if (
map->is_migration_target()) has_migration_target_ =
true;
2834 if (!
map->is_stable()) maps_are_stable_ =
false;
2836 if (has_migration_target_) SetChangesFlag(kNewSpacePromotion);
2856 HCheckValue* check =
new(zone) HCheckValue(value, target, in_new_space);
2861 bool object_in_new_space) {
2862 return new(zone) HCheckValue(value, target, object_in_new_space);
2887 HCheckValue* b = HCheckValue::cast(other);
2888 return object_ == b->object_;
2893 bool object_in_new_space)
2896 object_in_new_space_(object_in_new_space) {
2913 LAST_INTERVAL_CHECK = IS_JS_ARRAY
2926 case IS_SPEC_OBJECT:
return HType::JSObject();
2927 case IS_JS_ARRAY:
return HType::JSArray();
2928 case IS_STRING:
return HType::String();
2929 case IS_INTERNALIZED_STRING:
return HType::String();
2932 return HType::Tagged();
2937 bool is_interval_check()
const {
return check_ <= LAST_INTERVAL_CHECK; }
2950 HCheckInstanceType* b = HCheckInstanceType::cast(other);
2951 return check_ == b->check_;
2978 HType value_type = value()->type();
2979 if (value_type.IsSmi()) {
2998 class HCheckHeapObject
FINAL :
public HUnaryOperation {
3008 if (value()->type().IsHeapObject())
return value()->type();
3009 return HType::HeapObject();
3017 return value()->type().IsHeapObject() ?
NULL :
this;
3033 class InductionVariableData;
3053 class InductionVariableData
FINAL :
public ZoneObject {
3057 HBoundsCheck*
check() {
return check_; }
3062 return upper_limit_;
3065 upper_limit_ = upper_limit;
3073 int32_t upper_limit = kNoLimit)
3074 : check_(check), next_(next), upper_limit_(upper_limit),
3075 processed_(
false) {}
3094 : length_(length), next_(next), checks_(
NULL),
3095 first_check_in_block_(
NULL),
3097 added_constant_(
NULL),
3098 current_and_mask_in_block_(0),
3099 current_or_mask_in_block_(0) {}
3138 token == Token::GTE || token == Token::LTE;
3141 return token == Token::LTE || token == Token::LT || token == Token::NE;
3146 token(
Token::ILLEGAL),
3148 other_target(
NULL) {}
3168 : base(
NULL), and_mask(0), or_mask(0), context(
NULL) {}
3176 HBasicBlock* current_branch,
3177 HBasicBlock* other_branch);
3192 return additional_upper_limit_is_included_;
3196 return additional_lower_limit_is_included_;
3200 if (base()->IsInteger32Constant() && base()->GetInteger32Constant() >= 0) {
3203 if (additional_lower_limit() !=
NULL &&
3204 additional_lower_limit()->IsInteger32Constant() &&
3205 additional_lower_limit()->GetInteger32Constant() >= 0) {
3223 : phi_(phi), base_(IgnoreOsrValue(base)), increment_(increment),
3224 limit_(
NULL), limit_included_(
false), limit_validity_(
NULL),
3225 induction_exit_block_(
NULL), induction_exit_target_(
NULL),
3227 additional_upper_limit_(
NULL),
3228 additional_upper_limit_is_included_(
false),
3229 additional_lower_limit_(
NULL),
3230 additional_lower_limit_is_included_(
false) {}
3257 merged_index_(merged_index),
3259 induction_variable_data_(
NULL) {
3261 non_phi_uses_[
i] = 0;
3262 indirect_uses_[
i] = 0;
3264 DCHECK(merged_index >= 0 || merged_index == kInvalidMergedIndex);
3265 SetFlag(kFlexibleRepresentation);
3266 SetFlag(kAllowUndefinedAsNaN);
3272 virtual
void InferRepresentation(
3275 return representation();
3278 return representation();
3281 virtual
int OperandCount() const
OVERRIDE {
return inputs_.length(); }
3283 return inputs_[index];
3294 int merged_index()
const {
return merged_index_; }
3297 return induction_variable_data_;
3300 return induction_variable_data_ !=
NULL;
3303 return IsInductionVariable() &&
3304 induction_variable_data_->limit() !=
NULL;
3308 induction_variable_data_ = InductionVariableData::ExaminePhi(
this);
3349 return reinterpret_cast<HPhi*
>(value);
3356 static const int kInvalidMergedIndex = -1;
3361 inputs_[index] = value;
3412 return new(zone) HArgumentsObject(count, zone);
3421 values_.Add(
NULL, zone);
3422 SetOperandAt(values_.length() - 1, argument);
3431 SetFlag(kIsArguments);
3436 class HCapturedObject
FINAL :
public HDematerializedObject {
3441 values_.AddBlock(
NULL, length, zone);
3448 int length()
const {
return values_.length(); }
3456 DCHECK(store->IsStoreNamedField());
3477 class HConstant
FINAL :
public HTemplateInstruction<0> {
3490 return instruction->
Append(HConstant::New(
3491 zone, context, value, representation));
3496 if (!
object.is_null() && object->IsHeapObject()) {
3507 return instruction->
Prepend(HConstant::New(
3508 zone, context, value, representation));
3515 return instruction->
Prepend(
new(zone) HConstant(
3525 return instruction->
Append(
new(zone) HConstant(
3532 if (object_.handle().is_null()) {
3539 DCHECK(has_int32_value_ || !object_.handle()->IsSmi());
3540 return object_.handle();
3544 return has_double_value_ &&
3545 (bit_cast<int64_t>(double_value_) == bit_cast<int64_t>(-0.0) ||
3547 std::isnan(double_value_));
3551 return is_not_in_new_space_;
3581 bool HasInteger32Value()
const {
return has_int32_value_; }
3583 DCHECK(HasInteger32Value());
3584 return int32_value_;
3589 DCHECK(HasDoubleValue());
3590 return double_value_;
3596 return object_.IsInitialized() &&
3597 object_.IsKnownGlobal(isolate()->heap()->the_hole_value());
3601 DCHECK(HasNumberValue());
3605 return int32_value_;
3608 if (has_double_value_ || has_int32_value_)
return false;
3609 DCHECK(!object_.handle().is_null());
3613 DCHECK(HasStringValue());
3617 return HasStringValue() && StringShape(instance_type_).IsInternalized();
3621 return has_external_reference_value_;
3624 return external_reference_value_;
3638 DCHECK(HasMapValue() || !has_stable_map_value_);
3639 return has_stable_map_value_;
3649 if (has_int32_value_) {
3650 return static_cast<intptr_t
>(int32_value_);
3651 }
else if (has_double_value_) {
3652 return static_cast<intptr_t
>(bit_cast<int64_t>(double_value_));
3653 }
else if (has_external_reference_value_) {
3654 return reinterpret_cast<intptr_t
>(external_reference_value_.address());
3656 DCHECK(!object_.handle().is_null());
3657 return object_.Hashcode();
3662 if (!has_double_value_ && !has_external_reference_value_) {
3663 DCHECK(!object_.handle().is_null());
3673 return object_.IsInitialized() && object_ == other;
3677 HConstant* other_constant = HConstant::cast(other);
3678 if (has_int32_value_) {
3679 return other_constant->has_int32_value_ &&
3680 int32_value_ == other_constant->int32_value_;
3681 }
else if (has_double_value_) {
3682 return other_constant->has_double_value_ &&
3683 bit_cast<int64_t>(double_value_) ==
3684 bit_cast<int64_t>(other_constant->double_value_);
3685 }
else if (has_external_reference_value_) {
3686 return other_constant->has_external_reference_value_ &&
3687 external_reference_value_ ==
3688 other_constant->external_reference_value_;
3690 if (other_constant->has_int32_value_ ||
3691 other_constant->has_double_value_ ||
3692 other_constant->has_external_reference_value_) {
3695 DCHECK(!object_.handle().is_null());
3696 return other_constant->object_ == object_;
3710 friend class HGraph;
3715 bool is_not_in_new_space =
true,
3719 bool is_not_in_new_space =
true,
3723 bool has_stable_map_value,
3726 bool is_not_in_new_space,
3728 bool is_undetectable,
3773 HType
type = HType::Tagged())
3794 if (
left()->IsConstant())
return true;
3795 if (
right()->IsConstant())
return false;
3812 DCHECK(index >= 1 && index <= 2);
3885 HValue*
function()
const {
return OperandAt(1); }
3890 bool known_function()
const {
return known_function_; }
3896 known_function_ =
function->IsConstant() &&
3897 HConstant::cast(
function)->handle(function->isolate())->IsJSFunction();
3899 SetOperandAt(0, receiver);
3900 SetOperandAt(1,
function);
3933 SetOperandAt(0,
function);
3934 SetOperandAt(1, receiver);
3935 SetOperandAt(2, length);
3936 SetOperandAt(3, elements);
3937 SetAllSideEffects();
3942 class HArgumentsElements
FINAL :
public HTemplateInstruction<0> {
3994 class HAccessArgumentsAt
FINAL :
public HTemplateInstruction<3> {
4017 SetOperandAt(0, arguments);
4018 SetOperandAt(1, length);
4019 SetOperandAt(2, index);
4026 class HBoundsCheckBaseIndexInformation;
4029 class HBoundsCheck
FINAL :
public HTemplateInstruction<2> {
4044 DecompositionResult decomposition;
4045 if (index()->TryDecompose(&decomposition)) {
4046 base_ = decomposition.base();
4047 offset_ = decomposition.offset();
4048 scale_ = decomposition.scale();
4059 return representation();
4073 return skip_check();
4079 friend class HBoundsCheckBaseIndexInformation;
4096 : skip_check_(
false),
4097 base_(
NULL), offset_(0), scale_(0),
4098 allow_equality_(
false) {
4099 SetOperandAt(0, index);
4100 SetOperandAt(1, length);
4101 SetFlag(kFlexibleRepresentation);
4106 return skip_check() && !FLAG_debug_code;
4111 class HBoundsCheckBaseIndexInformation
FINAL
4112 :
public HTemplateInstruction<2> {
4115 DecompositionResult decomposition;
4116 if (check->index()->TryDecompose(&decomposition)) {
4117 SetOperandAt(0, decomposition.base());
4118 SetOperandAt(1, check);
4130 return representation();
4143 HType
type = HType::TaggedNumber())
4152 if (
to.IsTagged() &&
4189 class HMathFloorOfDiv
FINAL :
public HBinaryOperation {
4205 SetFlag(kCanOverflow);
4206 SetFlag(kCanBeDivByZero);
4207 SetFlag(kLeftCanBeMinInt);
4208 SetFlag(kLeftCanBeNegative);
4209 SetFlag(kLeftCanBePositive);
4210 SetFlag(kAllowUndefinedAsNaN);
4229 if (
to.IsTagged() &&
4247 class HCompareGeneric
FINAL :
public HBinaryOperation {
4272 SetAllSideEffects();
4344 HBasicBlock*, HBasicBlock*);
4350 return representation();
4357 HBasicBlock* true_target =
NULL,
4358 HBasicBlock* false_target =
NULL)
4360 SetFlag(kFlexibleRepresentation);
4361 SetFlag(kAllowUndefinedAsNaN);
4366 class HCompareMinusZeroAndBranch
FINAL :
public HUnaryControlInstruction {
4374 return representation();
4437 HBasicBlock*, HBasicBlock*);
4449 HBasicBlock* true_target =
NULL,
4450 HBasicBlock* false_target =
NULL)
4455 class HIsStringAndBranch
FINAL :
public HUnaryControlInstruction {
4459 HBasicBlock*, HBasicBlock*);
4467 static const int kNoKnownSuccessorIndex = -1;
4470 known_successor_index_ = known_successor_index;
4480 HBasicBlock* true_target =
NULL,
4481 HBasicBlock* false_target =
NULL)
4483 known_successor_index_(kNoKnownSuccessorIndex) { }
4485 int known_successor_index_;
4489 class HIsSmiAndBranch
FINAL :
public HUnaryControlInstruction {
4493 HBasicBlock*, HBasicBlock*);
4507 HBasicBlock* true_target =
NULL,
4508 HBasicBlock* false_target =
NULL)
4515 class HIsUndetectableAndBranch
FINAL :
public HUnaryControlInstruction {
4519 HBasicBlock*, HBasicBlock*);
4531 HBasicBlock* true_target =
NULL,
4532 HBasicBlock* false_target =
NULL)
4593 class HHasInstanceTypeAndBranch
FINAL :
public HUnaryControlInstruction {
4641 class HGetCachedArrayIndex
FINAL :
public HUnaryOperation {
4664 class HClassOfTestAndBranch
FINAL :
public HUnaryControlInstruction {
4682 class_name_(class_name) { }
4710 type_literal_(
Unique<
String>::CreateUninitialized(type_literal)) { }
4732 SetAllSideEffects();
4737 class HInstanceOfKnownGlobal
FINAL :
public HTemplateInstruction<2> {
4758 SetOperandAt(0, context);
4759 SetOperandAt(1, left);
4761 SetAllSideEffects();
4784 return RequiredInputRepresentation(index);
4794 SetOperandAt(0, left);
4795 SetOperandAt(1, right);
4798 SetChangesFlag(kNewSpacePromotion);
4802 return !right()->representation().IsTagged();
4807 class HAdd
FINAL :
public HArithmeticBinaryOperation {
4818 return !representation().IsTagged() && !representation().IsExternal();
4823 virtual
bool TryDecompose(DecompositionResult* decomposition)
OVERRIDE {
4824 if (left()->IsInteger32Constant()) {
4825 decomposition->Apply(right(), left()->GetInteger32Constant());
4827 }
else if (right()->IsInteger32Constant()) {
4828 decomposition->Apply(left(), right()->GetInteger32Constant());
4836 if (
to.IsTagged() &&
4837 (left()->ToNumberCanBeObserved() || right()->ToNumberCanBeObserved() ||
4838 left()->ToStringCanBeObserved() || right()->ToStringCanBeObserved())) {
4839 SetAllSideEffects();
4842 ClearAllSideEffects();
4845 if (
to.IsTagged()) {
4846 SetChangesFlag(kNewSpacePromotion);
4847 ClearFlag(kAllowUndefinedAsNaN);
4865 SetFlag(kCanOverflow);
4870 class HSub
FINAL :
public HArithmeticBinaryOperation {
4879 virtual
bool TryDecompose(DecompositionResult* decomposition)
OVERRIDE {
4880 if (right()->IsInteger32Constant()) {
4881 decomposition->Apply(left(), -right()->GetInteger32Constant());
4898 SetFlag(kCanOverflow);
4903 class HMul
FINAL :
public HArithmeticBinaryOperation {
4914 HInstruction* instr = HMul::New(zone, context, left, right);
4915 if (!instr->IsMul())
return instr;
4916 HMul* mul = HMul::cast(instr);
4927 return !representation().IsTagged();
4948 SetFlag(kCanOverflow);
4953 class HMod
FINAL :
public HArithmeticBinaryOperation {
4980 SetFlag(kCanBeDivByZero);
4981 SetFlag(kCanOverflow);
4982 SetFlag(kLeftCanBeNegative);
4987 class HDiv
FINAL :
public HArithmeticBinaryOperation {
5013 SetFlag(kCanBeDivByZero);
5014 SetFlag(kCanOverflow);
5019 class HMathMinMax
FINAL :
public HArithmeticBinaryOperation {
5030 return RequiredInputRepresentation(index);
5054 return other->IsMathMinMax() &&
5055 HMathMinMax::cast(other)->operation_ == operation_;
5089 return op() == HBitwise::cast(other)->op();
5101 DCHECK(op == Token::BIT_AND || op == Token::BIT_OR || op == Token::BIT_XOR);
5104 if (op == Token::BIT_AND &&
5105 ((left->IsConstant() &&
5107 HConstant::cast(left)->Integer32Value() >= 0) ||
5108 (right->IsConstant() &&
5110 HConstant::cast(right)->Integer32Value() >= 0))) {
5111 SetFlag(kTruncatingToSmi);
5112 SetFlag(kTruncatingToInt32);
5115 }
else if (op == Token::BIT_OR &&
5116 ((left->IsConstant() &&
5118 HConstant::cast(left)->Integer32Value() < 0) ||
5119 (right->IsConstant() &&
5121 HConstant::cast(right)->Integer32Value() < 0))) {
5122 SetFlag(kTruncatingToSmi);
5123 SetFlag(kTruncatingToInt32);
5131 class HShl
FINAL :
public HBitwiseBinaryOperation {
5143 if (new_rep.IsSmi() &&
5144 !(right()->IsInteger32Constant() &&
5145 right()->GetInteger32Constant() >= 0)) {
5162 class HShr
FINAL :
public HBitwiseBinaryOperation {
5170 if (right()->IsInteger32Constant()) {
5171 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) {
5174 left()->TryDecompose(decomposition);
5201 class HSar
FINAL :
public HBitwiseBinaryOperation {
5209 if (right()->IsInteger32Constant()) {
5210 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) {
5213 left()->TryDecompose(decomposition);
5240 class HRor
FINAL :
public HBitwiseBinaryOperation {
5246 return new(zone) HRor(context, left, right);
5269 class HOsrEntry
FINAL :
public HTemplateInstruction<0> {
5283 SetChangesFlag(kOsrEntries);
5284 SetChangesFlag(kNewSpacePromotion);
5291 class HParameter
FINAL :
public HTemplateInstruction<0> {
5303 unsigned index()
const {
return index_; }
5327 set_representation(r);
5349 major_key_(major_key) {
5378 SetOperandAt(0, context);
5379 SetOperandAt(1, receiver);
5380 SetOperandAt(2,
name);
5404 return incoming_value_->KnownOptimalRepresentation();
5411 : environment_(environment),
5413 incoming_value_(
NULL) {
5434 return cell_.Hashcode();
5449 return cell_ == HLoadGlobalCell::cast(other)->cell_;
5454 : cell_(
Unique<
Cell>::CreateUninitialized(cell)), details_(details) {
5457 SetDependsOnFlag(kGlobalVars);
5477 DCHECK(FLAG_vector_ics &&
5484 feedback_vector_ = vector;
5499 : name_(
name), for_typeof_(for_typeof),
5501 SetOperandAt(0, context);
5502 SetOperandAt(1, global_object);
5504 SetAllSideEffects();
5518 return ComputeFlags(
TENURED, type1) == ComputeFlags(
TENURED, type2) &&
5530 return new(zone) HAllocate(context,
size, type, pretenure_flag,
5531 instance_type, allocation_site);
5544 size_upper_bound_ = value;
5556 return known_initial_map_;
5560 known_initial_map_ = known_initial_map;
5564 return (flags_ & ALLOCATE_IN_NEW_SPACE) != 0;
5568 return (flags_ & ALLOCATE_IN_OLD_DATA_SPACE) != 0;
5572 return (flags_ & ALLOCATE_IN_OLD_POINTER_SPACE) != 0;
5576 return (flags_ & ALLOCATE_DOUBLE_ALIGNED) != 0;
5580 return (flags_ & PREFILL_WITH_FILLER) != 0;
5584 flags_ =
static_cast<HAllocate::Flags
>(flags_ | PREFILL_WITH_FILLER);
5588 return (flags_ & CLEAR_NEXT_MAP_WORD) != 0;
5592 flags_ =
static_cast<HAllocate::Flags
>(flags_ | ALLOCATE_DOUBLE_ALIGNED);
5604 ALLOCATE_IN_NEW_SPACE = 1 << 0,
5605 ALLOCATE_IN_OLD_DATA_SPACE = 1 << 1,
5606 ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2,
5607 ALLOCATE_DOUBLE_ALIGNED = 1 << 3,
5608 PREFILL_WITH_FILLER = 1 << 4,
5609 CLEAR_NEXT_MAP_WORD = 1 << 5
5620 flags_(ComputeFlags(pretenure_flag, instance_type)),
5621 dominating_allocate_(
NULL),
5622 filler_free_space_size_(
NULL),
5623 size_upper_bound_(
NULL) {
5624 SetOperandAt(0, context);
5627 SetFlag(kTrackSideEffectDominators);
5628 SetChangesFlag(kNewSpacePromotion);
5629 SetDependsOnFlag(kNewSpacePromotion);
5631 if (FLAG_trace_pretenuring) {
5632 PrintF(
"HAllocate with AllocationSite %p %s\n",
5633 allocation_site.is_null()
5634 ?
static_cast<void*
>(
NULL)
5635 :
static_cast<void*
>(*allocation_site),
5636 pretenure_flag ==
TENURED ?
"tenured" :
"not tenured");
5644 ? ALLOCATE_IN_OLD_POINTER_SPACE : ALLOCATE_IN_OLD_DATA_SPACE)
5645 : ALLOCATE_IN_NEW_SPACE;
5654 if (!FLAG_use_gvn || !FLAG_use_allocation_folding) {
5665 flags_ =
static_cast<Flags>(clear_next_map_word
5666 ? flags_ | CLEAR_NEXT_MAP_WORD
5667 : flags_ & ~CLEAR_NEXT_MAP_WORD);
5671 SetOperandAt(1,
size);
5672 if (
size->IsInteger32Constant()) {
5673 size_upper_bound_ = HConstant::cast(
size);
5675 size_upper_bound_ =
NULL;
5686 return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
5687 (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) ||
5688 (IsOldPointerSpaceAllocation() &&
5689 allocate->IsOldPointerSpaceAllocation());
5708 return new(zone) HStoreCodeEntry(
function, code);
5722 SetOperandAt(0,
function);
5723 SetOperandAt(1, code);
5728 class HInnerAllocatedObject
FINAL :
public HTemplateInstruction<2> {
5735 return new(zone) HInnerAllocatedObject(value, offset, type);
5753 DCHECK(value->IsAllocate());
5754 DCHECK(type.IsHeapObject());
5755 SetOperandAt(0, value);
5756 SetOperandAt(1, offset);
5763 return !value->
type().IsSmi()
5764 && !value->
type().IsNull()
5765 && !value->
type().IsBoolean()
5766 && !value->
type().IsUndefined()
5767 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
5774 while (object->IsInnerAllocatedObject()) {
5775 object = HInnerAllocatedObject::cast(
object)->base_object();
5777 if (object->IsConstant() && HConstant::cast(
object)->IsCell()) {
5780 if (object->IsConstant() &&
5781 HConstant::cast(
object)->HasExternalReferenceValue()) {
5787 if (
object == dominator && object->IsAllocate()) {
5789 if (HAllocate::cast(
object)->IsNewSpaceAllocation()) {
5794 if (value->IsConstant() && HConstant::cast(value)->NotInNewSpace()) {
5799 while (value->IsInnerAllocatedObject()) {
5800 value = HInnerAllocatedObject::cast(value)->base_object();
5802 if (value->IsAllocate() &&
5803 !HAllocate::cast(value)->IsNewSpaceAllocation()) {
5813 while (object->IsInnerAllocatedObject()) {
5814 object = HInnerAllocatedObject::cast(
object)->base_object();
5816 if (
object == dominator &&
5817 object->IsAllocate() &&
5818 HAllocate::cast(
object)->IsNewSpaceAllocation()) {
5825 class HStoreGlobalCell
FINAL :
public HUnaryOperation {
5850 PropertyDetails details)
5854 SetChangesFlag(kGlobalVars);
5858 PropertyDetails details_;
5874 kCheckReturnUndefined
5881 SetDependsOnFlag(kContextSlots);
5888 return mode_ == kCheckDeoptimize;
5892 return mode_ != kNoCheck;
5905 HLoadContextSlot* b = HLoadContextSlot::cast(other);
5906 return (slot_index() == b->slot_index());
5929 kCheckIgnoreAssignment
5945 return mode_ == kCheckDeoptimize;
5949 return mode_ != kNoCheck;
5962 : slot_index_(slot_index), mode_(
mode) {
5963 SetOperandAt(0, context);
5964 SetOperandAt(1, value);
5965 SetChangesFlag(kContextSlots);
5975 class HObjectAccess
FINAL {
5978 return portion() != kBackingStore && portion() != kExternalMemory;
5982 return portion() == kExternalMemory;
5986 return portion() == kStringLengths;
5990 return portion() == kMaps;
5994 return OffsetField::decode(value_);
6006 return ImmutableField::decode(value_);
6012 return ExistingInobjectPropertyField::decode(value_);
6016 return HObjectAccess(portion(), offset(), representation,
name(),
6017 immutable(), existing_inobject_property());
6021 return HObjectAccess(
6026 return HObjectAccess(kDouble,
6032 return HObjectAccess(kDouble,
6050 return HObjectAccess(
6065 return HObjectAccess(
6072 return HObjectAccess(kInobject,
6079 return HObjectAccess(
6114 return HObjectAccess(kInobject,
6132 return HObjectAccess(kInobject,
6138 return HObjectAccess(kInobject,
6144 return HObjectAccess(kInobject,
6150 return HObjectAccess(kInobject,
6156 return HObjectAccess(kInobject,
6162 return HObjectAccess(kInobject,
6172 return HObjectAccess(kInobject,
6236 return HObjectAccess::ForObservableJSObjectOffset(
6241 return HObjectAccess::ForObservableJSObjectOffset(
6246 return HObjectAccess::ForObservableJSObjectOffset(
6251 return HObjectAccess::ForObservableJSObjectOffset(
6256 return HObjectAccess::ForObservableJSObjectOffset(
6261 return HObjectAccess::ForObservableJSObjectOffset(
6266 return HObjectAccess::ForObservableJSObjectOffset(
6271 return HObjectAccess::ForObservableJSObjectOffset(
6276 return HObjectAccess::ForObservableJSObjectOffset(
6284 inline bool Equals(HObjectAccess that)
const {
6285 return value_ == that.value_;
6309 bool immutable =
false,
6310 bool existing_inobject_property =
true)
6315 existing_inobject_property ? 1 : 0) |
6319 DCHECK(this->offset() == offset);
6320 DCHECK(this->portion() == portion);
6321 DCHECK(this->immutable() == immutable);
6322 DCHECK(this->existing_inobject_property() == existing_inobject_property);
6323 DCHECK(RepresentationField::decode(value_) == representation.kind());
6324 DCHECK(!this->existing_inobject_property() || IsInobject());
6336 friend class HLoadNamedField;
6337 friend class HStoreNamedField;
6338 friend class SideEffectsTracker;
6342 return PortionField::decode(value_);
6347 OStream&
operator<<(OStream& os,
const HObjectAccess& access);
6350 class HLoadNamedField
FINAL :
public HTemplateInstruction<2> {
6360 return OperandAt(1);
6363 HObjectAccess
access()
const {
return access_; }
6365 return access_.representation();
6372 return !access().IsInobject() || access().offset() >=
size;
6375 if (index == 0 && access().IsExternalMemory()) {
6386 if (!type().
Equals(other->
type()))
return false;
6388 if (!other->IsLoadNamedField())
return true;
6389 HLoadNamedField* that = HLoadNamedField::cast(other);
6390 if (this->maps_ == that->maps_)
return true;
6391 if (this->maps_ ==
NULL || that->maps_ ==
NULL)
return false;
6392 return this->maps_->IsSubset(that->maps_);
6399 HLoadNamedField* that = HLoadNamedField::cast(other);
6400 if (!this->access_.Equals(that->access_))
return false;
6401 if (this->maps_ == that->maps_)
return true;
6402 return (this->maps_ !=
NULL &&
6403 that->maps_ !=
NULL &&
6404 this->maps_->Equals(that->maps_));
6410 HObjectAccess access)
6411 : access_(access), maps_(
NULL) {
6413 SetOperandAt(0,
object);
6414 SetOperandAt(1, dependency ? dependency :
object);
6422 }
else if (representation.
IsSmi()) {
6423 set_type(HType::Smi());
6427 set_representation(representation);
6429 }
else if (representation.
IsDouble() ||
6432 set_representation(representation);
6434 set_type(HType::HeapObject());
6439 access.SetGVNFlags(
this,
LOAD);
6444 HObjectAccess access,
6452 SetOperandAt(0,
object);
6453 SetOperandAt(1, dependency ? dependency :
object);
6455 DCHECK(access.representation().IsHeapObject());
6456 DCHECK(type.IsHeapObject());
6459 access.SetGVNFlags(
this,
LOAD);
6479 DCHECK(FLAG_vector_ics &&
6486 feedback_vector_ = vector;
6502 SetOperandAt(0, context);
6503 SetOperandAt(1,
object);
6505 SetAllSideEffects();
6534 SetDependsOnFlag(kCalls);
6564 class HLoadKeyed
FINAL
6565 :
public HTemplateInstruction<3>,
public ArrayInstructionInterface {
6581 return is_external() || is_fixed_typed_array();
6587 return OperandAt(2);
6594 bool IsDehoisted()
const {
return IsDehoistedField::decode(bit_field_); }
6596 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted);
6599 return ElementsKindField::decode(bit_field_);
6602 return HoleModeField::decode(bit_field_);
6616 OperandAt(1)->representation());
6622 return RequiredInputRepresentation(index);
6637 if (!other->IsLoadKeyed())
return false;
6638 HLoadKeyed* other_load = HLoadKeyed::cast(other);
6640 if (IsDehoisted() && base_offset() != other_load->base_offset())
6642 return elements_kind() == other_load->elements_kind();
6656 bit_field_ = ElementsKindField::encode(elements_kind) |
6657 HoleModeField::encode(
mode) |
6658 BaseOffsetField::encode(offset);
6660 SetOperandAt(0, obj);
6661 SetOperandAt(1, key);
6662 SetOperandAt(2, dependency !=
NULL ? dependency : obj);
6664 if (!is_typed_elements()) {
6674 set_type(HType::Smi());
6684 SetDependsOnFlag(kArrayElements);
6687 SetDependsOnFlag(kDoubleArrayElements);
6699 if (is_external()) {
6700 SetDependsOnFlag(kExternalMemory);
6701 }
else if (is_fixed_typed_array()) {
6702 SetDependsOnFlag(kTypedArrayElements);
6707 SetDependsOnFlag(kCalls);
6714 return !RequiresHoleCheck();
6719 kBitsForElementsKind = 5,
6720 kBitsForHoleMode = 1,
6721 kBitsForBaseOffset = 25,
6722 kBitsForIsDehoisted = 1,
6724 kStartElementsKind = 0,
6725 kStartHoleMode = kStartElementsKind + kBitsForElementsKind,
6726 kStartBaseOffset = kStartHoleMode + kBitsForHoleMode,
6727 kStartIsDehoisted = kStartBaseOffset + kBitsForBaseOffset
6731 kBitsForIsDehoisted) <=
sizeof(
uint32_t)*8);
6734 public BitField<ElementsKind, kStartElementsKind, kBitsForElementsKind>
6737 public BitField<LoadKeyedHoleMode, kStartHoleMode, kBitsForHoleMode>
6740 public BitField<uint32_t, kStartBaseOffset, kBitsForBaseOffset>
6743 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted>
6757 DCHECK(FLAG_vector_ics &&
6764 feedback_vector_ = vector;
6783 SetOperandAt(0, obj);
6784 SetOperandAt(1, key);
6785 SetOperandAt(2, context);
6786 SetAllSideEffects();
6805 class HStoreNamedField
FINAL :
public HTemplateInstruction<3> {
6814 virtual
bool HasEscapingOperandAt(
int index)
OVERRIDE {
6818 return !access().IsInobject() || access().offset() >=
size;
6821 if (index == 0 && access().IsExternalMemory()) {
6824 }
else if (index == 1) {
6825 if (field_representation().IsInteger8() ||
6826 field_representation().IsUInteger8() ||
6827 field_representation().IsInteger16() ||
6828 field_representation().IsUInteger16() ||
6831 }
else if (field_representation().IsDouble()) {
6832 return field_representation();
6833 }
else if (field_representation().IsSmi()) {
6837 return field_representation();
6838 }
else if (field_representation().IsExternal()) {
6846 DCHECK(side_effect == kNewSpacePromotion);
6847 if (!FLAG_use_write_barrier_elimination)
return false;
6848 dominator_ = dominator;
6857 HObjectAccess
access()
const {
return access_; }
6863 if (has_transition()) {
6865 HConstant::cast(transition())->
handle(Isolate::Current()));
6872 DCHECK(!has_transition());
6873 SetOperandAt(2, transition);
6874 has_transition_ =
true;
6875 SetChangesFlag(kMaps);
6879 DCHECK(!field_representation().IsDouble() || !has_transition());
6880 if (field_representation().IsDouble())
return false;
6881 if (field_representation().IsSmi())
return false;
6882 if (field_representation().
IsInteger32())
return false;
6883 if (field_representation().IsExternal())
return false;
6894 if (field_representation().IsHeapObject())
return OMIT_SMI_CHECK;
6904 return access_.representation();
6908 SetOperandAt(1, value);
6912 if (!this->access().
Equals(that->access()))
return false;
6914 this->field_representation().IsSmi() &&
6926 HObjectAccess access,
6931 has_transition_(
false),
6932 store_mode_(store_mode) {
6935 DCHECK(!access.IsInobject() || access.existing_inobject_property() ||
6936 obj->IsAllocate() || obj->IsInnerAllocatedObject());
6937 SetOperandAt(0, obj);
6938 SetOperandAt(1, val);
6939 SetOperandAt(2, obj);
6940 access.SetGVNFlags(
this,
STORE);
6943 HObjectAccess access_;
6976 strict_mode_(strict_mode) {
6977 SetOperandAt(0,
object);
6978 SetOperandAt(1, value);
6979 SetOperandAt(2, context);
6980 SetAllSideEffects();
6988 class HStoreKeyed
FINAL
7007 }
else if (index == 1) {
7009 OperandAt(1)->representation());
7013 return RequiredValueRepresentation(elements_kind_, store_mode_);
7046 return is_external() || is_fixed_typed_array();
7050 if (index < 2)
return RequiredInputRepresentation(index);
7051 if (IsUninitialized()) {
7054 Representation r = RequiredValueRepresentation(elements_kind_, store_mode_);
7076 is_uninitialized_ = is_uninitialized;
7080 return value()->IsConstant() && HConstant::cast(value())->IsTheHole();
7085 DCHECK(side_effect == kNewSpacePromotion);
7086 dominator_ = dominator;
7093 if (value_is_smi()) {
7116 : elements_kind_(elements_kind),
7120 is_dehoisted_(
false),
7121 is_uninitialized_(
false),
7122 store_mode_(store_mode),
7124 SetOperandAt(0, obj);
7125 SetOperandAt(1, key);
7126 SetOperandAt(2, val);
7129 SetFlag(kTrackSideEffectDominators);
7130 SetDependsOnFlag(kNewSpacePromotion);
7132 if (is_external()) {
7133 SetChangesFlag(kExternalMemory);
7134 SetFlag(kAllowUndefinedAsNaN);
7136 SetChangesFlag(kDoubleArrayElements);
7138 SetChangesFlag(kArrayElements);
7139 }
else if (is_fixed_typed_array()) {
7140 SetChangesFlag(kTypedArrayElements);
7141 SetFlag(kAllowUndefinedAsNaN);
7143 SetChangesFlag(kArrayElements);
7151 SetFlag(kTruncatingToInt32);
7158 bool is_uninitialized_ : 1;
7190 : strict_mode_(strict_mode) {
7191 SetOperandAt(0,
object);
7192 SetOperandAt(1, key);
7193 SetOperandAt(2, value);
7194 SetOperandAt(3, context);
7195 SetAllSideEffects();
7202 class HTransitionElementsKind
FINAL :
public HTemplateInstruction<2> {
7204 inline static HTransitionElementsKind*
New(
Zone* zone,
7209 return new(zone) HTransitionElementsKind(context,
object,
7210 original_map, transitioned_map);
7230 HTransitionElementsKind* instr = HTransitionElementsKind::cast(other);
7231 return original_map_ == instr->original_map_ &&
7232 transitioned_map_ == instr->transitioned_map_;
7242 : original_map_(
Unique<
Map>(original_map)),
7243 transitioned_map_(
Unique<
Map>(transitioned_map)),
7244 from_kind_(original_map->elements_kind()),
7245 to_kind_(transitioned_map->elements_kind()) {
7246 SetOperandAt(0,
object);
7247 SetOperandAt(1, context);
7249 SetChangesFlag(kElementsKind);
7251 SetChangesFlag(kElementsPointer);
7252 SetChangesFlag(kNewSpacePromotion);
7288 return flags_ == HStringAdd::cast(other)->flags_ &&
7289 pretenure_flag_ == HStringAdd::cast(other)->pretenure_flag_;
7300 flags_(
flags), pretenure_flag_(pretenure_flag) {
7303 SetDependsOnFlag(kMaps);
7304 SetChangesFlag(kNewSpacePromotion);
7305 if (FLAG_trace_pretenuring) {
7306 PrintF(
"HStringAdd with AllocationSite %p %s\n",
7308 ?
static_cast<void*
>(
NULL)
7309 :
static_cast<void*
>(*allocation_site),
7310 pretenure_flag ==
TENURED ?
"tenured" :
"not tenured");
7350 SetOperandAt(0, context);
7351 SetOperandAt(1,
string);
7352 SetOperandAt(2, index);
7355 SetDependsOnFlag(kMaps);
7356 SetDependsOnFlag(kStringChars);
7357 SetChangesFlag(kNewSpacePromotion);
7365 class HStringCharFromCode
FINAL :
public HTemplateInstruction<2> {
7387 SetOperandAt(0, context);
7388 SetOperandAt(1, char_code);
7391 SetChangesFlag(kNewSpacePromotion);
7395 return !value()->ToNumberCanBeObserved();
7458 SetOperandAt(0, context);
7459 SetAllSideEffects();
7460 set_type(HType::JSObject());
7495 shared_info_(shared),
7496 kind_(shared->kind()),
7497 pretenure_(pretenure),
7498 has_no_literals_(shared->num_literals() == 0),
7499 strict_mode_(shared->strict_mode()) {
7500 SetOperandAt(0, context);
7502 SetChangesFlag(kNewSpacePromotion);
7532 SetOperandAt(0, context);
7533 SetOperandAt(1, value);
7541 class HTrapAllocationMemento
FINAL :
public HTemplateInstruction<1> {
7555 SetOperandAt(0, obj);
7560 class HToFastProperties
FINAL :
public HUnaryOperation {
7573 SetChangesFlag(kNewSpacePromotion);
7578 DCHECK(value->IsCallRuntime());
7581 DCHECK(function->function_id == Runtime::kCreateObjectLiteral);
7589 class HDateField
FINAL :
public HUnaryOperation {
7611 class HSeqStringGetChar
FINAL :
public HTemplateInstruction<2> {
7632 return encoding() == HSeqStringGetChar::cast(other)->encoding();
7647 HValue* index) : encoding_(encoding) {
7648 SetOperandAt(0,
string);
7649 SetOperandAt(1, index);
7652 SetDependsOnFlag(kStringChars);
7685 HValue* value) : encoding_(encoding) {
7686 SetOperandAt(0, context);
7687 SetOperandAt(1,
string);
7688 SetOperandAt(2, index);
7689 SetOperandAt(3, value);
7691 SetChangesFlag(kStringChars);
7698 class HCheckMapValue
FINAL :
public HTemplateInstruction<2> {
7709 if (value()->type().IsHeapObject())
return value()->type();
7710 return HType::HeapObject();
7721 virtual
int RedefinedOperandIndex() {
return 0; }
7730 SetOperandAt(0, value);
7731 SetOperandAt(1,
map);
7734 SetDependsOnFlag(kMaps);
7735 SetDependsOnFlag(kElementsKind);
7740 class HForInPrepareMap
FINAL :
public HTemplateInstruction<2> {
7754 return HType::Tagged();
7762 SetOperandAt(0, context);
7763 SetOperandAt(1,
object);
7765 SetAllSideEffects();
7770 class HForInCacheArray
FINAL :
public HTemplateInstruction<2> {
7780 int idx()
const {
return idx_; }
7783 return index_cache_;
7787 index_cache_ = index_cache;
7793 return HType::Tagged();
7801 int idx) : idx_(idx) {
7802 SetOperandAt(0, enumerable);
7803 SetOperandAt(1,
keys);
7818 SetOperandAt(0,
object);
7819 SetOperandAt(1, index);
7820 SetChangesFlag(kNewSpacePromotion);
7838 return HType::Tagged();
7899 #undef DECLARE_INSTRUCTION
7900 #undef DECLARE_CONCRETE_INSTRUCTION
A primitive boolean value (ECMA-262, 4.3.14).
static const int kAllocationSiteOffset
static bool CanTrack(InstanceType type)
virtual ~ArrayInstructionInterface()
virtual HValue * GetKey()=0
static Representation KeyedAccessIndexRequirement(Representation r)
virtual bool TryIncreaseBaseOffset(uint32_t increase_by_value)=0
virtual void SetKey(HValue *key)=0
virtual void SetDehoisted(bool is_dehoisted)=0
virtual ElementsKind elements_kind() const =0
virtual bool IsDehoisted() const =0
HUseIterator(HUseListNode *head)
const HControlInstruction * instr_
bool Apply(HValue *other_base, int other_offset, int other_scale=0)
void SwapValues(HValue **other_base, int *other_offset, int *other_scale)
HSuccessorIterator(const HControlInstruction *instr)
static U update(U previous, T value)
int GetEnvironmentLength() const
static const int kValueOffset
static const int kFirstOffset
static const int kSecondOffset
bool Contains(E element) const
bool ContainsAnyOf(const EnumSet &set) const
void Intersect(const EnumSet &set)
static const int kExternalPointerOffset
InductionVariableCheck * next_
InductionVariableCheck * next()
void set_upper_limit(int32_t upper_limit)
InductionVariableCheck(HBoundsCheck *check, InductionVariableCheck *next, int32_t upper_limit=kNoLimit)
Source to read snapshot and builtins files from.
HInnerAllocatedObject(HValue *value, HValue *offset, HType type)
Heap::RootListIndex index() const
HCallJSFunction(HValue *function, int argument_count, bool pass_argument_count, bool has_stack_check)
HHasCachedArrayIndexAndBranch(HValue *value)
static HObjectAccess ForGlobalObjectNativeContext()
bool has_migration_target_
bool HasBooleanValue() const
HCheckMaps(HValue *value, const UniqueSet< Map > *maps, HValue *typecheck)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadKeyedGeneric, HValue *, HValue *)
bool HasStringValue() const
HLoadContextSlot(HValue *context, int slot_index, Mode mode)
DECLARE_INSTRUCTION_FACTORY_P3(HCompareHoleAndBranch, HValue *, HBasicBlock *, HBasicBlock *)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HMathFloorOfDiv, HValue *, HValue *)
static HContext * New(Zone *zone)
HConstructDouble(HValue *hi, HValue *lo)
static HInnerAllocatedObject * New(Zone *zone, HValue *context, HValue *value, HValue *offset, HType type)
void UpdateClearNextMapWord(bool clear_next_map_word)
DECLARE_INSTRUCTION_FACTORY_P4(HBranch, HValue *, ToBooleanStub::Types, HBasicBlock *, HBasicBlock *)
CallFunctionFlags function_flags_
HConstant * closure_context() const
static HPushArguments * New(Zone *zone, HValue *context, HValue *arg1, HValue *arg2, HValue *arg3)
int32_t NumberValueAsInteger32() const
RemovableSimulate removable_
static bool ComputeInductionVariableLimit(HBasicBlock *block, InductionVariableLimitUpdate *additional_limit)
Range * CopyClearLower(Zone *zone) const
virtual Representation RequiredInputRepresentation(int index) FINAL OVERRIDE
HAdd(HValue *context, HValue *left, HValue *right)
bool is_concise_method() const
HStringCharFromCode(HValue *context, HValue *char_code)
DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue *)
HTransitionElementsKind(HValue *context, HValue *object, Handle< Map > original_map, Handle< Map > transitioned_map)
HIsObjectAndBranch(HValue *value, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
HTrapAllocationMemento(HValue *obj)
HBitwise(HValue *context, Token::Value op, HValue *left, HValue *right)
bool IsOldPointerSpaceAllocation() const
virtual bool HasEscapingOperandAt(int index) OVERRIDE
HUnaryMathOperation(HValue *context, HValue *value, BuiltinFunctionId op)
HStoreCodeEntry(HValue *function, HValue *code)
HValue * additional_lower_limit_
HShl(HValue *context, HValue *left, HValue *right)
DECLARE_INSTRUCTION_FACTORY_P5(HLoadNamedField, HValue *, HValue *, HObjectAccess, const UniqueSet< Map > *, HType)
DECLARE_CONCRETE_INSTRUCTION(DummyUse)
HSimulate(BailoutId ast_id, int pop_count, Zone *zone, RemovableSimulate removable)
Handle< Map > transition_map() const
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInvokeFunction, HValue *, int)
CodeStub::Major major_key_
void SetVectorAndSlot(Handle< FixedArray > vector, int slot)
static HObjectAccess ForObservableJSObjectOffset(int offset, Representation representation=Representation::Tagged())
virtual HType CalculateInferredType() OVERRIDE
HValue * transition() const
const Runtime::Function * c_function_
static HConstant * CreateAndInsertBefore(Zone *zone, Unique< Map > map, bool map_is_stable, HInstruction *instruction)
DECLARE_INSTRUCTION_FACTORY_P1(HTrapAllocationMemento, HValue *)
Unique< Map > original_map() const
FunctionKind kind() const
HValue * dominator() const
HForceRepresentation(HValue *value, Representation required_representation)
HBasicBlock * induction_exit_block_
HIsStringAndBranch(HValue *value, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
bool HasMigrationTarget() const
HCheckHeapObject(HValue *value)
bool LowerLimitIsNonNegativeConstant()
int length() const
The number of Latin-1 characters in the string.
DECLARE_INSTRUCTION_FACTORY_P4(HApplyArguments, HValue *, HValue *, HValue *, HValue *)
bool NeedsWriteBarrier() const
HInstanceOfKnownGlobal(HValue *context, HValue *left, Handle< JSFunction > right)
const Heap::RootListIndex index_
HStackCheck(HValue *context, Type type)
virtual bool IsCommutative() const OVERRIDE
uint32_t base_offset() const
bool IsExternalMemory() const
bool has_stable_map_value_
int tagged_indirect_uses() const
DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray)
DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue *, ToBooleanStub::Types)
virtual bool HandleSideEffectDominator(GVNFlag side_effect, HValue *dominator) OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool)
DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId)
String::Encoding encoding_
virtual int OperandCount() const OVERRIDE
int known_successor_index_
virtual Opcode opcode() const OVERRIDE
HCallNew(HValue *context, HValue *constructor, int argument_count)
HValue * elements() const
HMapEnumLength(HValue *value)
HLoadNamedField(HValue *object, HValue *dependency, HObjectAccess access, const UniqueSet< Map > *maps, HType type)
virtual Range * InferRange(Zone *zone) OVERRIDE
HTypeof(HValue *context, HValue *value)
DECLARE_INSTRUCTION_FACTORY_P2(HDoubleBits, HValue *, Bits)
virtual HValue * OperandAt(int i) const FINAL OVERRIDE
HCheckMaps(HValue *value, const UniqueSet< Map > *maps, bool maps_are_stable)
HObjectAccess(Portion portion, int offset, Representation representation=Representation::Tagged(), Handle< String > name=Handle< String >::null(), bool immutable=false, bool existing_inobject_property=true)
int32_t ComputeUpperLimit(int32_t and_mask, int32_t or_mask)
InstanceType GetInstanceType() const
virtual bool IsDeletable() const OVERRIDE
HBasicBlock * induction_exit_block()
DECLARE_INSTRUCTION_FACTORY_P2(HDateField, HValue *, Smi *)
HTailCallThroughMegamorphicCache(HValue *context, HValue *receiver, HValue *name, Code::Flags flags)
HCallNewArray(HValue *context, HValue *constructor, int argument_count, ElementsKind elements_kind)
bool CanBeReplacedWith(HStoreNamedField *that) const
Handle< FixedArray > literals()
HDiv(HValue *context, HValue *left, HValue *right)
static HInstruction * New(Zone *zone, HValue *context, HValue *char_code)
bool IsOldDataSpaceAllocation() const
Unique< Map > transitioned_map_
void ReuseSideEffectsFromStore(HInstruction *store)
ElementsKind to_kind() const
DECLARE_INSTRUCTION_FACTORY_P1(HParameter, unsigned)
DECLARE_INSTRUCTION_FACTORY_P5(HLoadKeyed, HValue *, HValue *, HValue *, ElementsKind, LoadKeyedHoleMode)
DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue *, HValue *, HValue *, ElementsKind)
Unique< Map > original_map_
void set_allow_equality(bool v)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HReturn, HValue *, HValue *)
bool arguments_pushed() const
HConstant(int32_t value, Representation r=Representation::None(), bool is_not_in_new_space=true, Unique< Object > optional=Unique< Object >(Handle< Object >::null()))
const char * reason() const
void AddValue(int index, HValue *value)
HValue * base_index() const
DECLARE_INSTRUCTION_FACTORY_P2(HParameter, unsigned, ParameterKind)
HLoadNamedField(HValue *object, HValue *dependency, HObjectAccess access)
static HPushArguments * New(Zone *zone, HValue *context, HValue *arg1)
HStoreNamedGeneric(HValue *context, HValue *object, Handle< String > name, HValue *value, StrictMode strict_mode)
virtual int RedefinedOperandIndex()
bool CanBeReplacedWith(HValue *other) const
Representation representation() const
HAllocate * dominating_allocate_
bool additional_lower_limit_is_included_
HUnknownOSRValue(HEnvironment *environment, int index)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOf, HValue *, HValue *)
void UpdateFreeSpaceFiller(int32_t filler_size)
bool can_convert_undefined_to_nan()
HForInPrepareMap(HValue *context, HValue *object)
HBasicBlock * induction_exit_target()
Unique< Cell > cell() const
static HObjectAccess ForMapInstanceType()
StoreFieldOrKeyedMode store_mode() const
HLoadGlobalGeneric(HValue *context, HValue *global_object, Handle< String > name, bool for_typeof)
HDoubleBits(HValue *value, Bits bits)
virtual Handle< Map > GetMonomorphicJSObjectMap() OVERRIDE
ZoneList< int > assigned_indexes_
DECLARE_INSTRUCTION_FACTORY_P2(HCheckMapValue, HValue *, HValue *)
bool NeedsWriteBarrierForMap()
static HInstruction * NewImul(Zone *zone, HValue *context, HValue *left, HValue *right)
static HObjectAccess ForJSArrayBufferViewByteLength()
SaveFPRegsMode save_doubles() const
virtual HSourcePosition position() const OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P6(HLoadKeyed, HValue *, HValue *, HValue *, ElementsKind, LoadKeyedHoleMode, int)
SaveFPRegsMode save_doubles_
HBoundsCheckBaseIndexInformation(HBoundsCheck *check)
bool HasNumberValue() const
static HObjectAccess ForMapAsInteger32()
DECLARE_INSTRUCTION_FACTORY_P1(HClampToUint8, HValue *)
InductionVariableData(HPhi *phi, HValue *base, int32_t increment)
HGetCachedArrayIndex(HValue *value)
HValue * base_object() const
static HObjectAccess ForMapInstanceSize()
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue *, int)
bool HasStableMapValue() const
const UniqueSet< Map > * maps() const
Token::Value token() const
static HObjectAccess ForExternalArrayExternalPointer()
Handle< FixedArray > pairs_
const StringAddFlags flags_
static HPushArguments * New(Zone *zone, HValue *context, HValue *arg1, HValue *arg2, HValue *arg3, HValue *arg4)
Handle< FixedArray > feedback_vector_
bool SupportsFlexibleFloorAndRound() const
virtual Representation observed_input_representation(int index) OVERRIDE
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallStub, CodeStub::Major, int)
HBasicBlock * limit_validity()
bool Equals(HObjectAccess that) const
virtual bool IsDeletable() const FINAL OVERRIDE
ElementsKind elements_kind_
HValue * additional_lower_limit()
void SetUninitialized(bool is_uninitialized)
bool BooleanValue() const
HValue * additional_upper_limit()
bool pass_argument_count() const
static HObjectAccess ForAllocationMementoSite()
virtual ElementsKind elements_kind() const OVERRIDE
HGoto(HBasicBlock *target)
DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue *, HValue *, HObjectAccess)
Handle< String > type_literal() const
bool CanBeMinusZero() const
bool additional_upper_limit_is_included_
int double_indirect_uses() const
static HCheckValue * New(Zone *zone, HValue *context, HValue *value, Unique< HeapObject > target, bool object_in_new_space)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue *, int)
void DetectInductionVariable()
Handle< String > pattern()
HClampToUint8(HValue *value)
static HObjectAccess ForHeapNumberValueHighestBits()
bool MustPrefillWithFiller() const
HArgumentsObject * arguments_object_
Handle< FixedArray > literals_
HValue * SimplifiedDividendForMathFloorOfDiv(HDiv *hdiv)
bool is_not_in_new_space_
static HObjectAccess ForPrototypeOrInitialMap()
ToBooleanStub::Types expected_input_types_
HForInCacheArray(HValue *enumerable, HValue *keys, int idx)
static HObjectAccess ForCellValue()
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallRuntime, Handle< String >, const Runtime::Function *, int)
static HObjectAccess ForAllocationSiteOffset(int offset)
bool is_fixed_typed_array() const
int ToOperandIndex(int environment_index)
STATIC_ASSERT((kBitsForElementsKind+kBitsForBaseOffset+kBitsForIsDehoisted)<=sizeof(uint32_t) *8)
bool IsFoldable(HAllocate *allocate)
HConstant(double value, Representation r=Representation::None(), bool is_not_in_new_space=true, Unique< Object > optional=Unique< Object >(Handle< Object >::null()))
DECLARE_INSTRUCTION_FACTORY_P2(HLoadRoot, Heap::RootListIndex, HType)
String::Encoding encoding() const
DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue *, Handle< Map >, HBasicBlock *, HBasicBlock *)
HObjectAccess WithRepresentation(Representation representation)
HPower(HValue *left, HValue *right)
Unique< HeapObject > object() const
static HObjectAccess ForStringHashField()
bool IsNewSpaceAllocation() const
int arguments_count() const
void SetTransition(HConstant *transition)
Handle< JSFunction > closure_
HMathFloorOfDiv(HValue *context, HValue *left, HValue *right)
static void ComputeLimitFromPredecessorBlock(HBasicBlock *block, LimitFromPredecessorBlock *result)
virtual void FinalizeUniqueness() OVERRIDE
bool CanBeNegative() const
ZoneList< HBasicBlock * > return_targets_
HConstant(Handle< Object > handle, Representation r=Representation::None())
virtual bool IsPurelyInformativeDefinition() OVERRIDE
virtual void RepresentationChanged(Representation to) OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P0(HAbnormalExit)
static HObjectAccess ForElementsPointer()
bool deoptimize_on_minus_zero() const
HStoreContextSlot(HValue *context, int slot_index, Mode mode, HValue *value)
void Initialize(Representation r)
HSub(HValue *context, HValue *left, HValue *right)
HSimulate * next_simulate_
static Representation RequiredValueRepresentation(ElementsKind kind, StoreFieldOrKeyedMode mode)
bool AllUsesCanTreatHoleAsNaN() const
HSimulate * next_simulate()
DECLARE_INSTRUCTION_FACTORY_P1(HGetCachedArrayIndex, HValue *)
DECLARE_INSTRUCTION_FACTORY_P1(HUseConst, HValue *)
static HObjectAccess ForPropertiesPointer()
HFunctionLiteral(HValue *context, Handle< SharedFunctionInfo > shared, bool pretenure)
HCallRuntime(HValue *context, Handle< String > name, const Runtime::Function *c_function, int argument_count)
int int32_non_phi_uses() const
DECLARE_INSTRUCTION_FACTORY_P2(HLoadFieldByIndex, HValue *, HValue *)
ChecksRelatedToLength * checks_
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference)
void GetCheckMaskAndTag(uint8_t *mask, uint8_t *tag)
HDeclareGlobals(HValue *context, Handle< FixedArray > pairs, int flags)
bool IsStabilityCheck() const
bool map_is_stable() const
DECLARE_INSTRUCTION_FACTORY_P2(HClassOfTestAndBranch, HValue *, Handle< String >)
DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue *)
Variable * arguments_var()
HPhi(int merged_index, Zone *zone)
static InductionVariableData * GetInductionVariableData(HValue *v)
Unique< Map > ObjectMap() const
Handle< String > class_name() const
DECLARE_INSTRUCTION_FACTORY_P3(HIsObjectAndBranch, HValue *, HBasicBlock *, HBasicBlock *)
void UpdateValue(HValue *value)
void ClearNextMapWord(int offset)
virtual bool EmitAtUses() OVERRIDE
HLoadGlobalCell(Handle< Cell > cell, PropertyDetails details)
Unique< Map > transitioned_map() const
Deoptimizer::BailoutType type()
HStoreNamedField(HValue *obj, HObjectAccess access, HValue *val, StoreFieldOrKeyedMode store_mode=INITIALIZING_STORE)
String::Encoding encoding()
bool from_inlined() const
HValue * map_value() const
Representation field_representation() const
bool CanBePositive() const
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCompareGeneric, HValue *, HValue *, Token::Value)
void set_maps(const UniqueSet< Map > *maps)
Handle< JSFunction > known_function_
HInvokeFunction(HValue *context, HValue *function, int argument_count)
bool ImmortalImmovable() const
static HObjectAccess ForCellPayload(Isolate *isolate)
static HObjectAccess ForStringLength()
virtual bool HasStackCheck() FINAL OVERRIDE
virtual int argument_count() const
static HPhi * cast(HValue *value)
HCompareHoleAndBranch(HValue *value, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
int32_t Integer32Value() const
static HObjectAccess ForConsStringFirst()
virtual int RedefinedOperandIndex() OVERRIDE
void UpdateAdditionalLimit(InductionVariableLimitUpdate *update)
int tagged_non_phi_uses() const
HAllocate * GetFoldableDominator(HAllocate *dominator)
DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue *, HValue *, HValue *, ElementsKind, StoreFieldOrKeyedMode, int)
virtual Representation RepresentationFromInputs() OVERRIDE
static HObjectAccess ForFixedArrayLength()
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t)
bool is_candidate_for_removal()
DECLARE_INSTRUCTION_FACTORY_P1(HIsObjectAndBranch, HValue *)
static HInstruction * New(Zone *zone, HValue *context, HValue *left, HValue *right, PretenureFlag pretenure_flag=NOT_TENURED, StringAddFlags flags=STRING_ADD_CHECK_BOTH, Handle< AllocationSite > allocation_site=Handle< AllocationSite >::null())
static HObjectAccess ForNameHashField()
ExternalReference external_reference_value_
virtual int OperandCount() const FINAL OVERRIDE
HCompareGeneric(HValue *context, HValue *left, HValue *right, Token::Value token)
HValue * SimplifiedDivisorForMathFloorOfDiv(HDiv *hdiv)
void set_size_upper_bound(HConstant *value)
Unique< Map > object_map_
Handle< Map > known_initial_map_
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOfKnownGlobal, HValue *, Handle< JSFunction >)
bool HasDoubleValue() const
DECLARE_INSTRUCTION_FACTORY_P3(HForInCacheArray, HValue *, HValue *, int)
InliningKind inlining_kind() const
HChange(HValue *value, Representation to, bool is_truncating_to_smi, bool is_truncating_to_int32)
DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue *, Handle< String >)
DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue *, HObjectAccess, HValue *)
static HCheckValue * New(Zone *zone, HValue *context, HValue *value, Handle< JSFunction > func)
DECLARE_INSTRUCTION_FACTORY_P2(HWrapReceiver, HValue *, HValue *)
Handle< JSFunction > known_function()
HShr(HValue *context, HValue *left, HValue *right)
HArgumentsObject * arguments_object()
HBasicBlock * limit_validity_
bool CheckIfBranchIsLoopGuard(Token::Value token, HBasicBlock *current_branch, HBasicBlock *other_branch)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallFunction, HValue *, int, CallFunctionFlags)
void set_incoming_value(HPhi *value)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadNamedGeneric, HValue *, Handle< Object >)
static HObjectAccess ForJSArrayBufferViewWeakNext()
bool IsStringLength() const
HTypeofIsAndBranch(HValue *value, Handle< String > type_literal)
static HInstruction * New(Zone *zone, HValue *context, HValue *left, HValue *right, Operation op)
Handle< Object > name() const
HLoadNamedGeneric(HValue *context, HValue *object, Handle< Object > name)
static HObjectAccess ForHeapNumberValue()
HCheckInstanceType(HValue *value, Check check)
HValue * parameter_count() const
DECLARE_INSTRUCTION_FACTORY_P2(HUnknownOSRValue, HEnvironment *, int)
const ZoneList< HValue * > * arguments_values() const
bool HasValueForIndex(int index)
CallInterfaceDescriptor descriptor() const
bool value_is_smi() const
static HObjectAccess ForFunctionContextPointer()
InliningKind inlining_kind_
bool has_size_upper_bound()
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HDeclareGlobals, Handle< FixedArray >, int)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HForInPrepareMap, HValue *)
static HInstruction * New(Zone *zone, HValue *context, HValue *left, HValue *right)
Unique< Object > GetUnique() const
static HObjectAccess ForMapAndOffset(Handle< Map > map, int offset, Representation representation=Representation::Tagged())
void AddCheck(HBoundsCheck *check, int32_t upper_limit=kNoLimit)
DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap)
static HStoreCodeEntry * New(Zone *zone, HValue *context, HValue *function, HValue *code)
virtual int argument_delta() const OVERRIDE
static HValue * IgnoreOsrValue(HValue *v)
HCapturedObject(int length, int id, Zone *zone)
StringAddFlags flags() const
static HInstruction * New(Zone *zone, HValue *context, Token::Value op, HValue *left, HValue *right)
DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue *, Handle< PropertyCell >, PropertyDetails)
const UniqueSet< Map > * maps_
const char * GetCheckName() const
static HConstant * CreateAndInsertAfter(Zone *zone, HValue *context, int32_t value, Representation representation, HInstruction *instruction)
static HInstruction * New(Zone *zone, HValue *context, HValue *value, Representation required_representation)
DECLARE_INSTRUCTION_FACTORY_P0(HThisFunction)
HCallWithDescriptor(HValue *target, int argument_count, CallInterfaceDescriptor descriptor, const Vector< HValue * > &operands, Zone *zone)
void Intersect(Range *other)
HLoadKeyed(HValue *obj, HValue *key, HValue *dependency, ElementsKind elements_kind, LoadKeyedHoleMode mode=NEVER_RETURN_HOLE, int offset=kDefaultKeyedHeaderOffsetSentinel)
HLoadFunctionPrototype(HValue *function)
DECLARE_INSTRUCTION_FACTORY_P4(HStoreContextSlot, HValue *, int, Mode, HValue *)
static HCheckMaps * New(Zone *zone, HValue *context, HValue *value, SmallMapList *map_list, HValue *typecheck=NULL)
static HObjectAccess ForJSArrayOffset(int offset)
Handle< String > name() const
bool NotInNewSpace() const
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallNewArray, HValue *, int, ElementsKind)
static void DecomposeBitwise(HValue *value, BitwiseDecompositionResult *result)
virtual void InferRepresentation(HInferRepresentationPhase *h_infer) OVERRIDE
int smi_non_phi_uses() const
HObjectAccess access() const
static HObjectAccess ForLiteralsPointer()
HHasInstanceTypeAndBranch(HValue *value, InstanceType type)
Handle< String > StringValue() const
HBoundsCheck(HValue *index, HValue *length)
void AddConstant(int32_t value)
HCompareMinusZeroAndBranch(HValue *value)
HStoreKeyedGeneric(HValue *context, HValue *object, HValue *key, HValue *value, StrictMode strict_mode)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HStringCharCodeAt, HValue *, HValue *)
bool is_typed_elements() const
FunctionLiteral * function_
Handle< FixedArray > feedback_vector() const
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle< Object >)
static HConstant * CreateAndInsertBefore(Zone *zone, HValue *context, int32_t value, Representation representation, HInstruction *instruction)
void set_can_be_minus_zero(bool b)
virtual OStream & PrintDataTo(OStream &os) const
static HObjectAccess ForMapBitField2()
Handle< JSFunction > closure() const
HEnvironment * environment_
bool pass_argument_count_
HLoadRoot(Heap::RootListIndex index, HType type=HType::Tagged())
static HObjectAccess ForJSTypedArrayLength()
DECLARE_INSTRUCTION_FACTORY_P2(HBoundsCheck, HValue *, HValue *)
static HObjectAccess ForConsStringSecond()
void MarkAsStabilityCheck()
HConstant(ExternalReference reference)
Handle< String > class_name_
static HObjectAccess ForArrayLength(ElementsKind elements_kind)
DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int)
DECLARE_INSTRUCTION_FACTORY_P3(HAccessArgumentsAt, HValue *, HValue *, HValue *)
ZoneList< HValue * > values_
void CombinedMin(Range *other)
void set_known_successor_index(int known_successor_index)
void AddOperand(HValue *v, Zone *zone)
ElementsKind elements_kind() const
void CombinedMax(Range *other)
static HObjectAccess ForMapBitField()
void GetCheckInterval(InstanceType *first, InstanceType *last)
bool IsInductionVariable()
HArgumentsElements(bool from_inlined)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HRegExpLiteral, Handle< FixedArray >, Handle< String >, Handle< String >, int)
void AddInput(HValue *value)
HDateField(HValue *date, Smi *index)
void ReplayEnvironment(HEnvironment *env)
HBoundsCheck * bounds_check()
static HObjectAccess ForJSArrayBufferBackingStore()
virtual void InternalSetOperandAt(int index, HValue *value) OVERRIDE
virtual intptr_t Hashcode() OVERRIDE
LoadKeyedHoleMode hole_mode() const
HConstant * size_upper_bound()
DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HStackCheck, Type)
bool Includes(int value) const
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HFunctionLiteral, Handle< SharedFunctionInfo >, bool)
Unique< HeapObject > object_
Range * CopyClearUpper(Zone *zone) const
int GetAssignedIndexAt(int index) const
HWrapReceiver(HValue *receiver, HValue *function)
HParameter(unsigned index, ParameterKind kind=STACK_PARAMETER)
HEnvironmentMarker(Kind kind, int index)
Unique< PropertyCell > cell_
static HCallJSFunction * New(Zone *zone, HValue *context, HValue *function, int argument_count, bool pass_argument_count)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue *, Handle< String >, bool)
static HObjectAccess ForCodeEntryPointer()
void CreateFreeSpaceFiller(int32_t filler_size)
DECLARE_INSTRUCTION_FACTORY_P1(HHasCachedArrayIndexAndBranch, HValue *)
bool is_generator() const
HCheckValue(HValue *value, Unique< HeapObject > object, bool object_in_new_space)
void set_arguments_pushed()
HConstant * closure_context_
DECLARE_INSTRUCTION_FACTORY_P0(HDebugBreak)
DECLARE_INSTRUCTION_FACTORY_P4(HStoreNamedField, HValue *, HObjectAccess, HValue *, StoreFieldOrKeyedMode)
bool MulAndCheckOverflow(const Representation &r, Range *other)
HAccessArgumentsAt(HValue *arguments, HValue *length, HValue *index)
static HEnterInlined * New(Zone *zone, HValue *context, BailoutId return_id, Handle< JSFunction > closure, HConstant *closure_context, int arguments_count, FunctionLiteral *function, InliningKind inlining_kind, Variable *arguments_var, HArgumentsObject *arguments_object)
StoreFieldOrKeyedMode store_mode_
HBasicBlock * induction_exit_target_
void MakePrefillWithFiller()
virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason) OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P3(HHasInstanceTypeAndBranch, HValue *, InstanceType, InstanceType)
static HObjectAccess ForJSArrayBufferViewByteOffset()
void InternalSetOperandAt(int index, HValue *value) FINAL OVERRIDE
HValue * dependency() const
HStoreNamedField * filler_free_space_size_
static HObjectAccess ForSharedFunctionInfoPointer()
static HTransitionElementsKind * New(Zone *zone, HValue *context, HValue *object, Handle< Map > original_map, Handle< Map > transitioned_map)
void RegisterReturnTarget(HBasicBlock *return_target, Zone *zone)
void set_ast_id(BailoutId id)
DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker)
DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue *, Check)
virtual Representation KnownOptimalRepresentation() OVERRIDE
void SetGVNFlags(HValue *instr, PropertyAccessType access_type)
void set_known_initial_map(Handle< Map > known_initial_map)
static HAllocate * New(Zone *zone, HValue *context, HValue *size, HType type, PretenureFlag pretenure_flag, InstanceType instance_type, Handle< AllocationSite > allocation_site=Handle< AllocationSite >::null())
static HObjectAccess ForFixedArrayHeader(int offset)
bool existing_inobject_property() const
HCompareMap(HValue *value, Handle< Map > map, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
int known_successor_index() const
HValue * receiver() const
HUseConst(HValue *old_value)
void set_next_simulate(HSimulate *simulate)
DECLARE_INSTRUCTION_FACTORY_P1(HIsUndetectableAndBranch, HValue *)
bool MustClearNextMapWord() const
static HObjectAccess ForJSArrayBufferByteLength()
HEnvironment * environment()
DECLARE_INSTRUCTION_FACTORY_P1(HCompareHoleAndBranch, HValue *)
HLoadFieldByIndex(HValue *object, HValue *index)
HCallFunction(HValue *context, HValue *function, int argument_count, CallFunctionFlags flags=NO_CALL_FUNCTION_FLAGS)
DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue *)
virtual Representation RequiredInputRepresentation(int index)
HStringAdd(HValue *context, HValue *left, HValue *right, PretenureFlag pretenure_flag, StringAddFlags flags, Handle< AllocationSite > allocation_site)
HOsrEntry(BailoutId ast_id)
Representation to() const
CallFunctionFlags function_flags() const
HHasInstanceTypeAndBranch(HValue *value, InstanceType from, InstanceType to)
static HInvokeFunction * New(Zone *zone, HValue *context, HValue *function, Handle< JSFunction > known_function, int argument_count)
bool NeedsCanonicalization()
HSar(HValue *context, HValue *left, HValue *right)
bool MustAllocateDoubleAligned() const
HAllocate(HValue *context, HValue *size, HType type, PretenureFlag pretenure_flag, InstanceType instance_type, Handle< AllocationSite > allocation_site=Handle< AllocationSite >::null())
HLeaveInlined(HEnterInlined *entry, int drop_count)
HValue * arguments() const
HValue * GetRedundantReplacement()
DECLARE_INSTRUCTION_FACTORY_P3(HParameter, unsigned, ParameterKind, Representation)
HClassOfTestAndBranch(HValue *value, Handle< String > class_name)
void set_index_cache(HForInCacheArray *index_cache)
bool object_in_new_space_
DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue *, Handle< Map >)
bool is_backwards_branch()
ExternalReference ExternalReferenceValue() const
bool has_no_literals() const
CodeStub::Major major_key()
bool TryIncreaseBaseOffset(uint32_t increase_by_value)
DECLARE_INSTRUCTION_FACTORY_P1(HLoadRoot, Heap::RootListIndex)
Handle< JSFunction > function_
HStoreKeyed(HValue *obj, HValue *key, HValue *val, ElementsKind elements_kind, StoreFieldOrKeyedMode store_mode=INITIALIZING_STORE, int offset=kDefaultKeyedHeaderOffsetSentinel)
StrictMode strict_mode() const
void AddIndirectUsesTo(int *use_count)
STATIC_ASSERT(kElementsKindCount<=(1<< kBitsForElementsKind))
HStoreGlobalCell(HValue *value, Handle< PropertyCell > cell, PropertyDetails details)
static HInstruction * New(Zone *zone, HValue *context, String::Encoding encoding, HValue *string, HValue *index)
HInstanceOf(HValue *context, HValue *left, HValue *right)
bool HasExternalReferenceValue() const
bool IsInSmiRange() const
ToBooleanStub::Types expected_input_types() const
ChecksRelatedToLength * checks()
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
double DoubleValue() const
DECLARE_INSTRUCTION_FACTORY_P1(HIsSmiAndBranch, HValue *)
HBranch(HValue *value, ToBooleanStub::Types expected_input_types=ToBooleanStub::Types(), HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
DECLARE_INSTRUCTION_FACTORY_P3(HIsStringAndBranch, HValue *, HBasicBlock *, HBasicBlock *)
static HObjectAccess ForCodeOffset()
static HObjectAccess ForExternalUInteger8()
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue *, Handle< String >, HValue *, StrictMode)
bool RequiresHoleCheck() const
const ZoneList< HValue * > * values() const
static HArgumentsObject * New(Zone *zone, HValue *context, int count)
bool has_external_reference_value_
Handle< Object > handle(Isolate *isolate)
Variable * arguments_var_
HEnterInlined(BailoutId return_id, Handle< JSFunction > closure, HConstant *closure_context, int arguments_count, FunctionLiteral *function, InliningKind inlining_kind, Variable *arguments_var, HArgumentsObject *arguments_object, Zone *zone)
bool DetectCompoundIndex()
bool object_in_new_space() const
static HObjectAccess ForBackingStoreOffset(int offset, Representation representation=Representation::Tagged())
void AddArgument(HValue *argument, Zone *zone)
static HObjectAccess ForHeapNumberValueLowestBits()
HParameter(unsigned index, ParameterKind kind, Representation r)
bool HasDependency() const
virtual void DeleteFromGraph() OVERRIDE
ZoneList< HValue * > inputs_
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreKeyedGeneric, HValue *, HValue *, HValue *, StrictMode)
InductionVariableData * induction_variable_data()
static HObjectAccess ForJSArrayBufferViewBuffer()
virtual OStream & PrintTo(OStream &os) const OVERRIDE
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue *)
HPushArguments(Zone *zone)
bool IsMostGeneric() const
Handle< FixedArray > pairs() const
InductionVariableData * induction_variable_data_
int formal_parameter_count_
HConstant * size_upper_bound_
HDeoptimize(const char *reason, Deoptimizer::BailoutType type, HBasicBlock *unreachable_continuation)
bool has_transition() const
HValue * length() const
The number of Latin-1 characters in the string.
DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue *)
DECLARE_INSTRUCTION_FACTORY_P2(HHasInstanceTypeAndBranch, HValue *, InstanceType)
HRor(HValue *context, HValue *left, HValue *right)
Unique< PropertyCell > cell() const
Unique< String > type_literal_
void InitRealUses(int id)
int double_non_phi_uses() const
ElementsKind from_kind() const
Handle< String > pattern_
int int32_indirect_uses() const
DECLARE_INSTRUCTION_FACTORY_P1(HCompareMinusZeroAndBranch, HValue *)
HMod(HValue *context, HValue *left, HValue *right)
HMathMinMax(HValue *context, HValue *left, HValue *right, Operation op)
HRegExpLiteral(HValue *context, Handle< FixedArray > literals, Handle< String > pattern, Handle< String > flags, int literal_index)
static HObjectAccess ForPropertyCellValue()
static HObjectAccess ForMapInstanceTypeAndBitField()
static HConstant * CreateAndInsertAfter(Zone *zone, Unique< Map > map, bool map_is_stable, HInstruction *instruction)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HReturn, HValue *)
HValue * typecheck() const
HStringCharCodeAt(HValue *context, HValue *string, HValue *index)
static HObjectAccess ForNextFunctionLinkPointer()
bool allow_equality() const
bool IsLimitedInductionVariable()
static HObjectAccess ForAllocationSiteList()
static HCallWithDescriptor * New(Zone *zone, HValue *context, HValue *target, int argument_count, CallInterfaceDescriptor descriptor, const Vector< HValue * > &operands)
virtual HValue * OperandAt(int index) const OVERRIDE
void AddNonPhiUsesFrom(HPhi *other)
void set_save_doubles(SaveFPRegsMode save_doubles)
DECLARE_INSTRUCTION_FACTORY_P1(HIsStringAndBranch, HValue *)
virtual void InternalSetOperandAt(int i, HValue *value) FINAL OVERRIDE
void MergeWith(ZoneList< HSimulate * > *list)
bool HasAssignedIndexAt(int index) const
static HObjectAccess ForContextSlot(int index)
DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue *, HValue *, HValue *, ElementsKind, StoreFieldOrKeyedMode)
DECLARE_INSTRUCTION_FACTORY_P1(HCheckSmi, HValue *)
HValue * additional_upper_limit_
bool UsesMustHandleHole() const
Range(int32_t lower, int32_t upper)
DECLARE_INSTRUCTION_FACTORY_P2(HConstructDouble, HValue *, HValue *)
HForInCacheArray * index_cache_
bool HasMergedIndex() const
static HPushArguments * New(Zone *zone, HValue *context)
virtual bool DataEquals(HValue *other) OVERRIDE
Range * Copy(Zone *zone) const
static InductionVariableData * ExaminePhi(HPhi *phi)
ParameterKind kind() const
int smi_indirect_uses() const
bool HasObjectMap() const
Unique< Map > MapValue() const
HReturn(HValue *context, HValue *value, HValue *parameter_count=0)
virtual bool TryDecompose(DecompositionResult *decomposition) OVERRIDE
BailoutId ReturnId() const
static HObjectAccess ForJSArrayBufferWeakFirstView()
static HObjectAccess ForMap()
HConstant(Unique< Object > object, Unique< Map > object_map, bool has_stable_map_value, Representation r, HType type, bool is_not_in_new_space, bool boolean_value, bool is_undetectable, InstanceType instance_type)
static bool CompatibleInstanceTypes(InstanceType type1, InstanceType type2)
SmiCheck SmiCheckForWriteBarrier() const
DECLARE_INSTRUCTION_FACTORY_P3(HIsSmiAndBranch, HValue *, HBasicBlock *, HBasicBlock *)
void AddPushedValue(HValue *value)
virtual bool HasOutOfBoundsAccess(int size) OVERRIDE
bool maps_are_stable() const
bool AddAndCheckOverflow(const Representation &r, Range *other)
bool HasInternalizedStringValue() const
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
const PretenureFlag pretenure_flag_
PointersToHereCheck PointersToHereCheckForValue() const
DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation)
HArgumentsLength(HValue *value)
HIsSmiAndBranch(HValue *value, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
void SetDehoisted(bool is_dehoisted)
HValue * enumerable() const
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HSeqStringSetChar, String::Encoding, HValue *, HValue *, HValue *)
HArgumentsObject(int count, Zone *zone)
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double)
static HInstruction * New(Zone *zone, HValue *context, HValue *value, BuiltinFunctionId op)
HCheckMapValue(HValue *value, HValue *map)
Unique< Map > map() const
bool EqualsUnique(Unique< Object > other) const
bool IsSpecialDouble() const
static HCheckMaps * New(Zone *zone, HValue *context, HValue *value, Handle< Map > map, HValue *typecheck=NULL)
bool additional_lower_limit_is_included()
HMul(HValue *context, HValue *left, HValue *right)
bool IsConstantHoleStore()
const char * OpName() const
PretenureFlag pretenure_flag() const
DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue *)
HSeqStringGetChar(String::Encoding encoding, HValue *string, HValue *index)
HToFastProperties(HValue *value)
DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue *)
static int32_t ComputeIncrement(HPhi *phi, HValue *phi_operand)
Deoptimizer::BailoutType type_
static HCheckMaps * CreateAndInsertBefore(Zone *zone, HValue *value, const UniqueSet< Map > *maps, bool maps_are_stable, HInstruction *instr)
bool IsUndetectable() const
DECLARE_INSTRUCTION_FACTORY_P3(HIsUndetectableAndBranch, HValue *, HBasicBlock *, HBasicBlock *)
void StackUpon(Range *other)
virtual HValue * OperandAt(int index) const FINAL OVERRIDE
static Flags ComputeFlags(PretenureFlag pretenure_flag, InstanceType instance_type)
HApplyArguments(HValue *function, HValue *receiver, HValue *length, HValue *elements)
HInvokeFunction(HValue *context, HValue *function, Handle< JSFunction > known_function, int argument_count)
HIsUndetectableAndBranch(HValue *value, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue *, HValue *, HValue *, ElementsKind)
ZoneList< HBasicBlock * > * return_targets()
static HObjectAccess ForCounter()
HForInCacheArray * index_cache()
virtual bool KnownSuccessorBlock(HBasicBlock **block) OVERRIDE
bool additional_upper_limit_is_included()
InstanceType instance_type_
void AddAssignedValue(int index, HValue *value)
virtual HValue * Canonicalize() OVERRIDE
int formal_parameter_count() const
DECLARE_INSTRUCTION_FACTORY_P2(HLoadGlobalCell, Handle< Cell >, PropertyDetails)
Code::Flags flags() const
static HPushArguments * New(Zone *zone, HValue *context, HValue *arg1, HValue *arg2)
HSeqStringSetChar(HValue *context, String::Encoding encoding, HValue *string, HValue *index, HValue *value)
HCallStub(HValue *context, CodeStub::Major major_key, int argument_count)
bool SubAndCheckOverflow(const Representation &r, Range *other)
static HDeoptimize * New(Zone *zone, HValue *context, const char *reason, Deoptimizer::BailoutType type, HBasicBlock *unreachable_continuation)
static HObjectAccess ForOptimizedCodeMap()
void UpdateSize(HValue *size)
void SimplifyConstantInputs()
static HObjectAccess ForField(Handle< Map > map, int index, Representation representation, Handle< String > name)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HTailCallThroughMegamorphicCache, HValue *, HValue *, Code::Flags)
static HObjectAccess ForMapInObjectProperties()
static const int kInvalidFeedbackSlot
static const int kLengthOffset
static bool is_the_hole_nan(double value)
static const int kNativeContextOffset
virtual OStream & PrintDataTo(OStream &os) const
HAllocateBlockContext(HValue *context, HValue *function, Handle< ScopeInfo > scope_info)
Handle< ScopeInfo > scope_info() const
DECLARE_INSTRUCTION_FACTORY_P3(HAllocateBlockContext, HValue *, HValue *, Handle< ScopeInfo >)
virtual Representation RequiredInputRepresentation(int index)
Handle< ScopeInfo > scope_info_
virtual void RepresentationChanged(Representation to) OVERRIDE
virtual bool IsDeletable() const OVERRIDE
HArithmeticBinaryOperation(HValue *context, HValue *left, HValue *right)
virtual Representation RequiredInputRepresentation(int index) FINAL OVERRIDE
HBinaryCall(HValue *first, HValue *second, int argument_count)
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
HValue * BetterLeftOperand()
virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason) OVERRIDE
virtual Representation observed_input_representation(int index) OVERRIDE
HValue * BetterRightOperand()
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
HBinaryOperation(HValue *context, HValue *left, HValue *right, HType type=HType::Tagged())
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
void set_observed_input_representation(int index, Representation rep)
virtual void initialize_output_representation(Representation observed)
virtual bool IsCommutative() const
virtual void AssumeRepresentation(Representation r) OVERRIDE
virtual Representation RepresentationFromInputs() OVERRIDE
Representation RepresentationFromOutput()
bool AreOperandsBetterSwitched()
void SetOperandPositions(Zone *zone, HSourcePosition left_pos, HSourcePosition right_pos)
bool IgnoreObservedOutputRepresentation(Representation current_rep)
Representation observed_output_representation_
virtual void InferRepresentation(HInferRepresentationPhase *h_infer) OVERRIDE
Representation observed_input_representation_[2]
virtual bool IsDeletable() const OVERRIDE
virtual void RepresentationChanged(Representation to) OVERRIDE
virtual Representation observed_input_representation(int index) OVERRIDE
virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason) OVERRIDE
HBitwiseBinaryOperation(HValue *context, HValue *left, HValue *right, HType type=HType::TaggedNumber())
virtual void initialize_output_representation(Representation observed)
virtual HType CalculateInferredType() FINAL OVERRIDE
virtual int argument_delta() const OVERRIDE
virtual int argument_count() const
DECLARE_INSTRUCTION_FACTORY_P5(HCompareNumericAndBranch, HValue *, HValue *, Token::Value, HBasicBlock *, HBasicBlock *)
void set_observed_input_representation(Representation left, Representation right)
Representation observed_input_representation_[2]
HCompareNumericAndBranch(HValue *left, HValue *right, Token::Value token, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P3(HCompareNumericAndBranch, HValue *, HValue *, Token::Value)
virtual void InferRepresentation(HInferRepresentationPhase *h_infer) OVERRIDE
void SetOperandPositions(Zone *zone, HSourcePosition left_pos, HSourcePosition right_pos)
Token::Value token() const
virtual bool KnownSuccessorBlock(HBasicBlock **block) OVERRIDE
virtual Representation observed_input_representation(int index) OVERRIDE
HCompareObjectEqAndBranch(HValue *left, HValue *right, HBasicBlock *true_target=NULL, HBasicBlock *false_target=NULL)
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
virtual bool KnownSuccessorBlock(HBasicBlock **block) OVERRIDE
void set_known_successor_index(int known_successor_index)
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
static const int kNoKnownSuccessorIndex
DECLARE_INSTRUCTION_FACTORY_P4(HCompareObjectEqAndBranch, HValue *, HValue *, HBasicBlock *, HBasicBlock *)
DECLARE_INSTRUCTION_FACTORY_P2(HCompareObjectEqAndBranch, HValue *, HValue *)
int known_successor_index() const
int known_successor_index_
virtual Representation observed_input_representation(int index) OVERRIDE
HBasicBlock * FirstSuccessor()
HBasicBlock * SecondSuccessor()
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
virtual int SuccessorCount() const =0
virtual bool KnownSuccessorBlock(HBasicBlock **block)
virtual void SetSuccessorAt(int i, HBasicBlock *block)=0
virtual HBasicBlock * SuccessorAt(int i) const =0
virtual HValue * OperandAt(int index) const FINAL OVERRIDE
virtual void InternalSetOperandAt(int index, HValue *value) FINAL OVERRIDE
HDematerializedObject(int count, Zone *zone)
virtual int OperandCount() const FINAL OVERRIDE
ZoneList< HValue * > values_
virtual bool HasEscapingOperandAt(int index) FINAL OVERRIDE
virtual Representation RequiredInputRepresentation(int index) FINAL OVERRIDE
void set_operand_position(Zone *zone, int index, HSourcePosition pos)
void InitializeAsFirst(HBasicBlock *block)
virtual bool HasStackCheck()
bool CanTruncateToInt32() const
virtual HSourcePosition position() const OVERRIDE
void set_position(HSourcePosition position)
virtual LInstruction * CompileToLithium(LChunkBuilder *builder)=0
HInstruction * previous() const
bool has_position() const
void InsertAfter(HInstruction *previous)
virtual void DeleteFromGraph() OVERRIDE
HInstruction(HType type=HType::Tagged())
HInstruction * next() const
bool Dominates(HInstruction *other)
virtual OStream & PrintTo(OStream &os) const OVERRIDE
virtual HSourcePosition operand_position(int index) const OVERRIDE
bool CanTruncateToSmi() const
virtual OStream & PrintDataTo(OStream &os) const
void InsertBefore(HInstruction *next)
HIsConstructCallAndBranch()
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
DECLARE_INSTRUCTION_FACTORY_P0(HIsConstructCallAndBranch)
virtual bool IsDeletable() const FINAL OVERRIDE
AllocationSiteMode allocation_site_mode_
AllocationSiteMode allocation_site_mode() const
int literal_index() const
static const intptr_t kInstructionPosIndex
bool has_operand_positions() const
static const intptr_t kPositionTag
HSourcePosition operand_position(int idx) const
void set_operand_position(int idx, HSourcePosition pos)
static bool IsTaggedPosition(intptr_t val)
static intptr_t UntagPosition(intptr_t val)
HSourcePosition * operand_positions() const
HSourcePosition * operand_position_slot(int idx) const
static const intptr_t kPositionShift
void ensure_storage_for_operand_positions(Zone *zone, int operand_count)
void set_position(HSourcePosition pos)
static intptr_t TagPosition(intptr_t val)
HSourcePosition position() const
static const intptr_t kFirstOperandPosIndex
BitField< int, 9, 23 > PositionField
void set_position(int position)
static HSourcePosition Unknown()
void set_inlining_id(int inlining_id)
HSourcePosition(const HSourcePosition &other)
BitField< int, 0, 9 > InliningIdField
HSourcePosition(int value)
virtual Representation RequiredInputRepresentation(int index)
DECLARE_INSTRUCTION_FACTORY_P1(HStoreFrameContext, HValue *)
HStoreFrameContext(HValue *context)
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HStringCompareAndBranch, HValue *, HValue *, Token::Value)
HStringCompareAndBranch(HValue *context, HValue *left, HValue *right, Token::Value token)
Token::Value token() const
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
virtual Representation RequiredInputRepresentation(int index) OVERRIDE
Representation GetInputRepresentation() const
void SetSuccessorAt(int i, HBasicBlock *block) OVERRIDE
EmbeddedContainer< HBasicBlock *, S > successors_
EmbeddedContainer< HValue *, V > inputs_
void InternalSetOperandAt(int i, HValue *value) OVERRIDE
int SuccessorCount() const OVERRIDE
HBasicBlock * SuccessorAt(int i) const OVERRIDE
int OperandCount() const OVERRIDE
HValue * OperandAt(int i) const OVERRIDE
virtual int OperandCount() const FINAL OVERRIDE
virtual void InternalSetOperandAt(int i, HValue *value) FINAL OVERRIDE
HTemplateInstruction(HType type=HType::Tagged())
virtual HValue * OperandAt(int i) const FINAL OVERRIDE
EmbeddedContainer< HValue *, V > inputs_
HUnaryCall(HValue *value, int argument_count)
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
virtual Representation RequiredInputRepresentation(int index) FINAL OVERRIDE
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
HUnaryControlInstruction(HValue *value, HBasicBlock *true_target, HBasicBlock *false_target)
HUnaryOperation(HValue *value, HType type=HType::Tagged())
static HUnaryOperation * cast(HValue *value)
virtual OStream & PrintDataTo(OStream &os) const OVERRIDE
HUseListNode(HValue *value, int index, HUseListNode *tail)
void set_tail(HUseListNode *list)
static HValue * cast(HValue *value)
virtual void RepresentationChanged(Representation to)
virtual void InternalSetOperandAt(int index, HValue *value)=0
static const int kNoRedefinedOperand
bool Equals(HValue *other)
HValue(HType type=HType::Tagged())
void SetChangesFlag(GVNFlag f)
MinusZeroMode GetMinusZeroMode()
virtual bool TryDecompose(DecompositionResult *decomposition)
virtual Representation KnownOptimalRepresentation()
bool ToStringOrToNumberCanBeObserved() const
bool HasSideEffects() const
virtual void InferRepresentation(HInferRepresentationPhase *h_infer)
GVNFlagSet ObservableChangesFlags() const
void ClearAllSideEffects()
GVNFlagSet SideEffectFlags() const
virtual HSourcePosition operand_position(int index) const
void RemoveLastAddedRange()
virtual bool EmitAtUses()
friend OStream & operator<<(OStream &os, const ChangesOf &v)
bool CheckDependsOnFlag(GVNFlag f) const
virtual Opcode opcode() const =0
virtual Representation observed_input_representation(int index)
virtual bool DataEquals(HValue *other)
void ReplaceAllUsesWith(HValue *other)
virtual void DeleteFromGraph()=0
bool HasObservableSideEffects() const
virtual int OperandCount() const =0
bool CheckUsesForFlag(Flag f) const
static GVNFlagSet AllObservableSideEffectsFlagSet()
void AddNewRange(Range *r, Zone *zone)
GVNFlagSet DependsOnFlags() const
bool HasMultipleUses() const
void set_type(HType new_type)
bool IsDefinedAfter(HBasicBlock *other) const
HBasicBlock * block() const
int32_t GetInteger32Constant()
GVNFlagSet ChangesFlags() const
void ChangeRepresentation(Representation r)
bool EqualsInteger32Constant(int32_t value)
virtual bool HasOutOfBoundsAccess(int size)
DISALLOW_COPY_AND_ASSIGN(HValue)
virtual void FinalizeUniqueness()
bool CheckChangesFlag(GVNFlag f) const
bool HasMonomorphicJSObjectType()
virtual HType CalculateInferredType()
void ClearDependsOnFlag(GVNFlag f)
virtual void AssumeRepresentation(Representation r)
Representation RepresentationFromUseRequirements()
void CopyFlag(Flag f, HValue *other)
virtual bool HasEscapingOperandAt(int index)
Representation representation_
virtual Representation RepresentationFromInputs()
const char * Mnemonic() const
bool IsInteger32Constant()
bool UpdateInferredType()
bool CannotBeEliminated() const
Isolate * isolate() const
void AddDependantsToWorklist(HInferRepresentationPhase *h_infer)
static const int kNoNumber
GVNFlagSet depends_on_flags_
HValue * RedefinedOperand()
virtual Representation RequiredInputRepresentation(int index)=0
virtual Handle< Map > GetMonomorphicJSObjectMap()
void ClearChangesFlag(GVNFlag f)
virtual intptr_t Hashcode()
bool ToNumberCanBeObserved() const
void RegisterUse(int index, HValue *new_value)
virtual Range * InferRange(Zone *zone)
virtual bool IsDeletable() const
static GVNFlagSet AllFlagSet()
void set_representation(Representation r)
virtual OStream & PrintTo(OStream &os) const =0
Representation representation() const
void SetOperandAt(int index, HValue *value)
bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const
virtual HValue * Canonicalize()
virtual int argument_delta() const
bool CheckFlag(Flag f) const
GVNFlagSet changes_flags_
virtual int RedefinedOperandIndex()
STATIC_ASSERT(kLastFlag< kBitsPerInt)
virtual bool IsPurelyInformativeDefinition()
HUseIterator uses() const
bool IsBitwiseBinaryShift()
void SetBlock(HBasicBlock *block)
@ kHasNoObservableSideEffects
@ kTrackSideEffectDominators
@ kFlexibleRepresentation
@ kAllUsesTruncatingToSmi
@ kAllUsesTruncatingToInt32
bool ToStringCanBeObserved() const
static GVNFlagSet AllSideEffectsFlagSet()
virtual HValue * OperandAt(int index) const =0
void DeleteAndReplaceWith(HValue *other)
virtual Representation RepresentationFromUses()
bool IsInformativeDefinition()
bool CanReplaceWithDummyUses()
void SetDependsOnFlag(GVNFlag f)
HUseListNode * RemoveUse(HValue *value, int index)
virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason)
virtual HSourcePosition position() const
void ComputeInitialRange(Zone *zone)
virtual bool HandleSideEffectDominator(GVNFlag side_effect, HValue *dominator)
static Handle< T > cast(Handle< S > that)
static const int kValueOffset
static const int kMapOffset
bool InNewSpace(Object *object)
static AllocationSpace TargetSpaceId(InstanceType type)
static const int kWeakNextOffset
static const int kByteOffsetOffset
static const int kByteLengthOffset
static const int kBufferOffset
static const int kByteLengthOffset
static const int kWeakFirstViewOffset
static const int kBackingStoreOffset
static const int kLengthOffset
static const int kNextFunctionLinkOffset
static const int kSharedFunctionInfoOffset
static const int kContextOffset
static const int kLiteralsOffset
static const int kCodeEntryOffset
static const int kPrototypeOrInitialMapOffset
static const int kPropertiesOffset
static const int kElementsOffset
static const int kLengthOffset
static const int kBitFieldOffset
static const int kInstanceTypeOffset
static const int kBitField2Offset
static const int kInstanceSizeOffset
static const int kInObjectPropertiesOffset
static const int kInstanceTypeAndBitFieldOffset
static const int kHashFieldOffset
static const int kNoPosition
static Representation Double()
static Representation UInteger8()
bool IsUInteger16() const
static Representation External()
bool IsHeapObject() const
static Representation Smi()
bool IsSmiOrInteger32() const
Representation generalize(Representation other)
static Representation Integer32()
bool Equals(const Representation &other) const
static Representation UInteger16()
static Representation Tagged()
static Representation None()
static Representation FromKind(Kind kind)
static const int kOptimizedCodeMapOffset
static const int kCodeOffset
static const int kMaxValue
static const int kMinValue
static const int32_t kMaxOneByteCharCode
static const int kMaxLength
static const int kLengthOffset
static const int kMaxUtf16CodeUnit
static bool IsCompareOp(Value op)
static bool IsEqualityOp(Value op)
static Unique< T > cast(Unique< S > that)
static Unique< T > CreateUninitialized(Handle< T > handle)
Isolate * isolate() const
#define V(NAME, Name, id)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric literals(0o77, 0b11)") DEFINE_BOOL(harmony_object_literals
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_BOOL(profile_deserialization
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction pairs(ARM only)") DEFINE_BOOL(enable_unaligned_accesses
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
#define DECLARE_ABSTRACT_INSTRUCTION(type)
#define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V)
#define DECLARE_CONCRETE_INSTRUCTION(type)
#define DECLARE_PREDICATE(type)
#define GVN_TRACKED_FLAG_LIST(V)
#define DECLARE_OPCODE(type)
#define DECLARE_FLAG(Type)
#define GVN_UNTRACKED_FLAG_LIST(V)
#define DCHECK_NOT_NULL(p)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
bool IsPowerOfTwo32(uint32_t value)
bool Equals(Node *a, Node *b)
static GVNFlag GVNFlagFromInt(int i)
bool IsDoubleOrFloatElementsKind(ElementsKind kind)
bool IsArrowFunction(FunctionKind kind)
@ DONT_TRACK_ALLOCATION_SITE
bool IsExternalArrayElementsKind(ElementsKind kind)
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
bool IsFastSmiOrObjectElementsKind(ElementsKind kind)
static Object * DeclareGlobals(Isolate *isolate, Handle< GlobalObject > global, Handle< String > name, Handle< Object > value, PropertyAttributes attr, bool is_var, bool is_const, bool is_function)
bool IsGeneratorFunction(FunctionKind kind)
bool StoringValueNeedsWriteBarrier(HValue *value)
@ STORE_TO_INITIALIZED_ENTRY
bool IsConciseMethod(FunctionKind kind)
bool IsHoleyElementsKind(ElementsKind kind)
@ kNumberOfUntrackedSideEffects
@ kNumberOfTrackedSideEffects
EnumSet< GVNFlag, int32_t > GVNFlagSet
const int kElementsKindCount
@ FIXED_DOUBLE_ARRAY_TYPE
@ EXTERNAL_FLOAT32_ELEMENTS
@ EXTERNAL_FLOAT64_ELEMENTS
@ EXTERNAL_UINT32_ELEMENTS
bool IsSimpleMapChangeTransition(ElementsKind from_kind, ElementsKind to_kind)
bool IsFastDoubleElementsKind(ElementsKind kind)
Handle< T > handle(T *t, Isolate *isolate)
bool CanBeZero(HValue *right)
@ TREAT_MINUS_ZERO_AS_ZERO
int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind)
OStream & operator<<(OStream &os, const BasicBlockProfiler &p)
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
bool IsFastElementsKind(ElementsKind kind)
static bool SmiValuesAre32Bits()
void PrintF(const char *format,...)
PointersToHereCheck PointersToHereCheckForObject(HValue *object, HValue *dominator)
static bool IsInteger32(double value)
static bool SmiValuesAre31Bits()
static const int kDefaultKeyedHeaderOffsetSentinel
bool ReceiverObjectNeedsWriteBarrier(HValue *object, HValue *value, HValue *dominator)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
bool IsFixedTypedArrayElementsKind(ElementsKind kind)
bool IsFastSmiElementsKind(ElementsKind kind)
@ kPointersToHereMaybeInteresting
@ kPointersToHereAreAlwaysInteresting
bool IsFastObjectElementsKind(ElementsKind kind)
Debugger support for the V8 JavaScript engine.
A simple Maybe type, representing an object which may or may not have a value.
ChangesOf(const HValue *const v)
BitwiseDecompositionResult()
HBasicBlock * other_target
LimitFromPredecessorBlock()
InductionVariableData * variable
InductionVariableLimitUpdate()
InductionVariableData * updated_variable
NameOf(const HValue *const v)
TypeOf(const HValue *const v)
#define T(name, string, precedence)