| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 int false_block = chunk_->LookupDestination(instr->false_block_id()); | 1987 int false_block = chunk_->LookupDestination(instr->false_block_id()); |
| 1988 | 1988 |
| 1989 __ ldr(scratch, | 1989 __ ldr(scratch, |
| 1990 FieldMemOperand(input, String::kHashFieldOffset)); | 1990 FieldMemOperand(input, String::kHashFieldOffset)); |
| 1991 __ tst(scratch, Operand(String::kContainsCachedArrayIndexMask)); | 1991 __ tst(scratch, Operand(String::kContainsCachedArrayIndexMask)); |
| 1992 EmitBranch(true_block, false_block, eq); | 1992 EmitBranch(true_block, false_block, eq); |
| 1993 } | 1993 } |
| 1994 | 1994 |
| 1995 | 1995 |
| 1996 // Branches to a label or falls through with the answer in flags. Trashes | 1996 // Branches to a label or falls through with the answer in flags. Trashes |
| 1997 // the temp registers, but not the input. Only input and temp2 may alias. | 1997 // the temp registers, but not the input. |
| 1998 void LCodeGen::EmitClassOfTest(Label* is_true, | 1998 void LCodeGen::EmitClassOfTest(Label* is_true, |
| 1999 Label* is_false, | 1999 Label* is_false, |
| 2000 Handle<String>class_name, | 2000 Handle<String>class_name, |
| 2001 Register input, | 2001 Register input, |
| 2002 Register temp, | 2002 Register temp, |
| 2003 Register temp2) { | 2003 Register temp2) { |
| 2004 ASSERT(!input.is(temp)); | 2004 ASSERT(!input.is(temp)); |
| 2005 ASSERT(!temp.is(temp2)); // But input and temp2 may be the same register. | 2005 ASSERT(!input.is(temp2)); |
| 2006 ASSERT(!temp.is(temp2)); |
| 2007 |
| 2006 __ JumpIfSmi(input, is_false); | 2008 __ JumpIfSmi(input, is_false); |
| 2007 | 2009 |
| 2008 if (class_name->IsEqualTo(CStrVector("Function"))) { | 2010 if (class_name->IsEqualTo(CStrVector("Function"))) { |
| 2009 // Assuming the following assertions, we can use the same compares to test | 2011 // Assuming the following assertions, we can use the same compares to test |
| 2010 // for both being a function type and being in the object type range. | 2012 // for both being a function type and being in the object type range. |
| 2011 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 2013 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
| 2012 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | 2014 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| 2013 FIRST_SPEC_OBJECT_TYPE + 1); | 2015 FIRST_SPEC_OBJECT_TYPE + 1); |
| 2014 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 2016 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
| 2015 LAST_SPEC_OBJECT_TYPE - 1); | 2017 LAST_SPEC_OBJECT_TYPE - 1); |
| (...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4745 ASSERT(osr_pc_offset_ == -1); | 4747 ASSERT(osr_pc_offset_ == -1); |
| 4746 osr_pc_offset_ = masm()->pc_offset(); | 4748 osr_pc_offset_ = masm()->pc_offset(); |
| 4747 } | 4749 } |
| 4748 | 4750 |
| 4749 | 4751 |
| 4750 | 4752 |
| 4751 | 4753 |
| 4752 #undef __ | 4754 #undef __ |
| 4753 | 4755 |
| 4754 } } // namespace v8::internal | 4756 } } // namespace v8::internal |
| OLD | NEW |