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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 442024: Perform string add in generated code on IA-32 platforms... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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 3978 matching lines...) Expand 10 before | Expand all | Expand 10 after
3989 break; 3989 break;
3990 case COS: 3990 case COS:
3991 answer = frame_->CallRuntime(Runtime::kMath_cos, 1); 3991 answer = frame_->CallRuntime(Runtime::kMath_cos, 1);
3992 break; 3992 break;
3993 } 3993 }
3994 frame_->Push(&answer); 3994 frame_->Push(&answer);
3995 done.Bind(); 3995 done.Bind();
3996 } 3996 }
3997 3997
3998 3998
3999 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) {
4000 ASSERT_EQ(2, args->length());
4001
4002 Load(args->at(0));
4003 Load(args->at(1));
4004
4005 Result answer = frame_->CallRuntime(Runtime::kStringAdd, 2);
4006 frame_->Push(&answer);
4007 }
4008
4009
3999 void CodeGenerator::GenerateClassOf(ZoneList<Expression*>* args) { 4010 void CodeGenerator::GenerateClassOf(ZoneList<Expression*>* args) {
4000 ASSERT(args->length() == 1); 4011 ASSERT(args->length() == 1);
4001 JumpTarget leave, null, function, non_function_constructor; 4012 JumpTarget leave, null, function, non_function_constructor;
4002 Load(args->at(0)); // Load the object. 4013 Load(args->at(0)); // Load the object.
4003 Result obj = frame_->Pop(); 4014 Result obj = frame_->Pop();
4004 obj.ToRegister(); 4015 obj.ToRegister();
4005 frame_->Spill(obj.reg()); 4016 frame_->Spill(obj.reg());
4006 4017
4007 // If the object is a smi, we return null. 4018 // If the object is a smi, we return null.
4008 Condition is_smi = masm_->CheckSmi(obj.reg()); 4019 Condition is_smi = masm_->CheckSmi(obj.reg());
(...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after
7871 masm.GetCode(&desc); 7882 masm.GetCode(&desc);
7872 // Call the function from C++. 7883 // Call the function from C++.
7873 return FUNCTION_CAST<ModuloFunction>(buffer); 7884 return FUNCTION_CAST<ModuloFunction>(buffer);
7874 } 7885 }
7875 7886
7876 #endif 7887 #endif
7877 7888
7878 #undef __ 7889 #undef __
7879 7890
7880 } } // namespace v8::internal 7891 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698