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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 * RegExp registers. | 56 * RegExp registers. |
57 * - rsp : points to tip of C stack. | 57 * - rsp : points to tip of C stack. |
58 * - rcx : points to tip of backtrack stack. The backtrack stack contains | 58 * - rcx : points to tip of backtrack stack. The backtrack stack contains |
59 * only 32-bit values. Most are offsets from some base (e.g., character | 59 * only 32-bit values. Most are offsets from some base (e.g., character |
60 * positions from end of string or code location from Code* pointer). | 60 * positions from end of string or code location from Code* pointer). |
61 * - r8 : code object pointer. Used to convert between absolute and | 61 * - r8 : code object pointer. Used to convert between absolute and |
62 * code-object-relative addresses. | 62 * code-object-relative addresses. |
63 * | 63 * |
64 * The registers rax, rbx, r9 and r11 are free to use for computations. | 64 * The registers rax, rbx, r9 and r11 are free to use for computations. |
65 * If changed to use r12+, they should be saved as callee-save registers. | 65 * If changed to use r12+, they should be saved as callee-save registers. |
66 * The macro assembler special registers r12 and r13 (kSmiConstantRegister, | |
67 * kRootRegister) are not initialized during RegExp code. | |
William Hesse
2011/03/22 14:05:08
"are not initialized" is confusing. Do you mean "
Lasse Reichstein
2011/03/22 14:12:21
Except that they are not free either (since we don
| |
66 * | 68 * |
67 * Each call to a C++ method should retain these registers. | 69 * Each call to a C++ method should retain these registers. |
68 * | 70 * |
69 * The stack will have the following content, in some order, indexable from the | 71 * The stack will have the following content, in some order, indexable from the |
70 * frame pointer (see, e.g., kStackHighEnd): | 72 * frame pointer (see, e.g., kStackHighEnd): |
71 * - Isolate* isolate (Address of the current isolate) | 73 * - Isolate* isolate (Address of the current isolate) |
72 * - direct_call (if 1, direct call from JavaScript code, if 0 call | 74 * - direct_call (if 1, direct call from JavaScript code, if 0 call |
73 * through the runtime system) | 75 * through the runtime system) |
74 * - stack_area_base (High end of the memory area to use as | 76 * - stack_area_base (High end of the memory area to use as |
75 * backtracking stack) | 77 * backtracking stack) |
(...skipping 28 matching lines...) Expand all Loading... | |
104 * byte* stack_area_base, | 106 * byte* stack_area_base, |
105 * bool direct_call) | 107 * bool direct_call) |
106 */ | 108 */ |
107 | 109 |
108 #define __ ACCESS_MASM(masm_) | 110 #define __ ACCESS_MASM(masm_) |
109 | 111 |
110 RegExpMacroAssemblerX64::RegExpMacroAssemblerX64( | 112 RegExpMacroAssemblerX64::RegExpMacroAssemblerX64( |
111 Mode mode, | 113 Mode mode, |
112 int registers_to_save) | 114 int registers_to_save) |
113 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)), | 115 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)), |
116 no_root_array_scope_(masm_), | |
114 code_relative_fixup_positions_(4), | 117 code_relative_fixup_positions_(4), |
115 mode_(mode), | 118 mode_(mode), |
116 num_registers_(registers_to_save), | 119 num_registers_(registers_to_save), |
117 num_saved_registers_(registers_to_save), | 120 num_saved_registers_(registers_to_save), |
118 entry_label_(), | 121 entry_label_(), |
119 start_label_(), | 122 start_label_(), |
120 success_label_(), | 123 success_label_(), |
121 backtrack_label_(), | 124 backtrack_label_(), |
122 exit_label_() { | 125 exit_label_() { |
123 ASSERT_EQ(0, registers_to_save % 2); | 126 ASSERT_EQ(0, registers_to_save % 2); |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1377 } | 1380 } |
1378 } | 1381 } |
1379 | 1382 |
1380 #undef __ | 1383 #undef __ |
1381 | 1384 |
1382 #endif // V8_INTERPRETED_REGEXP | 1385 #endif // V8_INTERPRETED_REGEXP |
1383 | 1386 |
1384 }} // namespace v8::internal | 1387 }} // namespace v8::internal |
1385 | 1388 |
1386 #endif // V8_TARGET_ARCH_X64 | 1389 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |