Chromium Code Reviews| 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
| 10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
| (...skipping 12740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12751 // The function is the last argument | 12751 // The function is the last argument |
| 12752 HValue* function = Pop(); | 12752 HValue* function = Pop(); |
| 12753 // Push the arguments to the stack | 12753 // Push the arguments to the stack |
| 12754 PushArgumentsFromEnvironment(arg_count); | 12754 PushArgumentsFromEnvironment(arg_count); |
| 12755 | 12755 |
| 12756 IfBuilder if_is_jsfunction(this); | 12756 IfBuilder if_is_jsfunction(this); |
| 12757 if_is_jsfunction.If<HHasInstanceTypeAndBranch>(function, JS_FUNCTION_TYPE); | 12757 if_is_jsfunction.If<HHasInstanceTypeAndBranch>(function, JS_FUNCTION_TYPE); |
| 12758 | 12758 |
| 12759 if_is_jsfunction.Then(); | 12759 if_is_jsfunction.Then(); |
| 12760 { | 12760 { |
| 12761 HInstruction* invoke_result = | 12761 HInstruction* invoke_result = Add<HInvokeFunction>(function, arg_count); |
|
Benedikt Meurer
2015/11/04 02:56:43
Nit: unrelated change, please undo
Camillo Bruni
2015/11/04 10:47:32
undone
| |
| 12762 Add<HInvokeFunction>(function, arg_count); | |
| 12763 if (!ast_context()->IsEffect()) { | 12762 if (!ast_context()->IsEffect()) { |
| 12764 Push(invoke_result); | 12763 Push(invoke_result); |
| 12765 } | 12764 } |
| 12766 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 12765 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 12767 } | 12766 } |
| 12768 | 12767 |
| 12769 if_is_jsfunction.Else(); | 12768 if_is_jsfunction.Else(); |
| 12770 { | 12769 { |
| 12771 HInstruction* call_result = | 12770 HInstruction* call_result = Add<HCallFunction>(function, arg_count); |
|
Benedikt Meurer
2015/11/04 02:56:43
Nit: unrelated change, please undo
Camillo Bruni
2015/11/04 10:47:32
undone
| |
| 12772 Add<HCallFunction>(function, arg_count); | |
| 12773 if (!ast_context()->IsEffect()) { | 12771 if (!ast_context()->IsEffect()) { |
| 12774 Push(call_result); | 12772 Push(call_result); |
| 12775 } | 12773 } |
| 12776 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 12774 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 12777 } | 12775 } |
| 12778 if_is_jsfunction.End(); | 12776 if_is_jsfunction.End(); |
| 12779 | 12777 |
| 12780 if (ast_context()->IsEffect()) { | 12778 if (ast_context()->IsEffect()) { |
| 12781 // EffectContext::ReturnValue ignores the value, so we can just pass | 12779 // EffectContext::ReturnValue ignores the value, so we can just pass |
| 12782 // 'undefined' (as we do not have the call result anymore). | 12780 // 'undefined' (as we do not have the call result anymore). |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 13708 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13706 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13709 } | 13707 } |
| 13710 | 13708 |
| 13711 #ifdef DEBUG | 13709 #ifdef DEBUG |
| 13712 graph_->Verify(false); // No full verify. | 13710 graph_->Verify(false); // No full verify. |
| 13713 #endif | 13711 #endif |
| 13714 } | 13712 } |
| 13715 | 13713 |
| 13716 } // namespace internal | 13714 } // namespace internal |
| 13717 } // namespace v8 | 13715 } // namespace v8 |
| OLD | NEW |