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

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

Issue 1910002: Improve static type information in (constant SHL smi) computation. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 7 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/x64/codegen-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 answer = allocator()->Allocate(); 2190 answer = allocator()->Allocate();
2191 DeferredInlineSmiOperationReversed* deferred = 2191 DeferredInlineSmiOperationReversed* deferred =
2192 new DeferredInlineSmiOperationReversed(op, 2192 new DeferredInlineSmiOperationReversed(op,
2193 answer.reg(), 2193 answer.reg(),
2194 smi_value, 2194 smi_value,
2195 right.reg(), 2195 right.reg(),
2196 right_type_info, 2196 right_type_info,
2197 overwrite_mode); 2197 overwrite_mode);
2198 __ mov(answer.reg(), Immediate(int_value)); 2198 __ mov(answer.reg(), Immediate(int_value));
2199 __ sar(ecx, kSmiTagSize); 2199 __ sar(ecx, kSmiTagSize);
2200 if (!right.type_info().IsSmi()) { 2200 if (!right_type_info.IsSmi()) {
2201 deferred->Branch(carry); 2201 deferred->Branch(carry);
2202 } else if (FLAG_debug_code) { 2202 } else if (FLAG_debug_code) {
2203 __ AbortIfNotSmi(right.reg()); 2203 __ AbortIfNotSmi(right.reg());
2204 } 2204 }
2205 __ shl_cl(answer.reg()); 2205 __ shl_cl(answer.reg());
2206 __ cmp(answer.reg(), 0xc0000000); 2206 __ cmp(answer.reg(), 0xc0000000);
2207 deferred->Branch(sign); 2207 deferred->Branch(sign);
2208 __ SmiTag(answer.reg()); 2208 __ SmiTag(answer.reg());
2209 2209
2210 deferred->BindExit(); 2210 deferred->BindExit();
(...skipping 10837 matching lines...) Expand 10 before | Expand all | Expand 10 after
13048 13048
13049 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) 13049 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
13050 // tagged as a small integer. 13050 // tagged as a small integer.
13051 __ bind(&runtime); 13051 __ bind(&runtime);
13052 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 13052 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
13053 } 13053 }
13054 13054
13055 #undef __ 13055 #undef __
13056 13056
13057 } } // namespace v8::internal 13057 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698