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

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

Issue 11573017: MIPS: Improve array to string conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use SmiUntag & cleanup Created 8 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
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 __ jmp(&done); 3139 __ jmp(&done);
3140 } 3140 }
3141 3141
3142 __ bind(&not_date_object); 3142 __ bind(&not_date_object);
3143 __ CallRuntime(Runtime::kThrowNotDateError, 0); 3143 __ CallRuntime(Runtime::kThrowNotDateError, 0);
3144 __ bind(&done); 3144 __ bind(&done);
3145 context()->Plug(v0); 3145 context()->Plug(v0);
3146 } 3146 }
3147 3147
3148 3148
3149 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) {
3150 ZoneList<Expression*>* args = expr->arguments();
3151 ASSERT_EQ(3, args->length());
3152
3153 VisitForStackValue(args->at(1)); // index
3154 VisitForStackValue(args->at(2)); // value
3155 __ pop(a2);
3156 __ pop(a1);
3157 VisitForAccumulatorValue(args->at(0)); // string
3158
3159 static const String::Encoding encoding = String::ONE_BYTE_ENCODING;
3160 SeqStringSetCharGenerator::Generate(masm_, encoding, v0, a1, a2);
3161 context()->Plug(v0);
3162 }
3163
3164
3165 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) {
3166 ZoneList<Expression*>* args = expr->arguments();
3167 ASSERT_EQ(3, args->length());
3168
3169 VisitForStackValue(args->at(1)); // index
3170 VisitForStackValue(args->at(2)); // value
3171 __ pop(a2);
3172 __ pop(a1);
3173 VisitForAccumulatorValue(args->at(0)); // string
3174
3175 static const String::Encoding encoding = String::TWO_BYTE_ENCODING;
3176 SeqStringSetCharGenerator::Generate(masm_, encoding, v0, a1, a2);
3177 context()->Plug(v0);
3178 }
3179
3180
3149 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { 3181 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
3150 // Load the arguments on the stack and call the runtime function. 3182 // Load the arguments on the stack and call the runtime function.
3151 ZoneList<Expression*>* args = expr->arguments(); 3183 ZoneList<Expression*>* args = expr->arguments();
3152 ASSERT(args->length() == 2); 3184 ASSERT(args->length() == 2);
3153 VisitForStackValue(args->at(0)); 3185 VisitForStackValue(args->at(0));
3154 VisitForStackValue(args->at(1)); 3186 VisitForStackValue(args->at(1));
3155 if (CpuFeatures::IsSupported(FPU)) { 3187 if (CpuFeatures::IsSupported(FPU)) {
3156 MathPowStub stub(MathPowStub::ON_STACK); 3188 MathPowStub stub(MathPowStub::ON_STACK);
3157 __ CallStub(&stub); 3189 __ CallStub(&stub);
3158 } else { 3190 } else {
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4544 *context_length = 0; 4576 *context_length = 0;
4545 return previous_; 4577 return previous_;
4546 } 4578 }
4547 4579
4548 4580
4549 #undef __ 4581 #undef __
4550 4582
4551 } } // namespace v8::internal 4583 } } // namespace v8::internal
4552 4584
4553 #endif // V8_TARGET_ARCH_MIPS 4585 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698