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

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

Issue 1305993005: VM: Simplify irregexp entry stub. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: simplify ExecuteMatch Created 5 years, 3 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 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 // string CIDs as well as stored function pointers are in sequence. 2015 // string CIDs as well as stored function pointers are in sequence.
2016 __ ldr(R2, Address(SP, kRegExpParamOffset)); 2016 __ ldr(R2, Address(SP, kRegExpParamOffset));
2017 __ ldr(R1, Address(SP, kStringParamOffset)); 2017 __ ldr(R1, Address(SP, kStringParamOffset));
2018 __ LoadClassId(R1, R1); 2018 __ LoadClassId(R1, R1);
2019 __ AddImmediate(R1, R1, -kOneByteStringCid); 2019 __ AddImmediate(R1, R1, -kOneByteStringCid);
2020 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2)); 2020 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2));
2021 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid))); 2021 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid)));
2022 2022
2023 // Registers are now set up for the lazy compile stub. It expects the function 2023 // Registers are now set up for the lazy compile stub. It expects the function
2024 // in R0, the argument descriptor in R4, and IC-Data in R5. 2024 // in R0, the argument descriptor in R4, and IC-Data in R5.
2025 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount;
2026 __ LoadObject(R4, Array::Handle(ArgumentsDescriptor::New(arg_count)));
2027 __ eor(R5, R5, Operand(R5)); 2025 __ eor(R5, R5, Operand(R5));
2028 2026
2029 // Tail-call the function. 2027 // Tail-call the function.
2030 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset())); 2028 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
2031 __ bx(R1); 2029 __ bx(R1);
2032 } 2030 }
2033 2031
2034 2032
2035 // On stack: user tag (+0). 2033 // On stack: user tag (+0).
2036 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { 2034 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
(...skipping 22 matching lines...) Expand all
2059 2057
2060 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2058 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2061 __ LoadIsolate(R0); 2059 __ LoadIsolate(R0);
2062 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2060 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2063 __ Ret(); 2061 __ Ret();
2064 } 2062 }
2065 2063
2066 } // namespace dart 2064 } // namespace dart
2067 2065
2068 #endif // defined TARGET_ARCH_ARM 2066 #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