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

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

Issue 1815333002: Simpler regex names: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 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
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 void Intrinsifier::OneByteString_equality(Assembler* assembler) { 2048 void Intrinsifier::OneByteString_equality(Assembler* assembler) {
2049 StringEquality(assembler, kOneByteStringCid); 2049 StringEquality(assembler, kOneByteStringCid);
2050 } 2050 }
2051 2051
2052 2052
2053 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { 2053 void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
2054 StringEquality(assembler, kTwoByteStringCid); 2054 StringEquality(assembler, kTwoByteStringCid);
2055 } 2055 }
2056 2056
2057 2057
2058 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { 2058 void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) {
2059 if (FLAG_interpret_irregexp) return; 2059 if (FLAG_interpret_irregexp) return;
2060 2060
2061 static const intptr_t kRegExpParamOffset = 2 * kWordSize; 2061 static const intptr_t kRegExpParamOffset = 2 * kWordSize;
2062 static const intptr_t kStringParamOffset = 1 * kWordSize; 2062 static const intptr_t kStringParamOffset = 1 * kWordSize;
2063 // start_index smi is located at offset 0. 2063 // start_index smi is located at offset 0.
2064 2064
2065 // Incoming registers: 2065 // Incoming registers:
2066 // R0: Function. (Will be reloaded with the specialized matcher function.) 2066 // R0: Function. (Will be reloaded with the specialized matcher function.)
2067 // R4: Arguments descriptor. (Will be preserved.) 2067 // R4: Arguments descriptor. (Will be preserved.)
2068 // R9: Unknown. (Must be GC safe on tail call.) 2068 // R9: Unknown. (Must be GC safe on tail call.)
2069 2069
2070 // Load the specialized function pointer into R0. Leverage the fact the 2070 // Load the specialized function pointer into R0. Leverage the fact the
2071 // string CIDs as well as stored function pointers are in sequence. 2071 // string CIDs as well as stored function pointers are in sequence.
2072 __ ldr(R2, Address(SP, kRegExpParamOffset)); 2072 __ ldr(R2, Address(SP, kRegExpParamOffset));
2073 __ ldr(R1, Address(SP, kStringParamOffset)); 2073 __ ldr(R1, Address(SP, kStringParamOffset));
2074 __ LoadClassId(R1, R1); 2074 __ LoadClassId(R1, R1);
2075 __ AddImmediate(R1, R1, -kOneByteStringCid); 2075 __ AddImmediate(R1, R1, -kOneByteStringCid);
2076 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2)); 2076 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2));
2077 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid))); 2077 __ ldr(R0, FieldAddress(R1, RegExp::function_offset(kOneByteStringCid)));
2078 2078
2079 // Registers are now set up for the lazy compile stub. It expects the function 2079 // Registers are now set up for the lazy compile stub. It expects the function
2080 // in R0, the argument descriptor in R4, and IC-Data in R9. 2080 // in R0, the argument descriptor in R4, and IC-Data in R9.
2081 __ eor(R9, R9, Operand(R9)); 2081 __ eor(R9, R9, Operand(R9));
2082 2082
2083 // Tail-call the function. 2083 // Tail-call the function.
2084 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); 2084 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
2085 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset())); 2085 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
2086 __ bx(R1); 2086 __ bx(R1);
2087 } 2087 }
(...skipping 26 matching lines...) Expand all
2114 2114
2115 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2115 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2116 __ LoadIsolate(R0); 2116 __ LoadIsolate(R0);
2117 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2117 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2118 __ Ret(); 2118 __ Ret();
2119 } 2119 }
2120 2120
2121 } // namespace dart 2121 } // namespace dart
2122 2122
2123 #endif // defined TARGET_ARCH_ARM 2123 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698