15 if (use_value->
IsPhi()) {
16 next = use_value->
block()->predecessors()->at(use_index)->end();
27 if (value->IsConstant()) {
28 HConstant* constant = HConstant::cast(value);
30 if (is_truncating_to_int &&
to.IsInteger32()) {
34 new_value = constant->CopyToRepresentation(
to,
graph()->zone());
38 if (new_value ==
NULL) {
39 new_value =
new(
graph()->zone()) HChange(
40 value,
to, is_truncating_to_smi, is_truncating_to_int);
44 DCHECK(!FLAG_hydrogen_track_positions ||
45 !
graph()->info()->IsOptimizing());
72 for (HUseIterator it(value->
uses()); !it.Done(); it.Advance()) {
73 HValue* use_value = it.value();
74 int use_index = it.index();
83 if (value->IsForceRepresentation()) {
84 HValue* input = HForceRepresentation::cast(value)->value();
85 if (input->IsChange()) {
86 HChange* change = HChange::cast(input);
96 DCHECK(value->IsConstant() || value->IsForceRepresentation());
101 if (value->IsForceRepresentation()) {
117 for (
int i = 0;
i < phi_list->length();
i++) {
118 HPhi* phi = phi_list->
at(
i);
119 if (phi->representation().IsInteger32()) {
121 }
else if (phi->representation().IsSmi()) {
127 for (
int i = 0;
i < phi_list->length();
i++) {
128 HPhi* phi = phi_list->
at(
i);
130 if (phi->representation().IsSmiOrInteger32() &&
132 int_worklist.
Add(phi, zone());
134 if (FLAG_trace_representation) {
135 PrintF(
"#%d Phi is not truncating Int32 because of #%d %s\n",
140 if (phi->representation().IsSmi() &&
142 smi_worklist.
Add(phi, zone());
144 if (FLAG_trace_representation) {
145 PrintF(
"#%d Phi is not truncating Smi because of #%d %s\n",
151 while (!int_worklist.is_empty()) {
152 HPhi* current = int_worklist.RemoveLast();
153 for (
int i = 0;
i < current->OperandCount(); ++
i) {
155 if (input->
IsPhi() &&
158 if (FLAG_trace_representation) {
159 PrintF(
"#%d Phi is not truncating Int32 because of #%d %s\n",
160 input->
id(), current->id(), current->Mnemonic());
163 int_worklist.
Add(HPhi::cast(input), zone());
168 while (!smi_worklist.is_empty()) {
169 HPhi* current = smi_worklist.RemoveLast();
170 for (
int i = 0;
i < current->OperandCount(); ++
i) {
172 if (input->
IsPhi() &&
175 if (FLAG_trace_representation) {
176 PrintF(
"#%d Phi is not truncating Smi because of #%d %s\n",
177 input->
id(), current->id(), current->Mnemonic());
180 smi_worklist.
Add(HPhi::cast(input), zone());
186 for (
int i = 0;
i < blocks->length(); ++
i) {
188 const HBasicBlock* block(blocks->
at(
i));
190 for (
int j = 0; j < phis->length(); j++) {
void set_position(HSourcePosition position)
HInstruction * next() const
void InsertBefore(HInstruction *next)
void InsertRepresentationChangeForUse(HValue *value, HValue *use_value, int use_index, Representation to)
void InsertRepresentationChangesForValue(HValue *value)
static HValue * cast(HValue *value)
virtual HSourcePosition operand_position(int index) const
HBasicBlock * block() const
const char * Mnemonic() const
virtual Representation RequiredInputRepresentation(int index)=0
Representation representation() const
void SetOperandAt(int index, HValue *value)
bool CheckFlag(Flag f) const
HUseIterator uses() const
virtual HValue * OperandAt(int index) const =0
void DeleteAndReplaceWith(HValue *other)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
bool IsSmiOrInteger32() const
bool Equals(const Representation &other) const
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 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 DCHECK(condition)
static bool SmiValuesAre32Bits()
void PrintF(const char *format,...)
static bool IsNonDeoptingIntToSmiChange(HChange *change)
Debugger support for the V8 JavaScript engine.
A simple Maybe type, representing an object which may or may not have a value.