Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6676065: Merge revision 7239 (=-7215, -7212) to trunk (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/lithium-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 __ mov(r0, Operand(property->key()->AsLiteral()->handle())); 1597 __ mov(r0, Operand(property->key()->AsLiteral()->handle()));
1598 __ Push(r1, r0); 1598 __ Push(r1, r0);
1599 } else { 1599 } else {
1600 VisitForStackValue(property->obj()); 1600 VisitForStackValue(property->obj());
1601 VisitForStackValue(property->key()); 1601 VisitForStackValue(property->key());
1602 } 1602 }
1603 } 1603 }
1604 break; 1604 break;
1605 } 1605 }
1606 1606
1607 // For compound assignments we need another deoptimization point after the
1608 // variable/property load.
1609 if (expr->is_compound()) { 1607 if (expr->is_compound()) {
1610 { AccumulatorValueContext context(this); 1608 { AccumulatorValueContext context(this);
1611 switch (assign_type) { 1609 switch (assign_type) {
1612 case VARIABLE: 1610 case VARIABLE:
1613 EmitVariableLoad(expr->target()->AsVariableProxy()->var()); 1611 EmitVariableLoad(expr->target()->AsVariableProxy()->var());
1614 PrepareForBailout(expr->target(), TOS_REG);
1615 break; 1612 break;
1616 case NAMED_PROPERTY: 1613 case NAMED_PROPERTY:
1617 EmitNamedPropertyLoad(property); 1614 EmitNamedPropertyLoad(property);
1618 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
1619 break; 1615 break;
1620 case KEYED_PROPERTY: 1616 case KEYED_PROPERTY:
1621 EmitKeyedPropertyLoad(property); 1617 EmitKeyedPropertyLoad(property);
1622 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
1623 break; 1618 break;
1624 } 1619 }
1625 } 1620 }
1626 1621
1622 // For property compound assignments we need another deoptimization
1623 // point after the property load.
1624 if (property != NULL) {
1625 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
1626 }
1627
1627 Token::Value op = expr->binary_op(); 1628 Token::Value op = expr->binary_op();
1628 __ push(r0); // Left operand goes on the stack. 1629 __ push(r0); // Left operand goes on the stack.
1629 VisitForAccumulatorValue(expr->value()); 1630 VisitForAccumulatorValue(expr->value());
1630 1631
1631 OverwriteMode mode = expr->value()->ResultOverwriteAllowed() 1632 OverwriteMode mode = expr->value()->ResultOverwriteAllowed()
1632 ? OVERWRITE_RIGHT 1633 ? OVERWRITE_RIGHT
1633 : NO_OVERWRITE; 1634 : NO_OVERWRITE;
1634 SetSourcePosition(expr->position() + 1); 1635 SetSourcePosition(expr->position() + 1);
1635 AccumulatorValueContext context(this); 1636 AccumulatorValueContext context(this);
1636 if (ShouldInlineSmiCase(op)) { 1637 if (ShouldInlineSmiCase(op)) {
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 VisitForAccumulatorValue(prop->key()); 3798 VisitForAccumulatorValue(prop->key());
3798 } 3799 }
3799 __ ldr(r1, MemOperand(sp, 0)); 3800 __ ldr(r1, MemOperand(sp, 0));
3800 __ push(r0); 3801 __ push(r0);
3801 EmitKeyedPropertyLoad(prop); 3802 EmitKeyedPropertyLoad(prop);
3802 } 3803 }
3803 } 3804 }
3804 3805
3805 // We need a second deoptimization point after loading the value 3806 // We need a second deoptimization point after loading the value
3806 // in case evaluating the property load my have a side effect. 3807 // in case evaluating the property load my have a side effect.
3807 if (assign_type == VARIABLE) { 3808 PrepareForBailout(expr->increment(), TOS_REG);
3808 PrepareForBailout(expr->expression(), TOS_REG);
3809 } else {
3810 PrepareForBailout(expr->increment(), TOS_REG);
3811 }
3812 3809
3813 // Call ToNumber only if operand is not a smi. 3810 // Call ToNumber only if operand is not a smi.
3814 Label no_conversion; 3811 Label no_conversion;
3815 __ JumpIfSmi(r0, &no_conversion); 3812 __ JumpIfSmi(r0, &no_conversion);
3816 ToNumberStub convert_stub; 3813 ToNumberStub convert_stub;
3817 __ CallStub(&convert_stub); 3814 __ CallStub(&convert_stub);
3818 __ bind(&no_conversion); 3815 __ bind(&no_conversion);
3819 3816
3820 // Save result for postfix expressions. 3817 // Save result for postfix expressions.
3821 if (expr->is_postfix()) { 3818 if (expr->is_postfix()) {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
4285 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4282 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4286 __ add(pc, r1, Operand(masm_->CodeObject())); 4283 __ add(pc, r1, Operand(masm_->CodeObject()));
4287 } 4284 }
4288 4285
4289 4286
4290 #undef __ 4287 #undef __
4291 4288
4292 } } // namespace v8::internal 4289 } } // namespace v8::internal
4293 4290
4294 #endif // V8_TARGET_ARCH_ARM 4291 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698