| OLD | NEW |
| 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 // If length is not zero, "tos_" contains a non-zero value ==> true. | 1700 // If length is not zero, "tos_" contains a non-zero value ==> true. |
| 1701 __ Ret(); | 1701 __ Ret(); |
| 1702 | 1702 |
| 1703 // Return 0 in "tos_" for false . | 1703 // Return 0 in "tos_" for false . |
| 1704 __ bind(&false_result); | 1704 __ bind(&false_result); |
| 1705 __ mov(tos_, Operand(0, RelocInfo::NONE)); | 1705 __ mov(tos_, Operand(0, RelocInfo::NONE)); |
| 1706 __ Ret(); | 1706 __ Ret(); |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 | 1709 |
| 1710 Handle<Code> GetUnaryOpStub(int key, UnaryOpIC::TypeInfo type_info) { | |
| 1711 UnaryOpStub stub(key, type_info); | |
| 1712 return stub.GetCode(); | |
| 1713 } | |
| 1714 | |
| 1715 | |
| 1716 const char* UnaryOpStub::GetName() { | 1710 const char* UnaryOpStub::GetName() { |
| 1717 if (name_ != NULL) return name_; | 1711 if (name_ != NULL) return name_; |
| 1718 const int kMaxNameLength = 100; | 1712 const int kMaxNameLength = 100; |
| 1719 name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray( | 1713 name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray( |
| 1720 kMaxNameLength); | 1714 kMaxNameLength); |
| 1721 if (name_ == NULL) return "OOM"; | 1715 if (name_ == NULL) return "OOM"; |
| 1722 const char* op_name = Token::Name(op_); | 1716 const char* op_name = Token::Name(op_); |
| 1723 const char* overwrite_name = NULL; // Make g++ happy. | 1717 const char* overwrite_name = NULL; // Make g++ happy. |
| 1724 switch (mode_) { | 1718 switch (mode_) { |
| 1725 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; | 1719 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 break; | 2006 break; |
| 2013 case Token::BIT_NOT: | 2007 case Token::BIT_NOT: |
| 2014 __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); | 2008 __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); |
| 2015 break; | 2009 break; |
| 2016 default: | 2010 default: |
| 2017 UNREACHABLE(); | 2011 UNREACHABLE(); |
| 2018 } | 2012 } |
| 2019 } | 2013 } |
| 2020 | 2014 |
| 2021 | 2015 |
| 2022 Handle<Code> GetBinaryOpStub(int key, | |
| 2023 BinaryOpIC::TypeInfo type_info, | |
| 2024 BinaryOpIC::TypeInfo result_type_info) { | |
| 2025 BinaryOpStub stub(key, type_info, result_type_info); | |
| 2026 return stub.GetCode(); | |
| 2027 } | |
| 2028 | |
| 2029 | |
| 2030 void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { | 2016 void BinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { |
| 2031 Label get_result; | 2017 Label get_result; |
| 2032 | 2018 |
| 2033 __ Push(r1, r0); | 2019 __ Push(r1, r0); |
| 2034 | 2020 |
| 2035 __ mov(r2, Operand(Smi::FromInt(MinorKey()))); | 2021 __ mov(r2, Operand(Smi::FromInt(MinorKey()))); |
| 2036 __ mov(r1, Operand(Smi::FromInt(op_))); | 2022 __ mov(r1, Operand(Smi::FromInt(op_))); |
| 2037 __ mov(r0, Operand(Smi::FromInt(operands_type_))); | 2023 __ mov(r0, Operand(Smi::FromInt(operands_type_))); |
| 2038 __ Push(r2, r1, r0); | 2024 __ Push(r2, r1, r0); |
| 2039 | 2025 |
| (...skipping 4376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6416 __ mov(result, Operand(0)); | 6402 __ mov(result, Operand(0)); |
| 6417 __ Ret(); | 6403 __ Ret(); |
| 6418 } | 6404 } |
| 6419 | 6405 |
| 6420 | 6406 |
| 6421 #undef __ | 6407 #undef __ |
| 6422 | 6408 |
| 6423 } } // namespace v8::internal | 6409 } } // namespace v8::internal |
| 6424 | 6410 |
| 6425 #endif // V8_TARGET_ARCH_ARM | 6411 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |