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

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

Issue 7795018: Generated code for substring slices in x64 and arm. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Applied Bill's suggestions. Created 9 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/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('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 3251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3262 3262
3263 // Check whether the string is sequential. The only non-sequential 3263 // Check whether the string is sequential. The only non-sequential
3264 // shapes we support have just been unwrapped above. 3264 // shapes we support have just been unwrapped above.
3265 __ bind(&check_sequential); 3265 __ bind(&check_sequential);
3266 STATIC_ASSERT(kSeqStringTag == 0); 3266 STATIC_ASSERT(kSeqStringTag == 0);
3267 __ test(result, Immediate(kStringRepresentationMask)); 3267 __ test(result, Immediate(kStringRepresentationMask));
3268 __ j(not_zero, deferred->entry()); 3268 __ j(not_zero, deferred->entry());
3269 3269
3270 // Dispatch on the encoding: ASCII or two-byte. 3270 // Dispatch on the encoding: ASCII or two-byte.
3271 Label ascii_string; 3271 Label ascii_string;
3272 STATIC_ASSERT(kAsciiStringTag != 0); 3272 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
3273 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
3273 __ test(result, Immediate(kStringEncodingMask)); 3274 __ test(result, Immediate(kStringEncodingMask));
3274 __ j(not_zero, &ascii_string, Label::kNear); 3275 __ j(not_zero, &ascii_string, Label::kNear);
3275 3276
3276 // Two-byte string. 3277 // Two-byte string.
3277 // Load the two-byte character code into the result register. 3278 // Load the two-byte character code into the result register.
3278 Label done; 3279 Label done;
3279 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); 3280 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1);
3280 __ movzx_w(result, FieldOperand(string, 3281 __ movzx_w(result, FieldOperand(string,
3281 index, 3282 index,
3282 times_2, 3283 times_2,
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
4377 env->deoptimization_index()); 4378 env->deoptimization_index());
4378 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4379 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4379 } 4380 }
4380 4381
4381 4382
4382 #undef __ 4383 #undef __
4383 4384
4384 } } // namespace v8::internal 4385 } } // namespace v8::internal
4385 4386
4386 #endif // V8_TARGET_ARCH_IA32 4387 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698