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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 Translation* translation) { | 387 Translation* translation) { |
388 if (environment == NULL) return; | 388 if (environment == NULL) return; |
389 | 389 |
390 // The translation includes one command per value in the environment. | 390 // The translation includes one command per value in the environment. |
391 int translation_size = environment->values()->length(); | 391 int translation_size = environment->values()->length(); |
392 // The output frame height does not include the parameters. | 392 // The output frame height does not include the parameters. |
393 int height = translation_size - environment->parameter_count(); | 393 int height = translation_size - environment->parameter_count(); |
394 | 394 |
395 WriteTranslation(environment->outer(), translation); | 395 WriteTranslation(environment->outer(), translation); |
396 int closure_id = DefineDeoptimizationLiteral(environment->closure()); | 396 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
397 translation->BeginFrame(environment->ast_id(), closure_id, height); | 397 if (environment->is_arguments_adaptor()) { |
| 398 translation->BeginArgumentsAdaptorFrame(closure_id, translation_size); |
| 399 } else { |
| 400 translation->BeginFrame(environment->ast_id(), closure_id, height); |
| 401 } |
398 for (int i = 0; i < translation_size; ++i) { | 402 for (int i = 0; i < translation_size; ++i) { |
399 LOperand* value = environment->values()->at(i); | 403 LOperand* value = environment->values()->at(i); |
400 // spilled_registers_ and spilled_double_registers_ are either | 404 // spilled_registers_ and spilled_double_registers_ are either |
401 // both NULL or both set. | 405 // both NULL or both set. |
402 if (environment->spilled_registers() != NULL && value != NULL) { | 406 if (environment->spilled_registers() != NULL && value != NULL) { |
403 if (value->IsRegister() && | 407 if (value->IsRegister() && |
404 environment->spilled_registers()[value->index()] != NULL) { | 408 environment->spilled_registers()[value->index()] != NULL) { |
405 translation->MarkDuplicate(); | 409 translation->MarkDuplicate(); |
406 AddToTranslation(translation, | 410 AddToTranslation(translation, |
407 environment->spilled_registers()[value->index()], | 411 environment->spilled_registers()[value->index()], |
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4673 this, pointers, Safepoint::kLazyDeopt); | 4677 this, pointers, Safepoint::kLazyDeopt); |
4674 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4678 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4675 } | 4679 } |
4676 | 4680 |
4677 | 4681 |
4678 #undef __ | 4682 #undef __ |
4679 | 4683 |
4680 } } // namespace v8::internal | 4684 } } // namespace v8::internal |
4681 | 4685 |
4682 #endif // V8_TARGET_ARCH_IA32 | 4686 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |