OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3942 __ add(Operand(eax), Immediate(Smi::FromInt(1))); | 3942 __ add(Operand(eax), Immediate(Smi::FromInt(1))); |
3943 } | 3943 } |
3944 } | 3944 } |
3945 | 3945 |
3946 // Record position before stub call. | 3946 // Record position before stub call. |
3947 SetSourcePosition(expr->position()); | 3947 SetSourcePosition(expr->position()); |
3948 | 3948 |
3949 // Call stub for +1/-1. | 3949 // Call stub for +1/-1. |
3950 __ mov(edx, eax); | 3950 __ mov(edx, eax); |
3951 __ mov(eax, Immediate(Smi::FromInt(1))); | 3951 __ mov(eax, Immediate(Smi::FromInt(1))); |
3952 TypeRecordingBinaryOpStub stub(expr->binary_op(), | 3952 TypeRecordingBinaryOpStub stub(expr->binary_op(), NO_OVERWRITE); |
3953 NO_OVERWRITE); | |
3954 EmitCallIC(stub.GetCode(), &patch_site); | 3953 EmitCallIC(stub.GetCode(), &patch_site); |
3955 __ bind(&done); | 3954 __ bind(&done); |
3956 | 3955 |
3957 // Store the value returned in eax. | 3956 // Store the value returned in eax. |
3958 switch (assign_type) { | 3957 switch (assign_type) { |
3959 case VARIABLE: | 3958 case VARIABLE: |
3960 if (expr->is_postfix()) { | 3959 if (expr->is_postfix()) { |
3961 // Perform the assignment as if via '='. | 3960 // Perform the assignment as if via '='. |
3962 { EffectContext context(this); | 3961 { EffectContext context(this); |
3963 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 3962 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4393 // And return. | 4392 // And return. |
4394 __ ret(0); | 4393 __ ret(0); |
4395 } | 4394 } |
4396 | 4395 |
4397 | 4396 |
4398 #undef __ | 4397 #undef __ |
4399 | 4398 |
4400 } } // namespace v8::internal | 4399 } } // namespace v8::internal |
4401 | 4400 |
4402 #endif // V8_TARGET_ARCH_IA32 | 4401 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |