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

Side by Side Diff: runtime/vm/intrinsifier_mips.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_ia32.cc ('k') | runtime/vm/intrinsifier_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 (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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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/object.h" 13 #include "vm/object.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 // S5: IC Data 23 // S5: IC Data
22 // S4: Arguments descriptor 24 // S4: Arguments descriptor
23 // RA: Return address 25 // RA: Return address
24 // The S5, S4 registers can be destroyed only if there is no slow-path, i.e. 26 // The S5, S4 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 FP register should not be modified, because it is used by the profiler. 28 // The FP register should not be modified, because it is used by the profiler.
27 29
28 #define __ assembler-> 30 #define __ assembler->
29 31
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 StringEquality(assembler, kOneByteStringCid); 2092 StringEquality(assembler, kOneByteStringCid);
2091 } 2093 }
2092 2094
2093 2095
2094 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { 2096 void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
2095 StringEquality(assembler, kTwoByteStringCid); 2097 StringEquality(assembler, kTwoByteStringCid);
2096 } 2098 }
2097 2099
2098 2100
2099 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { 2101 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
2102 if (FLAG_interpret_irregexp) return;
2103
2100 static const intptr_t kRegExpParamOffset = 2 * kWordSize; 2104 static const intptr_t kRegExpParamOffset = 2 * kWordSize;
2101 static const intptr_t kStringParamOffset = 1 * kWordSize; 2105 static const intptr_t kStringParamOffset = 1 * kWordSize;
2102 // start_index smi is located at 0. 2106 // start_index smi is located at 0.
2103 2107
2104 // Incoming registers: 2108 // Incoming registers:
2105 // T0: Function. (Will be reloaded with the specialized matcher function.) 2109 // T0: Function. (Will be reloaded with the specialized matcher function.)
2106 // S4: Arguments descriptor. (Will be preserved.) 2110 // S4: Arguments descriptor. (Will be preserved.)
2107 // S5: Unknown. (Must be GC safe on tail call.) 2111 // S5: Unknown. (Must be GC safe on tail call.)
2108 2112
2109 // Load the specialized function pointer into T0. Leverage the fact the 2113 // Load the specialized function pointer into T0. Leverage the fact the
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 Isolate* isolate = Isolate::Current(); 2168 Isolate* isolate = Isolate::Current();
2165 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); 2169 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate));
2166 // Set return value. 2170 // Set return value.
2167 __ Ret(); 2171 __ Ret();
2168 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2172 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2169 } 2173 }
2170 2174
2171 } // namespace dart 2175 } // namespace dart
2172 2176
2173 #endif // defined TARGET_ARCH_MIPS 2177 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698