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

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

Issue 8506024: MIPS: Simplify StringCharCodeAt in non-crankshaft codegen. (Closed)
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/stub-cache-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3551 matching lines...) Expand 10 before | Expand all | Expand 10 after
3562 __ Branch(deferred->entry(), ne, result, Operand(temp)); 3562 __ Branch(deferred->entry(), ne, result, Operand(temp));
3563 // Get the first of the two strings and load its instance type. 3563 // Get the first of the two strings and load its instance type.
3564 __ lw(string, FieldMemOperand(string, ConsString::kFirstOffset)); 3564 __ lw(string, FieldMemOperand(string, ConsString::kFirstOffset));
3565 3565
3566 __ bind(&indirect_string_loaded); 3566 __ bind(&indirect_string_loaded);
3567 __ lw(result, FieldMemOperand(string, HeapObject::kMapOffset)); 3567 __ lw(result, FieldMemOperand(string, HeapObject::kMapOffset));
3568 __ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); 3568 __ lbu(result, FieldMemOperand(result, Map::kInstanceTypeOffset));
3569 3569
3570 // Check whether the string is sequential. The only non-sequential 3570 // Check whether the string is sequential. The only non-sequential
3571 // shapes we support have just been unwrapped above. 3571 // shapes we support have just been unwrapped above.
3572 // Note that if the original string is a cons or slice with an external
3573 // string as underlying string, we pass that unpacked underlying string with
3574 // the updated index to the runtime function.
3572 __ bind(&check_sequential); 3575 __ bind(&check_sequential);
3573 STATIC_ASSERT(kSeqStringTag == 0); 3576 STATIC_ASSERT(kSeqStringTag == 0);
3574 __ And(temp, result, Operand(kStringRepresentationMask)); 3577 __ And(temp, result, Operand(kStringRepresentationMask));
3575 __ Branch(deferred->entry(), ne, temp, Operand(zero_reg)); 3578 __ Branch(deferred->entry(), ne, temp, Operand(zero_reg));
3576 3579
3577 // Dispatch on the encoding: ASCII or two-byte. 3580 // Dispatch on the encoding: ASCII or two-byte.
3578 Label ascii_string; 3581 Label ascii_string;
3579 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); 3582 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
3580 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); 3583 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
3581 __ And(temp, result, Operand(kStringEncodingMask)); 3584 __ And(temp, result, Operand(kStringEncodingMask));
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
4619 ASSERT(!environment->HasBeenRegistered()); 4622 ASSERT(!environment->HasBeenRegistered());
4620 RegisterEnvironmentForDeoptimization(environment); 4623 RegisterEnvironmentForDeoptimization(environment);
4621 ASSERT(osr_pc_offset_ == -1); 4624 ASSERT(osr_pc_offset_ == -1);
4622 osr_pc_offset_ = masm()->pc_offset(); 4625 osr_pc_offset_ = masm()->pc_offset();
4623 } 4626 }
4624 4627
4625 4628
4626 #undef __ 4629 #undef __
4627 4630
4628 } } // namespace v8::internal 4631 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698