Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Side by Side Diff: src/x64/regexp-macro-assembler-x64.cc

Issue 6716018: X64: Optimize access to external references. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with tip of bleeding edge. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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) aren't special during execution of RegExp code (they don't
68 * hold the values assumed when creating JS code), so no Smi or Root related
69 * macro operations can be used.
66 * 70 *
67 * Each call to a C++ method should retain these registers. 71 * Each call to a C++ method should retain these registers.
68 * 72 *
69 * The stack will have the following content, in some order, indexable from the 73 * The stack will have the following content, in some order, indexable from the
70 * frame pointer (see, e.g., kStackHighEnd): 74 * frame pointer (see, e.g., kStackHighEnd):
71 * - Isolate* isolate (Address of the current isolate) 75 * - Isolate* isolate (Address of the current isolate)
72 * - direct_call (if 1, direct call from JavaScript code, if 0 call 76 * - direct_call (if 1, direct call from JavaScript code, if 0 call
73 * through the runtime system) 77 * through the runtime system)
74 * - stack_area_base (High end of the memory area to use as 78 * - stack_area_base (High end of the memory area to use as
75 * backtracking stack) 79 * backtracking stack)
(...skipping 28 matching lines...) Expand all
104 * byte* stack_area_base, 108 * byte* stack_area_base,
105 * bool direct_call) 109 * bool direct_call)
106 */ 110 */
107 111
108 #define __ ACCESS_MASM(masm_) 112 #define __ ACCESS_MASM(masm_)
109 113
110 RegExpMacroAssemblerX64::RegExpMacroAssemblerX64( 114 RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(
111 Mode mode, 115 Mode mode,
112 int registers_to_save) 116 int registers_to_save)
113 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)), 117 : masm_(new MacroAssembler(NULL, kRegExpCodeSize)),
118 no_root_array_scope_(masm_),
114 code_relative_fixup_positions_(4), 119 code_relative_fixup_positions_(4),
115 mode_(mode), 120 mode_(mode),
116 num_registers_(registers_to_save), 121 num_registers_(registers_to_save),
117 num_saved_registers_(registers_to_save), 122 num_saved_registers_(registers_to_save),
118 entry_label_(), 123 entry_label_(),
119 start_label_(), 124 start_label_(),
120 success_label_(), 125 success_label_(),
121 backtrack_label_(), 126 backtrack_label_(),
122 exit_label_() { 127 exit_label_() {
123 ASSERT_EQ(0, registers_to_save % 2); 128 ASSERT_EQ(0, registers_to_save % 2);
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 } 1383 }
1379 } 1384 }
1380 1385
1381 #undef __ 1386 #undef __
1382 1387
1383 #endif // V8_INTERPRETED_REGEXP 1388 #endif // V8_INTERPRETED_REGEXP
1384 1389
1385 }} // namespace v8::internal 1390 }} // namespace v8::internal
1386 1391
1387 #endif // V8_TARGET_ARCH_X64 1392 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698