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

Side by Side Diff: src/x64/full-codegen-x64.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 3066 matching lines...) Expand 10 before | Expand all | Expand 10 after
3077 context()->Plug(rax); 3077 context()->Plug(rax);
3078 break; 3078 break;
3079 } 3079 }
3080 3080
3081 case Token::ADD: { 3081 case Token::ADD: {
3082 Comment cmt(masm_, "[ UnaryOperation (ADD)"); 3082 Comment cmt(masm_, "[ UnaryOperation (ADD)");
3083 VisitForAccumulatorValue(expr->expression()); 3083 VisitForAccumulatorValue(expr->expression());
3084 Label no_conversion; 3084 Label no_conversion;
3085 Condition is_smi = masm_->CheckSmi(result_register()); 3085 Condition is_smi = masm_->CheckSmi(result_register());
3086 __ j(is_smi, &no_conversion); 3086 __ j(is_smi, &no_conversion);
3087 __ push(result_register()); 3087 ToNumberStub convert_stub;
3088 __ InvokeBuiltin(Builtins::TO_NUMBER, CALL_FUNCTION); 3088 __ CallStub(&convert_stub);
3089 __ bind(&no_conversion); 3089 __ bind(&no_conversion);
3090 context()->Plug(result_register()); 3090 context()->Plug(result_register());
3091 break; 3091 break;
3092 } 3092 }
3093 3093
3094 case Token::SUB: { 3094 case Token::SUB: {
3095 Comment cmt(masm_, "[ UnaryOperation (SUB)"); 3095 Comment cmt(masm_, "[ UnaryOperation (SUB)");
3096 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); 3096 bool can_overwrite = expr->expression()->ResultOverwriteAllowed();
3097 UnaryOverwriteMode overwrite = 3097 UnaryOverwriteMode overwrite =
3098 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; 3098 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 3194
3195 // We need a second deoptimization point after loading the value 3195 // We need a second deoptimization point after loading the value
3196 // in case evaluating the property load my have a side effect. 3196 // in case evaluating the property load my have a side effect.
3197 PrepareForBailout(expr->increment(), TOS_REG); 3197 PrepareForBailout(expr->increment(), TOS_REG);
3198 3198
3199 // Call ToNumber only if operand is not a smi. 3199 // Call ToNumber only if operand is not a smi.
3200 NearLabel no_conversion; 3200 NearLabel no_conversion;
3201 Condition is_smi; 3201 Condition is_smi;
3202 is_smi = masm_->CheckSmi(rax); 3202 is_smi = masm_->CheckSmi(rax);
3203 __ j(is_smi, &no_conversion); 3203 __ j(is_smi, &no_conversion);
3204 __ push(rax); 3204 ToNumberStub convert_stub;
3205 __ InvokeBuiltin(Builtins::TO_NUMBER, CALL_FUNCTION); 3205 __ CallStub(&convert_stub);
3206 __ bind(&no_conversion); 3206 __ bind(&no_conversion);
3207 3207
3208 // Save result for postfix expressions. 3208 // Save result for postfix expressions.
3209 if (expr->is_postfix()) { 3209 if (expr->is_postfix()) {
3210 if (!context()->IsEffect()) { 3210 if (!context()->IsEffect()) {
3211 // Save the result on the stack. If we have a named or keyed property 3211 // Save the result on the stack. If we have a named or keyed property
3212 // we store the result under the receiver that is currently on top 3212 // we store the result under the receiver that is currently on top
3213 // of the stack. 3213 // of the stack.
3214 switch (assign_type) { 3214 switch (assign_type) {
3215 case VARIABLE: 3215 case VARIABLE:
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3668 __ ret(0); 3668 __ ret(0);
3669 } 3669 }
3670 3670
3671 3671
3672 #undef __ 3672 #undef __
3673 3673
3674 3674
3675 } } // namespace v8::internal 3675 } } // namespace v8::internal
3676 3676
3677 #endif // V8_TARGET_ARCH_X64 3677 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ast.cc ('K') | « src/x64/deoptimizer-x64.cc ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698