23 CommonOperatorBuilder* common)
27 current_context_(
NULL),
28 exit_control_(
NULL) {}
32 int value_input_count,
33 Node** value_inputs) {
45 if (!has_context && !has_framestate && !has_control && !has_effect) {
46 result =
graph()->
NewNode(op, value_input_count, value_inputs);
48 int input_count_with_deps = value_input_count;
49 if (has_context) ++input_count_with_deps;
50 if (has_framestate) ++input_count_with_deps;
51 if (has_control) ++input_count_with_deps;
52 if (has_effect) ++input_count_with_deps;
53 Node** buffer =
zone()->
NewArray<Node*>(input_count_with_deps);
54 memcpy(buffer, value_inputs,
kPointerSize * value_input_count);
55 Node** current_input = buffer + value_input_count;
71 result =
graph()->
NewNode(op, input_count_with_deps, buffer);
105 control_dependency_(control_dependency),
106 effect_dependency_(control_dependency),
111 : builder_(copy.builder()),
112 control_dependency_(copy.control_dependency_),
113 effect_dependency_(copy.effect_dependency_),
114 values_(copy.values_) {}
125 if (this->IsMarkedAsUnreachable()) {
135 Node* control = builder_->MergeControl(this->GetControlDependency(),
137 UpdateControlDependency(control);
141 Node* effect = builder_->MergeEffect(this->GetEffectDependency(),
143 UpdateEffectDependency(effect);
147 for (
int i = 0; i < static_cast<int>(values_.size()); ++
i) {
148 values_[
i] = builder_->MergeValue(values_[
i], other->
values_[
i], control);
154 Node* control = GetControlDependency();
155 for (
int i = 0; i < static_cast<int>(values()->
size()); ++
i) {
156 Node* phi = builder_->NewPhi(1, values()->at(
i), control);
157 values()->at(
i) = phi;
159 Node* effect = builder_->NewEffectPhi(1, GetEffectDependency(), control);
160 UpdateEffectDependency(effect);
168 buffer[count] = control;
179 buffer[count] = control;
186 if (control->opcode() == IrOpcode::kLoop) {
189 control->AppendInput(
zone(), other);
191 }
else if (control->opcode() == IrOpcode::kMerge) {
194 control->AppendInput(
zone(), other);
208 if (value->opcode() == IrOpcode::kEffectPhi &&
211 value->set_op(
common()->EffectPhi(inputs));
212 value->InsertInput(
zone(), inputs - 1, other);
213 }
else if (value != other) {
216 value->ReplaceInput(inputs - 1, other);
225 if (value->opcode() == IrOpcode::kPhi &&
229 value->InsertInput(
zone(), inputs - 1, other);
230 }
else if (value != other) {
232 value =
NewPhi(inputs, value, control);
233 value->ReplaceInput(inputs - 1, other);
Node * NewNode(const Operator *op, int input_count, Node **inputs)
static Node * GetControlInput(Node *node, int index=0)
static int GetEffectInputCount(const Operator *op)
static bool HasContextInput(const Operator *op)
static bool HasFrameStateInput(const Operator *op)
static int GetControlInputCount(const Operator *op)
static bool HasControlOutput(const Operator *op)
virtual int InputCount() const =0
bool IsMarkedAsUnreachable()
void Merge(Environment *other)
void UpdateControlDependency(Node *dependency)
Node * GetControlDependency()
Node * GetEffectDependency()
void UpdateEffectDependency(Node *dependency)
Node * effect_dependency_
Node * control_dependency_
Environment(StructuredGraphBuilder *builder, Node *control_dependency)
Node * MergeControl(Node *control, Node *other)
Node * current_context() const
Node * exit_control() const
void UpdateControlDependencyToLeaveFunction(Node *exit)
Node * MergeEffect(Node *value, Node *other, Node *control)
Node * MergeValue(Node *value, Node *other, Node *control)
Environment * environment_
virtual Environment * CopyEnvironment(Environment *env)
StructuredGraphBuilder(Graph *graph, CommonOperatorBuilder *common)
Environment * environment() const
Node * NewPhi(int count, Node *input, Node *control)
void set_exit_control(Node *node)
virtual Node * MakeNode(const Operator *op, int value_input_count, Node **value_inputs) FINAL
SetOncePointer< Node > dead_control_
CommonOperatorBuilder * common() const
Node * NewEffectPhi(int count, Node *input, Node *control)
CommonOperatorBuilder * common_
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 NULL
#define DCHECK(condition)
void MemsetPointer(T **dest, U *value, int counter)
Debugger support for the V8 JavaScript engine.