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

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

Issue 11348349: Improve array to string conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
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 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 __ jmp(&done); 3131 __ jmp(&done);
3132 } 3132 }
3133 3133
3134 __ bind(&not_date_object); 3134 __ bind(&not_date_object);
3135 __ CallRuntime(Runtime::kThrowNotDateError, 0); 3135 __ CallRuntime(Runtime::kThrowNotDateError, 0);
3136 __ bind(&done); 3136 __ bind(&done);
3137 context()->Plug(r0); 3137 context()->Plug(r0);
3138 } 3138 }
3139 3139
3140 3140
3141 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) {
3142 ZoneList<Expression*>* args = expr->arguments();
3143 ASSERT_EQ(3, args->length());
3144
3145 VisitForStackValue(args->at(1)); // index
3146 VisitForStackValue(args->at(2)); // value
3147 __ pop(r2);
3148 __ pop(r1);
3149 VisitForAccumulatorValue(args->at(0)); // string
3150
3151 SeqStringSetCharGenerator::Generate(masm_, true, r0, r1, r2);
3152 context()->Plug(r0);
3153 }
3154
3155
3156 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) {
3157 ZoneList<Expression*>* args = expr->arguments();
3158 ASSERT_EQ(3, args->length());
3159
3160 VisitForStackValue(args->at(1)); // index
3161 VisitForStackValue(args->at(2)); // value
3162 __ pop(r2);
3163 __ pop(r1);
3164 VisitForAccumulatorValue(args->at(0)); // string
3165
3166 SeqStringSetCharGenerator::Generate(masm_, false, r0, r1, r2);
3167 context()->Plug(r0);
3168 }
3169
3170
3171
3141 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { 3172 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
3142 // Load the arguments on the stack and call the runtime function. 3173 // Load the arguments on the stack and call the runtime function.
3143 ZoneList<Expression*>* args = expr->arguments(); 3174 ZoneList<Expression*>* args = expr->arguments();
3144 ASSERT(args->length() == 2); 3175 ASSERT(args->length() == 2);
3145 VisitForStackValue(args->at(0)); 3176 VisitForStackValue(args->at(0));
3146 VisitForStackValue(args->at(1)); 3177 VisitForStackValue(args->at(1));
3147 if (CpuFeatures::IsSupported(VFP2)) { 3178 if (CpuFeatures::IsSupported(VFP2)) {
3148 MathPowStub stub(MathPowStub::ON_STACK); 3179 MathPowStub stub(MathPowStub::ON_STACK);
3149 __ CallStub(&stub); 3180 __ CallStub(&stub);
3150 } else { 3181 } else {
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
4527 *context_length = 0; 4558 *context_length = 0;
4528 return previous_; 4559 return previous_;
4529 } 4560 }
4530 4561
4531 4562
4532 #undef __ 4563 #undef __
4533 4564
4534 } } // namespace v8::internal 4565 } } // namespace v8::internal
4535 4566
4536 #endif // V8_TARGET_ARCH_ARM 4567 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698