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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 19927002: Fix invalid SMI test in x64 ToNumberStub::Generate(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 __ CallExternalReference(miss, descriptor->register_param_count_); 292 __ CallExternalReference(miss, descriptor->register_param_count_);
293 } 293 }
294 294
295 __ Ret(); 295 __ Ret();
296 } 296 }
297 297
298 298
299 void ToNumberStub::Generate(MacroAssembler* masm) { 299 void ToNumberStub::Generate(MacroAssembler* masm) {
300 // The ToNumber stub takes one argument in rax. 300 // The ToNumber stub takes one argument in rax.
301 Label check_heap_number, call_builtin; 301 Label check_heap_number, call_builtin;
302 __ SmiTest(rax); 302 __ JumpIfNotSmi(rax, &check_heap_number, Label::kNear);
303 __ j(not_zero, &check_heap_number, Label::kNear);
304 __ Ret(); 303 __ Ret();
305 304
306 __ bind(&check_heap_number); 305 __ bind(&check_heap_number);
307 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), 306 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset),
308 Heap::kHeapNumberMapRootIndex); 307 Heap::kHeapNumberMapRootIndex);
309 __ j(not_equal, &call_builtin, Label::kNear); 308 __ j(not_equal, &call_builtin, Label::kNear);
310 __ Ret(); 309 __ Ret();
311 310
312 __ bind(&call_builtin); 311 __ bind(&call_builtin);
313 __ pop(rcx); // Pop return address. 312 __ pop(rcx); // Pop return address.
(...skipping 6513 matching lines...) Expand 10 before | Expand all | Expand 10 after
6827 __ bind(&fast_elements_case); 6826 __ bind(&fast_elements_case);
6828 GenerateCase(masm, FAST_ELEMENTS); 6827 GenerateCase(masm, FAST_ELEMENTS);
6829 } 6828 }
6830 6829
6831 6830
6832 #undef __ 6831 #undef __
6833 6832
6834 } } // namespace v8::internal 6833 } } // namespace v8::internal
6835 6834
6836 #endif // V8_TARGET_ARCH_X64 6835 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698