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

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

Issue 141713009: A64: Port LSeqStringSetChar optimizations from r16707 and r17521. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | src/a64/macro-assembler-a64.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 VisitForStackValue(args->at(2)); // value 3248 VisitForStackValue(args->at(2)); // value
3249 VisitForAccumulatorValue(args->at(0)); // string 3249 VisitForAccumulatorValue(args->at(0)); // string
3250 __ Pop(value, index); 3250 __ Pop(value, index);
3251 3251
3252 if (FLAG_debug_code) { 3252 if (FLAG_debug_code) {
3253 Label both_smis; 3253 Label both_smis;
3254 __ JumpIfBothSmi(value, index, &both_smis); 3254 __ JumpIfBothSmi(value, index, &both_smis);
3255 __ Throw(kNonSmiValue); 3255 __ Throw(kNonSmiValue);
3256 __ Throw(kNonSmiIndex); 3256 __ Throw(kNonSmiIndex);
3257 __ Bind(&both_smis); 3257 __ Bind(&both_smis);
3258 3258 __ SmiUntag(index);
3259 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; 3259 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag;
3260 __ EmitSeqStringSetCharCheck(string, index, one_byte_seq_type); 3260 __ EmitSeqStringSetCharCheck(string, index, scratch, one_byte_seq_type);
3261 __ SmiTag(index);
3261 } 3262 }
3262 3263
3263 __ Add(scratch, string, SeqOneByteString::kHeaderSize - kHeapObjectTag); 3264 __ Add(scratch, string, SeqOneByteString::kHeaderSize - kHeapObjectTag);
3264 __ SmiUntag(value); 3265 __ SmiUntag(value);
3265 __ SmiUntag(index); 3266 __ SmiUntag(index);
3266 __ Strb(value, MemOperand(scratch, index)); 3267 __ Strb(value, MemOperand(scratch, index));
3267 context()->Plug(string); 3268 context()->Plug(string);
3268 } 3269 }
3269 3270
3270 3271
(...skipping 10 matching lines...) Expand all
3281 VisitForStackValue(args->at(2)); // value 3282 VisitForStackValue(args->at(2)); // value
3282 VisitForAccumulatorValue(args->at(0)); // string 3283 VisitForAccumulatorValue(args->at(0)); // string
3283 __ Pop(value, index); 3284 __ Pop(value, index);
3284 3285
3285 if (FLAG_debug_code) { 3286 if (FLAG_debug_code) {
3286 Label both_smis; 3287 Label both_smis;
3287 __ JumpIfBothSmi(value, index, &both_smis); 3288 __ JumpIfBothSmi(value, index, &both_smis);
3288 __ Throw(kNonSmiValue); 3289 __ Throw(kNonSmiValue);
3289 __ Throw(kNonSmiIndex); 3290 __ Throw(kNonSmiIndex);
3290 __ Bind(&both_smis); 3291 __ Bind(&both_smis);
3291 3292 __ SmiUntag(index);
3292 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; 3293 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag;
3293 __ EmitSeqStringSetCharCheck(string, index, two_byte_seq_type); 3294 __ EmitSeqStringSetCharCheck(string, index, scratch, two_byte_seq_type);
3295 __ SmiTag(index);
3294 } 3296 }
3295 3297
3296 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); 3298 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag);
3297 __ SmiUntag(value); 3299 __ SmiUntag(value);
3298 __ SmiUntag(index); 3300 __ SmiUntag(index);
3299 __ Strh(value, MemOperand(scratch, index, LSL, 1)); 3301 __ Strh(value, MemOperand(scratch, index, LSL, 1));
3300 context()->Plug(string); 3302 context()->Plug(string);
3301 } 3303 }
3302 3304
3303 3305
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
5057 return previous_; 5059 return previous_;
5058 } 5060 }
5059 5061
5060 5062
5061 #undef __ 5063 #undef __
5062 5064
5063 5065
5064 } } // namespace v8::internal 5066 } } // namespace v8::internal
5065 5067
5066 #endif // V8_TARGET_ARCH_A64 5068 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | src/a64/macro-assembler-a64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698