| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7486 HInstruction* result = | 7486 HInstruction* result = |
| 7487 new(zone()) HApplyArguments(function, | 7487 new(zone()) HApplyArguments(function, |
| 7488 wrapped_receiver, | 7488 wrapped_receiver, |
| 7489 length, | 7489 length, |
| 7490 elements); | 7490 elements); |
| 7491 result->set_position(expr->position()); | 7491 result->set_position(expr->position()); |
| 7492 ast_context()->ReturnInstruction(result, expr->id()); | 7492 ast_context()->ReturnInstruction(result, expr->id()); |
| 7493 return true; | 7493 return true; |
| 7494 } else { | 7494 } else { |
| 7495 // We are inside inlined function and we know exactly what is inside | 7495 // We are inside inlined function and we know exactly what is inside |
| 7496 // arguments object. | 7496 // arguments object. But we need to be able to materialize at deopt. |
| 7497 // TODO(mstarzinger): For now we just ensure arguments are pushed |
| 7498 // right after HEnterInlined, but we could be smarter about this. |
| 7499 EnsureArgumentsArePushedForAccess(); |
| 7497 HValue* context = environment()->LookupContext(); | 7500 HValue* context = environment()->LookupContext(); |
| 7498 | 7501 |
| 7499 HValue* wrapped_receiver = | 7502 HValue* wrapped_receiver = |
| 7500 AddInstruction(new(zone()) HWrapReceiver(receiver, function)); | 7503 AddInstruction(new(zone()) HWrapReceiver(receiver, function)); |
| 7501 PushAndAdd(new(zone()) HPushArgument(wrapped_receiver)); | 7504 PushAndAdd(new(zone()) HPushArgument(wrapped_receiver)); |
| 7502 | 7505 |
| 7503 HEnvironment* arguments_env = environment()->arguments_environment(); | 7506 HEnvironment* arguments_env = environment()->arguments_environment(); |
| 7504 | 7507 |
| 7505 int parameter_count = arguments_env->parameter_count(); | 7508 int parameter_count = arguments_env->parameter_count(); |
| 7506 for (int i = 1; i < arguments_env->parameter_count(); i++) { | 7509 for (int i = 1; i < arguments_env->parameter_count(); i++) { |
| (...skipping 2609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10116 } | 10119 } |
| 10117 } | 10120 } |
| 10118 | 10121 |
| 10119 #ifdef DEBUG | 10122 #ifdef DEBUG |
| 10120 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 10123 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 10121 if (allocator_ != NULL) allocator_->Verify(); | 10124 if (allocator_ != NULL) allocator_->Verify(); |
| 10122 #endif | 10125 #endif |
| 10123 } | 10126 } |
| 10124 | 10127 |
| 10125 } } // namespace v8::internal | 10128 } } // namespace v8::internal |
| OLD | NEW |