| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ARM_CODE_STUBS_ARM_H_ | 5 #ifndef V8_ARM_CODE_STUBS_ARM_H_ |
| 6 #define V8_ARM_CODE_STUBS_ARM_H_ | 6 #define V8_ARM_CODE_STUBS_ARM_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| 11 | 11 |
| 12 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); | 12 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); |
| 13 | 13 |
| 14 | 14 |
| 15 class StringHelper : public AllStatic { | 15 class StringHelper : public AllStatic { |
| 16 public: | 16 public: |
| 17 // Generate code for copying a large number of characters. This function | 17 // Generate code for copying a large number of characters. This function |
| 18 // is allowed to spend extra time setting up conditions to make copying | 18 // is allowed to spend extra time setting up conditions to make copying |
| 19 // faster. Copying of overlapping regions is not supported. | 19 // faster. Copying of overlapping regions is not supported. |
| 20 // Dest register ends at the position after the last character written. | 20 // Dest register ends at the position after the last character written. |
| 21 static void GenerateCopyCharacters(MacroAssembler* masm, | 21 static void GenerateCopyCharacters(MacroAssembler* masm, |
| 22 Register dest, | 22 Register dest, |
| 23 Register src, | 23 Register src, |
| 24 Register count, | 24 Register count, |
| 25 Register scratch, | 25 Register scratch, |
| 26 String::Encoding encoding); | 26 String::Encoding encoding); |
| 27 | 27 |
| 28 // Compares two flat ASCII strings and returns result in r0. | 28 // Compares two flat one-byte strings and returns result in r0. |
| 29 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm, | 29 static void GenerateCompareFlatOneByteStrings( |
| 30 Register left, | 30 MacroAssembler* masm, Register left, Register right, Register scratch1, |
| 31 Register right, | 31 Register scratch2, Register scratch3, Register scratch4); |
| 32 |
| 33 // Compares two flat one-byte strings for equality and returns result in r0. |
| 34 static void GenerateFlatOneByteStringEquals(MacroAssembler* masm, |
| 35 Register left, Register right, |
| 32 Register scratch1, | 36 Register scratch1, |
| 33 Register scratch2, | 37 Register scratch2, |
| 34 Register scratch3, | 38 Register scratch3); |
| 35 Register scratch4); | |
| 36 | |
| 37 // Compares two flat ASCII strings for equality and returns result in r0. | |
| 38 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, | |
| 39 Register left, | |
| 40 Register right, | |
| 41 Register scratch1, | |
| 42 Register scratch2, | |
| 43 Register scratch3); | |
| 44 | 39 |
| 45 private: | 40 private: |
| 46 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm, | 41 static void GenerateOneByteCharsCompareLoop( |
| 47 Register left, | 42 MacroAssembler* masm, Register left, Register right, Register length, |
| 48 Register right, | 43 Register scratch1, Register scratch2, Label* chars_not_equal); |
| 49 Register length, | |
| 50 Register scratch1, | |
| 51 Register scratch2, | |
| 52 Label* chars_not_equal); | |
| 53 | 44 |
| 54 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 45 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
| 55 }; | 46 }; |
| 56 | 47 |
| 57 | 48 |
| 58 // This stub can convert a signed int32 to a heap number (double). It does | 49 // This stub can convert a signed int32 to a heap number (double). It does |
| 59 // not work for int32s that are in Smi range! No GC occurs during this stub | 50 // not work for int32s that are in Smi range! No GC occurs during this stub |
| 60 // so you don't have to set up the frame. | 51 // so you don't have to set up the frame. |
| 61 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { | 52 class WriteInt32ToHeapNumberStub : public PlatformCodeStub { |
| 62 public: | 53 public: |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } | 338 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } |
| 348 | 339 |
| 349 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 340 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
| 350 | 341 |
| 351 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 342 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
| 352 }; | 343 }; |
| 353 | 344 |
| 354 } } // namespace v8::internal | 345 } } // namespace v8::internal |
| 355 | 346 |
| 356 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 347 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
| OLD | NEW |