33 switch (node->opcode()) {
34 case IrOpcode::kJSCallFunction:
118 if (final_merge->opcode() == IrOpcode::kReturn) {
122 DCHECK_EQ(IrOpcode::kMerge, final_merge->opcode());
128 const Operator* op_ephi = jsgraph->
common()->EffectPhi(predecessors);
134 InputIter iter = final_merge->inputs().begin();
135 while (iter != final_merge->inputs().end()) {
137 switch (input->opcode()) {
138 case IrOpcode::kReturn:
142 input->RemoveAllInputs();
150 values.push_back(final_merge);
151 effects.push_back(final_merge);
153 graph->
NewNode(op_phi,
static_cast<int>(values.size()), &values.front());
154 Node* ephi = graph->
NewNode(op_ephi,
static_cast<int>(effects.size()),
157 graph->
NewNode(jsgraph->
common()->Return(), phi, ephi, final_merge);
158 graph->
end()->ReplaceInput(0, new_return);
165 :
copies_(source_graph->NodeCount(),
NULL, temp_zone),
175 for (
InputIter it = original->inputs().begin();
176 it != original->inputs().end(); ++it) {
177 inputs.push_back(
GetCopy(*it));
184 (inputs.empty() ?
NULL : &inputs.front()));
185 copies_[original->id()] = copy;
190 Node* copy =
copies_[original->id()];
209 if (sentinel ==
NULL)
continue;
212 sentinel->ReplaceUses(copy);
218 if (sentinel ==
NULL) {
240 SimplifiedOperatorBuilder simplified(jsgraph->
zone());
242 simplified.LoadField(AccessBuilder::ForJSFunctionContext()),
253 while (iter !=
start_->uses().end()) {
255 switch (
use->opcode()) {
256 case IrOpcode::kParameter: {
257 int index = 1 + OpParameter<int>(
use->op());
258 if (index < inliner_inputs && index < inlinee_context_index) {
262 }
else if (index == inlinee_context_index) {
266 }
else if (index < inlinee_context_index) {
278 iter.UpdateToAndIncrement(context);
280 iter.UpdateToAndIncrement(control);
289 iter = call->uses().begin();
290 while (iter != call->uses().end()) {
300 call->RemoveAllInputs();
312 DCHECK_EQ(IrOpcode::kJSCallFunction, call->opcode());
321 return call_->InputAt(
static_cast<int>(2 + index));
328 return value_inputs - 2;
340 FrameStateCallInfo call_info = OpParameter<FrameStateCallInfo>(frame_state);
343 call_info.state_combine(), jsfunction);
344 frame_state->set_op(op);
358 for (
size_t argument = 0; argument != call->
formal_arguments(); ++argument) {
364 op_param,
static_cast<int>(params.size()), ¶ms.front());
374 HeapObjectMatcher<JSFunction> match(call.
jsfunction());
375 if (!match.HasValue()) {
381 if (function->shared()->native()) {
382 if (FLAG_trace_turbo_inlining) {
384 function->shared()->DebugName()->ToCString();
385 PrintF(
"Not Inlining %s into %s because inlinee is native\n",
name.get(),
392 Parse(
function, &info);
397 if (FLAG_trace_turbo_inlining) {
399 "Not Inlining %s into %s because inlinee uses arguments "
406 if (FLAG_trace_turbo_inlining) {
434 it != visitor.
copies().end(); ++it) {
436 if (node !=
NULL && node->opcode() == IrOpcode::kFrameState) {
Handle< SharedFunctionInfo > shared_info() const
static bool EnsureDeoptimizationSupport(CompilationInfo *info)
static bool Rewrite(CompilationInfo *info)
static bool Analyze(CompilationInfo *info)
Variable * arguments() const
GenericGraphVisit::Control Post(Node *original)
CopyVisitor(Graph *source_graph, Graph *target_graph, Zone *temp_zone)
const NodeVector & copies()
Node * GetCopy(Node *original)
Node * GetSentinel(Node *original)
SimpleOperator sentinel_op_
void VisitNodeInputsFromEnd(Visitor *visitor)
Node * NewNode(const Operator *op, int input_count, Node **inputs)
void InlineAtCall(JSGraph *jsgraph, Node *call)
size_t total_parameters()
Inlinee(Node *start, Node *end)
static void UnifyReturn(JSGraph *jsgraph)
size_t formal_parameters()
InlinerVisitor(JSInliner *inliner)
GenericGraphVisit::Control Post(Node *node)
size_t formal_arguments()
JSCallFunctionAccessor(Node *call)
Node * formal_argument(size_t index)
JSOperatorBuilder * javascript()
Node * UndefinedConstant()
MachineOperatorBuilder * machine()
CommonOperatorBuilder * common()
void TryInlineCall(Node *node)
Node * CreateArgumentsAdaptorFrameState(JSCallFunctionAccessor *call, Handle< JSFunction > jsfunction, Zone *temp_zone)
void AddClosureToFrameState(Node *frame_state, Handle< JSFunction > jsfunction)
static void ReplaceWithValue(Node *node, Node *value, Node *effect=NULL)
static Node * GetValueInput(Node *node, int index)
static Node * GetFrameStateInput(Node *node)
static bool IsControlEdge(Node::Edge edge)
static bool IsEffectEdge(Node::Edge edge)
static bool IsValueEdge(Node::Edge edge)
static Node * GetEffectInput(Node *node, int index=0)
static void ReplaceFrameStateInput(Node *node, Node *frame_state)
static Node * GetControlInput(Node *node, int index=0)
static int GetValueInputCount(const Operator *op)
static int GetControlInputCount(const Operator *op)
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 use(in kBytes)") DEFINE_INT(max_stack_trace_source_length
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 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_NE(v1, v2)
#define DCHECK_GE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
Node::Uses::iterator UseIter
NodeVector::const_iterator NodeVectorConstIter
static void Parse(Handle< JSFunction > function, CompilationInfoWithZone *info)
Node::Inputs::iterator InputIter
void PrintF(const char *format,...)
Debugger support for the V8 JavaScript engine.