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

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

Issue 668151: Make more use of the NumberInfo data.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 __ call(ic, RelocInfo::CODE_TARGET); 1123 __ call(ic, RelocInfo::CODE_TARGET);
1124 __ nop(); 1124 __ nop();
1125 } 1125 }
1126 1126
1127 1127
1128 void FullCodeGenerator::EmitBinaryOp(Token::Value op, 1128 void FullCodeGenerator::EmitBinaryOp(Token::Value op,
1129 Expression::Context context) { 1129 Expression::Context context) {
1130 __ push(result_register()); 1130 __ push(result_register());
1131 GenericBinaryOpStub stub(op, 1131 GenericBinaryOpStub stub(op,
1132 NO_OVERWRITE, 1132 NO_OVERWRITE,
1133 NO_GENERIC_BINARY_FLAGS); 1133 NO_GENERIC_BINARY_FLAGS,
1134 NumberInfo::Unknown());
1134 __ CallStub(&stub); 1135 __ CallStub(&stub);
1135 Apply(context, eax); 1136 Apply(context, eax);
1136 } 1137 }
1137 1138
1138 1139
1139 void FullCodeGenerator::EmitVariableAssignment(Variable* var, 1140 void FullCodeGenerator::EmitVariableAssignment(Variable* var,
1140 Expression::Context context) { 1141 Expression::Context context) {
1141 // Three main cases: global variables, lookup slots, and all other 1142 // Three main cases: global variables, lookup slots, and all other
1142 // types of slots. Left-hand-side parameters that rewrite to 1143 // types of slots. Left-hand-side parameters that rewrite to
1143 // explicit property accesses do not reach here. 1144 // explicit property accesses do not reach here.
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 // Call stub. Undo operation first. 1738 // Call stub. Undo operation first.
1738 if (expr->op() == Token::INC) { 1739 if (expr->op() == Token::INC) {
1739 __ sub(Operand(eax), Immediate(Smi::FromInt(1))); 1740 __ sub(Operand(eax), Immediate(Smi::FromInt(1)));
1740 } else { 1741 } else {
1741 __ add(Operand(eax), Immediate(Smi::FromInt(1))); 1742 __ add(Operand(eax), Immediate(Smi::FromInt(1)));
1742 } 1743 }
1743 } 1744 }
1744 // Call stub for +1/-1. 1745 // Call stub for +1/-1.
1745 GenericBinaryOpStub stub(expr->binary_op(), 1746 GenericBinaryOpStub stub(expr->binary_op(),
1746 NO_OVERWRITE, 1747 NO_OVERWRITE,
1747 NO_GENERIC_BINARY_FLAGS); 1748 NO_GENERIC_BINARY_FLAGS,
1749 NumberInfo::Unknown());
1748 stub.GenerateCall(masm(), eax, Smi::FromInt(1)); 1750 stub.GenerateCall(masm(), eax, Smi::FromInt(1));
1749 __ bind(&done); 1751 __ bind(&done);
1750 1752
1751 // Store the value returned in eax. 1753 // Store the value returned in eax.
1752 switch (assign_type) { 1754 switch (assign_type) {
1753 case VARIABLE: 1755 case VARIABLE:
1754 if (expr->is_postfix()) { 1756 if (expr->is_postfix()) {
1755 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 1757 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
1756 Expression::kEffect); 1758 Expression::kEffect);
1757 // For all contexts except kEffect: We have the result on 1759 // For all contexts except kEffect: We have the result on
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 __ add(Operand(edx), Immediate(masm_->CodeObject())); 2005 __ add(Operand(edx), Immediate(masm_->CodeObject()));
2004 __ mov(Operand(esp, 0), edx); 2006 __ mov(Operand(esp, 0), edx);
2005 // And return. 2007 // And return.
2006 __ ret(0); 2008 __ ret(0);
2007 } 2009 }
2008 2010
2009 2011
2010 #undef __ 2012 #undef __
2011 2013
2012 } } // namespace v8::internal 2014 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698