OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 9330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9341 | 9341 |
9342 if (TryInlineCall(expr)) return; | 9342 if (TryInlineCall(expr)) return; |
9343 | 9343 |
9344 call = PreProcessCall(New<HInvokeFunction>( | 9344 call = PreProcessCall(New<HInvokeFunction>( |
9345 function, expr->target(), argument_count)); | 9345 function, expr->target(), argument_count)); |
9346 | 9346 |
9347 } else { | 9347 } else { |
9348 Push(graph()->GetConstantUndefined()); | 9348 Push(graph()->GetConstantUndefined()); |
9349 CHECK_ALIVE(VisitExpressions(expr->arguments())); | 9349 CHECK_ALIVE(VisitExpressions(expr->arguments())); |
9350 PushArgumentsFromEnvironment(argument_count); | 9350 PushArgumentsFromEnvironment(argument_count); |
9351 HCallFunction* call_function = | 9351 call = New<HCallFunction>(function, argument_count); |
9352 New<HCallFunction>(function, argument_count); | |
9353 call = call_function; | |
9354 if (expr->is_uninitialized() && expr->HasCallFeedbackSlot()) { | |
9355 // We've never seen this call before, so let's have Crankshaft learn | |
9356 // through the type vector. | |
9357 Handle<SharedFunctionInfo> current_shared = | |
9358 function_state()->compilation_info()->shared_info(); | |
9359 Handle<TypeFeedbackVector> vector = | |
9360 handle(current_shared->feedback_vector(), isolate()); | |
9361 FeedbackVectorICSlot slot = expr->CallFeedbackSlot(); | |
9362 call_function->SetVectorAndSlot(vector, slot); | |
9363 } | |
9364 } | 9352 } |
9365 } | 9353 } |
9366 | 9354 |
9367 Drop(1); // Drop the function. | 9355 Drop(1); // Drop the function. |
9368 return ast_context()->ReturnInstruction(call, expr->id()); | 9356 return ast_context()->ReturnInstruction(call, expr->id()); |
9369 } | 9357 } |
9370 | 9358 |
9371 | 9359 |
9372 void HOptimizedGraphBuilder::BuildInlinedCallArray( | 9360 void HOptimizedGraphBuilder::BuildInlinedCallArray( |
9373 Expression* expression, | 9361 Expression* expression, |
(...skipping 4108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13482 if (ShouldProduceTraceOutput()) { | 13470 if (ShouldProduceTraceOutput()) { |
13483 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13471 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13484 } | 13472 } |
13485 | 13473 |
13486 #ifdef DEBUG | 13474 #ifdef DEBUG |
13487 graph_->Verify(false); // No full verify. | 13475 graph_->Verify(false); // No full verify. |
13488 #endif | 13476 #endif |
13489 } | 13477 } |
13490 | 13478 |
13491 } } // namespace v8::internal | 13479 } } // namespace v8::internal |
OLD | NEW |