| 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 6172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6183 } | 6183 } |
| 6184 | 6184 |
| 6185 if (current_block() != NULL) current_block()->Goto(join); | 6185 if (current_block() != NULL) current_block()->Goto(join); |
| 6186 set_current_block(if_false); | 6186 set_current_block(if_false); |
| 6187 } | 6187 } |
| 6188 | 6188 |
| 6189 // Finish up. Unconditionally deoptimize if we've handled all the maps we | 6189 // Finish up. Unconditionally deoptimize if we've handled all the maps we |
| 6190 // know about and do not want to handle ones we've never seen. Otherwise | 6190 // know about and do not want to handle ones we've never seen. Otherwise |
| 6191 // use a generic IC. | 6191 // use a generic IC. |
| 6192 if (ordered_functions == types->length() && FLAG_deoptimize_uncommon_cases) { | 6192 if (ordered_functions == types->length() && FLAG_deoptimize_uncommon_cases) { |
| 6193 // Because the deopt may be the only path in the polymorphic call, make sure |
| 6194 // that the environment stack matches the depth on deopt that it otherwise |
| 6195 // would have had after a successful call. |
| 6196 Drop(argument_count - (ast_context()->IsEffect() ? 0 : 1)); |
| 6193 FinishExitWithHardDeoptimization(join); | 6197 FinishExitWithHardDeoptimization(join); |
| 6194 } else { | 6198 } else { |
| 6195 HValue* context = environment()->LookupContext(); | 6199 HValue* context = environment()->LookupContext(); |
| 6196 HCallNamed* call = new(zone()) HCallNamed(context, name, argument_count); | 6200 HCallNamed* call = new(zone()) HCallNamed(context, name, argument_count); |
| 6197 call->set_position(expr->position()); | 6201 call->set_position(expr->position()); |
| 6198 PreProcessCall(call); | 6202 PreProcessCall(call); |
| 6199 | 6203 |
| 6200 if (join != NULL) { | 6204 if (join != NULL) { |
| 6201 AddInstruction(call); | 6205 AddInstruction(call); |
| 6202 if (!ast_context()->IsEffect()) Push(call); | 6206 if (!ast_context()->IsEffect()) Push(call); |
| (...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9947 if (ShouldProduceTraceOutput()) { | 9951 if (ShouldProduceTraceOutput()) { |
| 9948 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9952 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 9949 } | 9953 } |
| 9950 | 9954 |
| 9951 #ifdef DEBUG | 9955 #ifdef DEBUG |
| 9952 graph_->Verify(false); // No full verify. | 9956 graph_->Verify(false); // No full verify. |
| 9953 #endif | 9957 #endif |
| 9954 } | 9958 } |
| 9955 | 9959 |
| 9956 } } // namespace v8::internal | 9960 } } // namespace v8::internal |
| OLD | NEW |