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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 1201383002: Port irregexp bytecode compiler and interpreter from V8 r24065. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
11 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
12 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
13 #include "vm/instructions.h" 13 #include "vm/instructions.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/regexp_assembler.h" 15 #include "vm/regexp_assembler.h"
16 #include "vm/symbols.h" 16 #include "vm/symbols.h"
17 17
18 namespace dart { 18 namespace dart {
19 19
20 DECLARE_FLAG(bool, interpret_irregexp);
21
20 // When entering intrinsics code: 22 // When entering intrinsics code:
21 // RBX: IC Data 23 // RBX: IC Data
22 // R10: Arguments descriptor 24 // R10: Arguments descriptor
23 // TOS: Return address 25 // TOS: Return address
24 // The RBX, R10 registers can be destroyed only if there is no slow-path, i.e. 26 // The RBX, R10 registers can be destroyed only if there is no slow-path, i.e.
25 // if the intrinsified method always executes a return. 27 // if the intrinsified method always executes a return.
26 // The RBP register should not be modified, because it is used by the profiler. 28 // The RBP register should not be modified, because it is used by the profiler.
27 29
28 #define __ assembler-> 30 #define __ assembler->
29 31
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 StringEquality(assembler, kOneByteStringCid); 1931 StringEquality(assembler, kOneByteStringCid);
1930 } 1932 }
1931 1933
1932 1934
1933 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { 1935 void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
1934 StringEquality(assembler, kTwoByteStringCid); 1936 StringEquality(assembler, kTwoByteStringCid);
1935 } 1937 }
1936 1938
1937 1939
1938 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { 1940 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
1941 if (FLAG_interpret_irregexp) return;
1942
1939 static const intptr_t kRegExpParamOffset = 3 * kWordSize; 1943 static const intptr_t kRegExpParamOffset = 3 * kWordSize;
1940 static const intptr_t kStringParamOffset = 2 * kWordSize; 1944 static const intptr_t kStringParamOffset = 2 * kWordSize;
1941 // start_index smi is located at offset 1. 1945 // start_index smi is located at offset 1.
1942 1946
1943 // Incoming registers: 1947 // Incoming registers:
1944 // RAX: Function. (Will be loaded with the specialized matcher function.) 1948 // RAX: Function. (Will be loaded with the specialized matcher function.)
1945 // RCX: Unknown. (Must be GC safe on tail call.) 1949 // RCX: Unknown. (Must be GC safe on tail call.)
1946 // R10: Arguments descriptor. (Will be preserved.) 1950 // R10: Arguments descriptor. (Will be preserved.)
1947 1951
1948 // Load the specialized function pointer into RAX. Leverage the fact the 1952 // Load the specialized function pointer into RAX. Leverage the fact the
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 // Set return value to Isolate::current_tag_. 2015 // Set return value to Isolate::current_tag_.
2012 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); 2016 __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
2013 __ ret(); 2017 __ ret();
2014 } 2018 }
2015 2019
2016 #undef __ 2020 #undef __
2017 2021
2018 } // namespace dart 2022 } // namespace dart
2019 2023
2020 #endif // defined TARGET_ARCH_X64 2024 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698