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

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

Issue 561133005: Change the order of arguments of the (One|Two)ByteSeqStringSetChar intrinsic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/lithium/SeqStringSetChar.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3350 3350
3351 3351
3352 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { 3352 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) {
3353 ZoneList<Expression*>* args = expr->arguments(); 3353 ZoneList<Expression*>* args = expr->arguments();
3354 DCHECK_EQ(3, args->length()); 3354 DCHECK_EQ(3, args->length());
3355 3355
3356 Register string = eax; 3356 Register string = eax;
3357 Register index = ebx; 3357 Register index = ebx;
3358 Register value = ecx; 3358 Register value = ecx;
3359 3359
3360 VisitForStackValue(args->at(1)); // index 3360 VisitForStackValue(args->at(0)); // index
3361 VisitForStackValue(args->at(2)); // value 3361 VisitForStackValue(args->at(1)); // value
3362 VisitForAccumulatorValue(args->at(0)); // string 3362 VisitForAccumulatorValue(args->at(2)); // string
3363 3363
3364 __ pop(value); 3364 __ pop(value);
3365 __ pop(index); 3365 __ pop(index);
3366 3366
3367 if (FLAG_debug_code) { 3367 if (FLAG_debug_code) {
3368 __ test(value, Immediate(kSmiTagMask)); 3368 __ test(value, Immediate(kSmiTagMask));
3369 __ Check(zero, kNonSmiValue); 3369 __ Check(zero, kNonSmiValue);
3370 __ test(index, Immediate(kSmiTagMask)); 3370 __ test(index, Immediate(kSmiTagMask));
3371 __ Check(zero, kNonSmiValue); 3371 __ Check(zero, kNonSmiValue);
3372 } 3372 }
(...skipping 13 matching lines...) Expand all
3386 3386
3387 3387
3388 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { 3388 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) {
3389 ZoneList<Expression*>* args = expr->arguments(); 3389 ZoneList<Expression*>* args = expr->arguments();
3390 DCHECK_EQ(3, args->length()); 3390 DCHECK_EQ(3, args->length());
3391 3391
3392 Register string = eax; 3392 Register string = eax;
3393 Register index = ebx; 3393 Register index = ebx;
3394 Register value = ecx; 3394 Register value = ecx;
3395 3395
3396 VisitForStackValue(args->at(1)); // index 3396 VisitForStackValue(args->at(0)); // index
3397 VisitForStackValue(args->at(2)); // value 3397 VisitForStackValue(args->at(1)); // value
3398 VisitForAccumulatorValue(args->at(0)); // string 3398 VisitForAccumulatorValue(args->at(2)); // string
3399 __ pop(value); 3399 __ pop(value);
3400 __ pop(index); 3400 __ pop(index);
3401 3401
3402 if (FLAG_debug_code) { 3402 if (FLAG_debug_code) {
3403 __ test(value, Immediate(kSmiTagMask)); 3403 __ test(value, Immediate(kSmiTagMask));
3404 __ Check(zero, kNonSmiValue); 3404 __ Check(zero, kNonSmiValue);
3405 __ test(index, Immediate(kSmiTagMask)); 3405 __ test(index, Immediate(kSmiTagMask));
3406 __ Check(zero, kNonSmiValue); 3406 __ Check(zero, kNonSmiValue);
3407 __ SmiUntag(index); 3407 __ SmiUntag(index);
3408 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; 3408 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag;
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4817 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4817 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4818 Assembler::target_address_at(call_target_address, 4818 Assembler::target_address_at(call_target_address,
4819 unoptimized_code)); 4819 unoptimized_code));
4820 return OSR_AFTER_STACK_CHECK; 4820 return OSR_AFTER_STACK_CHECK;
4821 } 4821 }
4822 4822
4823 4823
4824 } } // namespace v8::internal 4824 } } // namespace v8::internal
4825 4825
4826 #endif // V8_TARGET_ARCH_X87 4826 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/lithium/SeqStringSetChar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698