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

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

Issue 22578002: Handle Symbols in the LBranch instruction on x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/code-stubs.cc ('k') | 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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 // String value -> false iff empty. 1989 // String value -> false iff empty.
1990 Label not_string; 1990 Label not_string;
1991 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); 1991 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE);
1992 __ j(above_equal, &not_string, Label::kNear); 1992 __ j(above_equal, &not_string, Label::kNear);
1993 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0)); 1993 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0));
1994 __ j(not_zero, instr->TrueLabel(chunk_)); 1994 __ j(not_zero, instr->TrueLabel(chunk_));
1995 __ jmp(instr->FalseLabel(chunk_)); 1995 __ jmp(instr->FalseLabel(chunk_));
1996 __ bind(&not_string); 1996 __ bind(&not_string);
1997 } 1997 }
1998 1998
1999 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2000 // Symbol value -> true.
2001 __ CmpInstanceType(map, SYMBOL_TYPE);
2002 __ j(equal, instr->TrueLabel(chunk_));
2003 }
2004
1999 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2005 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2000 // heap number -> false iff +0, -0, or NaN. 2006 // heap number -> false iff +0, -0, or NaN.
2001 Label not_heap_number; 2007 Label not_heap_number;
2002 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2008 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2003 __ j(not_equal, &not_heap_number, Label::kNear); 2009 __ j(not_equal, &not_heap_number, Label::kNear);
2004 __ xorps(xmm0, xmm0); 2010 __ xorps(xmm0, xmm0);
2005 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); 2011 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset));
2006 __ j(zero, instr->FalseLabel(chunk_)); 2012 __ j(zero, instr->FalseLabel(chunk_));
2007 __ jmp(instr->TrueLabel(chunk_)); 2013 __ jmp(instr->TrueLabel(chunk_));
2008 __ bind(&not_heap_number); 2014 __ bind(&not_heap_number);
(...skipping 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after
5591 FixedArray::kHeaderSize - kPointerSize)); 5597 FixedArray::kHeaderSize - kPointerSize));
5592 __ bind(&done); 5598 __ bind(&done);
5593 } 5599 }
5594 5600
5595 5601
5596 #undef __ 5602 #undef __
5597 5603
5598 } } // namespace v8::internal 5604 } } // namespace v8::internal
5599 5605
5600 #endif // V8_TARGET_ARCH_X64 5606 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698