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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 // preserved, |scratch1|, |scratch2|, and |result| are clobbered. | 1796 // preserved, |scratch1|, |scratch2|, and |result| are clobbered. |
1797 class StringCharAtGenerator { | 1797 class StringCharAtGenerator { |
1798 public: | 1798 public: |
1799 StringCharAtGenerator(Register object, Register index, Register scratch, | 1799 StringCharAtGenerator(Register object, Register index, Register scratch, |
1800 Register result, Label* receiver_not_string, | 1800 Register result, Label* receiver_not_string, |
1801 Label* index_not_number, Label* index_out_of_range, | 1801 Label* index_not_number, Label* index_out_of_range, |
1802 StringIndexFlags index_flags, | 1802 StringIndexFlags index_flags, |
1803 ReceiverCheckMode check_mode = RECEIVER_IS_UNKNOWN) | 1803 ReceiverCheckMode check_mode = RECEIVER_IS_UNKNOWN) |
1804 : char_code_at_generator_(object, index, scratch, receiver_not_string, | 1804 : char_code_at_generator_(object, index, scratch, receiver_not_string, |
1805 index_not_number, index_out_of_range, | 1805 index_not_number, index_out_of_range, |
1806 index_flags), | 1806 index_flags, check_mode), |
1807 char_from_code_generator_(scratch, result) {} | 1807 char_from_code_generator_(scratch, result) {} |
1808 | 1808 |
1809 // Generates the fast case code. On the fallthrough path |result| | 1809 // Generates the fast case code. On the fallthrough path |result| |
1810 // register contains the result. | 1810 // register contains the result. |
1811 void GenerateFast(MacroAssembler* masm) { | 1811 void GenerateFast(MacroAssembler* masm) { |
1812 char_code_at_generator_.GenerateFast(masm); | 1812 char_code_at_generator_.GenerateFast(masm); |
1813 char_from_code_generator_.GenerateFast(masm); | 1813 char_from_code_generator_.GenerateFast(masm); |
1814 } | 1814 } |
1815 | 1815 |
1816 // Generates the slow case code. Must not be naturally | 1816 // Generates the slow case code. Must not be naturally |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 | 2526 |
2527 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR | 2527 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR |
2528 #undef DEFINE_PLATFORM_CODE_STUB | 2528 #undef DEFINE_PLATFORM_CODE_STUB |
2529 #undef DEFINE_HANDLER_CODE_STUB | 2529 #undef DEFINE_HANDLER_CODE_STUB |
2530 #undef DEFINE_HYDROGEN_CODE_STUB | 2530 #undef DEFINE_HYDROGEN_CODE_STUB |
2531 #undef DEFINE_CODE_STUB | 2531 #undef DEFINE_CODE_STUB |
2532 #undef DEFINE_CODE_STUB_BASE | 2532 #undef DEFINE_CODE_STUB_BASE |
2533 } } // namespace v8::internal | 2533 } } // namespace v8::internal |
2534 | 2534 |
2535 #endif // V8_CODE_STUBS_H_ | 2535 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |