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

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

Issue 8510005: Simplify StringCharCodeAt in non-crankshaft codegen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | Annotate | Revision Log
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 3433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3444 Immediate(factory()->empty_string())); 3444 Immediate(factory()->empty_string()));
3445 __ j(not_equal, deferred->entry()); 3445 __ j(not_equal, deferred->entry());
3446 __ mov(string, FieldOperand(string, ConsString::kFirstOffset)); 3446 __ mov(string, FieldOperand(string, ConsString::kFirstOffset));
3447 3447
3448 __ bind(&indirect_string_loaded); 3448 __ bind(&indirect_string_loaded);
3449 __ mov(result, FieldOperand(string, HeapObject::kMapOffset)); 3449 __ mov(result, FieldOperand(string, HeapObject::kMapOffset));
3450 __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset)); 3450 __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset));
3451 3451
3452 // Check whether the string is sequential. The only non-sequential 3452 // Check whether the string is sequential. The only non-sequential
3453 // shapes we support have just been unwrapped above. 3453 // shapes we support have just been unwrapped above.
3454 // Note that if the original string is a cons or slice with an external
3455 // string as underlying string, we pass that unpacked underlying string with
3456 // the updated index to the runtime function.
3454 __ bind(&check_sequential); 3457 __ bind(&check_sequential);
3455 STATIC_ASSERT(kSeqStringTag == 0); 3458 STATIC_ASSERT(kSeqStringTag == 0);
3456 __ test(result, Immediate(kStringRepresentationMask)); 3459 __ test(result, Immediate(kStringRepresentationMask));
3457 __ j(not_zero, deferred->entry()); 3460 __ j(not_zero, deferred->entry());
3458 3461
3459 // Dispatch on the encoding: ASCII or two-byte. 3462 // Dispatch on the encoding: ASCII or two-byte.
3460 Label ascii_string; 3463 Label ascii_string;
3461 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); 3464 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
3462 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); 3465 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
3463 __ test(result, Immediate(kStringEncodingMask)); 3466 __ test(result, Immediate(kStringEncodingMask));
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4583 env->deoptimization_index()); 4586 env->deoptimization_index());
4584 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4587 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4585 } 4588 }
4586 4589
4587 4590
4588 #undef __ 4591 #undef __
4589 4592
4590 } } // namespace v8::internal 4593 } } // namespace v8::internal
4591 4594
4592 #endif // V8_TARGET_ARCH_IA32 4595 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698