| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 5768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5779 // For a compound assignment the right-hand side is a binary operation | 5779 // For a compound assignment the right-hand side is a binary operation |
| 5780 // between the current property value and the actual right-hand side. | 5780 // between the current property value and the actual right-hand side. |
| 5781 LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF); | 5781 LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF); |
| 5782 Load(node->value()); | 5782 Load(node->value()); |
| 5783 | 5783 |
| 5784 // Perform the binary operation. | 5784 // Perform the binary operation. |
| 5785 bool overwrite_value = | 5785 bool overwrite_value = |
| 5786 (node->value()->AsBinaryOperation() != NULL && | 5786 (node->value()->AsBinaryOperation() != NULL && |
| 5787 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); | 5787 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); |
| 5788 // Construct the implicit binary operation. | 5788 // Construct the implicit binary operation. |
| 5789 BinaryOperation expr(node->binary_op(), node->target(), node->value()); | 5789 BinaryOperation expr(node); |
| 5790 expr.CopyAnalysisResultsFrom(node); | |
| 5791 GenericBinaryOperation(&expr, | 5790 GenericBinaryOperation(&expr, |
| 5792 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); | 5791 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); |
| 5793 } else { | 5792 } else { |
| 5794 // For non-compound assignment just load the right-hand side. | 5793 // For non-compound assignment just load the right-hand side. |
| 5795 Load(node->value()); | 5794 Load(node->value()); |
| 5796 } | 5795 } |
| 5797 | 5796 |
| 5798 // Perform the assignment. | 5797 // Perform the assignment. |
| 5799 if (var->mode() != Variable::CONST || node->op() == Token::INIT_CONST) { | 5798 if (var->mode() != Variable::CONST || node->op() == Token::INIT_CONST) { |
| 5800 CodeForSourcePosition(node->position()); | 5799 CodeForSourcePosition(node->position()); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5871 frame()->Dup(); | 5870 frame()->Dup(); |
| 5872 } | 5871 } |
| 5873 Result value = EmitNamedLoad(name, var != NULL); | 5872 Result value = EmitNamedLoad(name, var != NULL); |
| 5874 frame()->Push(&value); | 5873 frame()->Push(&value); |
| 5875 Load(node->value()); | 5874 Load(node->value()); |
| 5876 | 5875 |
| 5877 bool overwrite_value = | 5876 bool overwrite_value = |
| 5878 (node->value()->AsBinaryOperation() != NULL && | 5877 (node->value()->AsBinaryOperation() != NULL && |
| 5879 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); | 5878 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); |
| 5880 // Construct the implicit binary operation. | 5879 // Construct the implicit binary operation. |
| 5881 BinaryOperation expr(node->binary_op(), node->target(), node->value()); | 5880 BinaryOperation expr(node); |
| 5882 expr.CopyAnalysisResultsFrom(node); | |
| 5883 GenericBinaryOperation(&expr, | 5881 GenericBinaryOperation(&expr, |
| 5884 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); | 5882 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); |
| 5885 } else { | 5883 } else { |
| 5886 // For non-compound assignment just load the right-hand side. | 5884 // For non-compound assignment just load the right-hand side. |
| 5887 Load(node->value()); | 5885 Load(node->value()); |
| 5888 } | 5886 } |
| 5889 | 5887 |
| 5890 // Stack layout: | 5888 // Stack layout: |
| 5891 // [tos] : value | 5889 // [tos] : value |
| 5892 // [tos+1] : receiver (only materialized if non-trivial) | 5890 // [tos+1] : receiver (only materialized if non-trivial) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5973 frame()->PushElementAt(1); | 5971 frame()->PushElementAt(1); |
| 5974 frame()->PushElementAt(1); | 5972 frame()->PushElementAt(1); |
| 5975 Result value = EmitKeyedLoad(); | 5973 Result value = EmitKeyedLoad(); |
| 5976 frame()->Push(&value); | 5974 frame()->Push(&value); |
| 5977 Load(node->value()); | 5975 Load(node->value()); |
| 5978 | 5976 |
| 5979 // Perform the binary operation. | 5977 // Perform the binary operation. |
| 5980 bool overwrite_value = | 5978 bool overwrite_value = |
| 5981 (node->value()->AsBinaryOperation() != NULL && | 5979 (node->value()->AsBinaryOperation() != NULL && |
| 5982 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); | 5980 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); |
| 5983 BinaryOperation expr(node->binary_op(), node->target(), node->value()); | 5981 BinaryOperation expr(node); |
| 5984 expr.CopyAnalysisResultsFrom(node); | |
| 5985 GenericBinaryOperation(&expr, | 5982 GenericBinaryOperation(&expr, |
| 5986 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); | 5983 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); |
| 5987 } else { | 5984 } else { |
| 5988 // For non-compound assignment just load the right-hand side. | 5985 // For non-compound assignment just load the right-hand side. |
| 5989 Load(node->value()); | 5986 Load(node->value()); |
| 5990 } | 5987 } |
| 5991 | 5988 |
| 5992 // Stack layout: | 5989 // Stack layout: |
| 5993 // [tos] : value | 5990 // [tos] : value |
| 5994 // [tos+1] : key | 5991 // [tos+1] : key |
| (...skipping 8512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14507 masm.GetCode(&desc); | 14504 masm.GetCode(&desc); |
| 14508 // Call the function from C++. | 14505 // Call the function from C++. |
| 14509 return FUNCTION_CAST<MemCopyFunction>(buffer); | 14506 return FUNCTION_CAST<MemCopyFunction>(buffer); |
| 14510 } | 14507 } |
| 14511 | 14508 |
| 14512 #undef __ | 14509 #undef __ |
| 14513 | 14510 |
| 14514 } } // namespace v8::internal | 14511 } } // namespace v8::internal |
| 14515 | 14512 |
| 14516 #endif // V8_TARGET_ARCH_IA32 | 14513 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |