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

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

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
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
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 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after
3763 context()->Plug(eax); 3763 context()->Plug(eax);
3764 break; 3764 break;
3765 } 3765 }
3766 3766
3767 case Token::ADD: { 3767 case Token::ADD: {
3768 Comment cmt(masm_, "[ UnaryOperation (ADD)"); 3768 Comment cmt(masm_, "[ UnaryOperation (ADD)");
3769 VisitForAccumulatorValue(expr->expression()); 3769 VisitForAccumulatorValue(expr->expression());
3770 Label no_conversion; 3770 Label no_conversion;
3771 __ test(result_register(), Immediate(kSmiTagMask)); 3771 __ test(result_register(), Immediate(kSmiTagMask));
3772 __ j(zero, &no_conversion); 3772 __ j(zero, &no_conversion);
3773 __ push(result_register()); 3773 ToNumberStub convert_stub;
3774 __ InvokeBuiltin(Builtins::TO_NUMBER, CALL_FUNCTION); 3774 __ CallStub(&convert_stub);
3775 __ bind(&no_conversion); 3775 __ bind(&no_conversion);
3776 context()->Plug(result_register()); 3776 context()->Plug(result_register());
3777 break; 3777 break;
3778 } 3778 }
3779 3779
3780 case Token::SUB: { 3780 case Token::SUB: {
3781 Comment cmt(masm_, "[ UnaryOperation (SUB)"); 3781 Comment cmt(masm_, "[ UnaryOperation (SUB)");
3782 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); 3782 bool can_overwrite = expr->expression()->ResultOverwriteAllowed();
3783 UnaryOverwriteMode overwrite = 3783 UnaryOverwriteMode overwrite =
3784 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; 3784 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
3884 // We need a second deoptimization point after loading the value 3884 // We need a second deoptimization point after loading the value
3885 // in case evaluating the property load my have a side effect. 3885 // in case evaluating the property load my have a side effect.
3886 PrepareForBailout(expr->increment(), TOS_REG); 3886 PrepareForBailout(expr->increment(), TOS_REG);
3887 3887
3888 // Call ToNumber only if operand is not a smi. 3888 // Call ToNumber only if operand is not a smi.
3889 NearLabel no_conversion; 3889 NearLabel no_conversion;
3890 if (ShouldInlineSmiCase(expr->op())) { 3890 if (ShouldInlineSmiCase(expr->op())) {
3891 __ test(eax, Immediate(kSmiTagMask)); 3891 __ test(eax, Immediate(kSmiTagMask));
3892 __ j(zero, &no_conversion); 3892 __ j(zero, &no_conversion);
3893 } 3893 }
3894 __ push(eax); 3894 ToNumberStub convert_stub;
3895 __ InvokeBuiltin(Builtins::TO_NUMBER, CALL_FUNCTION); 3895 __ CallStub(&convert_stub);
3896 __ bind(&no_conversion); 3896 __ bind(&no_conversion);
3897 3897
3898 // Save result for postfix expressions. 3898 // Save result for postfix expressions.
3899 if (expr->is_postfix()) { 3899 if (expr->is_postfix()) {
3900 if (!context()->IsEffect()) { 3900 if (!context()->IsEffect()) {
3901 // Save the result on the stack. If we have a named or keyed property 3901 // Save the result on the stack. If we have a named or keyed property
3902 // we store the result under the receiver that is currently on top 3902 // we store the result under the receiver that is currently on top
3903 // of the stack. 3903 // of the stack.
3904 switch (assign_type) { 3904 switch (assign_type) {
3905 case VARIABLE: 3905 case VARIABLE:
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4392 // And return. 4392 // And return.
4393 __ ret(0); 4393 __ ret(0);
4394 } 4394 }
4395 4395
4396 4396
4397 #undef __ 4397 #undef __
4398 4398
4399 } } // namespace v8::internal 4399 } } // namespace v8::internal
4400 4400
4401 #endif // V8_TARGET_ARCH_IA32 4401 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/ast.cc ('K') | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698