OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6101 set_current_block(if_false); | 6101 set_current_block(if_false); |
6102 } | 6102 } |
6103 | 6103 |
6104 // Finish up. Unconditionally deoptimize if we've handled all the maps we | 6104 // Finish up. Unconditionally deoptimize if we've handled all the maps we |
6105 // know about and do not want to handle ones we've never seen. Otherwise | 6105 // know about and do not want to handle ones we've never seen. Otherwise |
6106 // use a generic IC. | 6106 // use a generic IC. |
6107 if (ordered_functions == types->length() && FLAG_deoptimize_uncommon_cases) { | 6107 if (ordered_functions == types->length() && FLAG_deoptimize_uncommon_cases) { |
6108 // Because the deopt may be the only path in the polymorphic call, make sure | 6108 // Because the deopt may be the only path in the polymorphic call, make sure |
6109 // that the environment stack matches the depth on deopt that it otherwise | 6109 // that the environment stack matches the depth on deopt that it otherwise |
6110 // would have had after a successful call. | 6110 // would have had after a successful call. |
6111 Drop(argument_count - (ast_context()->IsEffect() ? 0 : 1)); | 6111 Drop(argument_count); |
| 6112 if (!ast_context()->IsEffect()) Push(graph()->GetConstant0()); |
6112 FinishExitWithHardDeoptimization("Unknown map in polymorphic call", join); | 6113 FinishExitWithHardDeoptimization("Unknown map in polymorphic call", join); |
6113 } else { | 6114 } else { |
6114 HValue* context = environment()->context(); | 6115 HValue* context = environment()->context(); |
6115 HCallNamed* call = new(zone()) HCallNamed(context, name, argument_count); | 6116 HCallNamed* call = new(zone()) HCallNamed(context, name, argument_count); |
6116 call->set_position(expr->position()); | 6117 call->set_position(expr->position()); |
6117 PreProcessCall(call); | 6118 PreProcessCall(call); |
6118 | 6119 |
6119 if (join != NULL) { | 6120 if (join != NULL) { |
6120 AddInstruction(call); | 6121 AddInstruction(call); |
6121 if (!ast_context()->IsEffect()) Push(call); | 6122 if (!ast_context()->IsEffect()) Push(call); |
(...skipping 3499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9621 if (ShouldProduceTraceOutput()) { | 9622 if (ShouldProduceTraceOutput()) { |
9622 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9623 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9623 } | 9624 } |
9624 | 9625 |
9625 #ifdef DEBUG | 9626 #ifdef DEBUG |
9626 graph_->Verify(false); // No full verify. | 9627 graph_->Verify(false); // No full verify. |
9627 #endif | 9628 #endif |
9628 } | 9629 } |
9629 | 9630 |
9630 } } // namespace v8::internal | 9631 } } // namespace v8::internal |
OLD | NEW |