| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 // The output frame height does not include the parameters. | 442 // The output frame height does not include the parameters. |
| 443 int height = translation_size - environment->parameter_count(); | 443 int height = translation_size - environment->parameter_count(); |
| 444 | 444 |
| 445 // Function parameters are arguments to the outermost environment. The | 445 // Function parameters are arguments to the outermost environment. The |
| 446 // arguments index points to the first element of a sequence of tagged | 446 // arguments index points to the first element of a sequence of tagged |
| 447 // values on the stack that represent the arguments. This needs to be | 447 // values on the stack that represent the arguments. This needs to be |
| 448 // kept in sync with the LArgumentsElements implementation. | 448 // kept in sync with the LArgumentsElements implementation. |
| 449 *arguments_index = -environment->parameter_count(); | 449 *arguments_index = -environment->parameter_count(); |
| 450 *arguments_count = environment->parameter_count(); | 450 *arguments_count = environment->parameter_count(); |
| 451 | 451 |
| 452 WriteTranslation(environment->outer(), translation, args_index, args_count); | 452 WriteTranslation(environment->outer(), |
| 453 translation, |
| 454 arguments_index, |
| 455 arguments_count); |
| 453 int closure_id = *info()->closure() != *environment->closure() | 456 int closure_id = *info()->closure() != *environment->closure() |
| 454 ? DefineDeoptimizationLiteral(environment->closure()) | 457 ? DefineDeoptimizationLiteral(environment->closure()) |
| 455 : Translation::kSelfLiteralId; | 458 : Translation::kSelfLiteralId; |
| 456 | 459 |
| 457 switch (environment->frame_type()) { | 460 switch (environment->frame_type()) { |
| 458 case JS_FUNCTION: | 461 case JS_FUNCTION: |
| 459 translation->BeginJSFrame(environment->ast_id(), closure_id, height); | 462 translation->BeginJSFrame(environment->ast_id(), closure_id, height); |
| 460 break; | 463 break; |
| 461 case JS_CONSTRUCT: | 464 case JS_CONSTRUCT: |
| 462 translation->BeginConstructStubFrame(closure_id, translation_size); | 465 translation->BeginConstructStubFrame(closure_id, translation_size); |
| (...skipping 4984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5447 __ Subu(scratch, result, scratch); | 5450 __ Subu(scratch, result, scratch); |
| 5448 __ lw(result, FieldMemOperand(scratch, | 5451 __ lw(result, FieldMemOperand(scratch, |
| 5449 FixedArray::kHeaderSize - kPointerSize)); | 5452 FixedArray::kHeaderSize - kPointerSize)); |
| 5450 __ bind(&done); | 5453 __ bind(&done); |
| 5451 } | 5454 } |
| 5452 | 5455 |
| 5453 | 5456 |
| 5454 #undef __ | 5457 #undef __ |
| 5455 | 5458 |
| 5456 } } // namespace v8::internal | 5459 } } // namespace v8::internal |
| OLD | NEW |