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

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

Issue 8440051: Intrinsify String.charCodeAt, String.length and String.hashCode. Improves frog performance by 2x. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « runtime/vm/object.h ('k') | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 Label* label() { return &label_; } 140 Label* label() { return &label_; }
141 141
142 private: 142 private:
143 const AstNode* node_; 143 const AstNode* node_;
144 GrowableArray<Register> registers_; 144 GrowableArray<Register> registers_;
145 Label label_; 145 Label label_;
146 146
147 DISALLOW_COPY_AND_ASSIGN(DeoptimizationBlob); 147 DISALLOW_COPY_AND_ASSIGN(DeoptimizationBlob);
148 }; 148 };
149 149
150 // TODO(srdjan): Add String_get:length, String_charCodeAt, String_hashCode.
150 151
151 #define RECOGNIZED_LIST(V) \ 152 #define RECOGNIZED_LIST(V) \
152 V(ObjectArray, get:length, ObjectArrayLength) \ 153 V(ObjectArray, get:length, ObjectArrayLength) \
153 V(GrowableObjectArray, get:length, GrowableArrayLength) \ 154 V(GrowableObjectArray, get:length, GrowableArrayLength) \
154 V(IntegerImplementation, toDouble, IntegerToDouble) \ 155 V(IntegerImplementation, toDouble, IntegerToDouble) \
155 V(Double, toDouble, DoubleToDouble) \ 156 V(Double, toDouble, DoubleToDouble) \
156 V(Math, sqrt, MathSqrt) \ 157 V(Math, sqrt, MathSqrt) \
157 158
158 // Class that recognizes the name and owner of a function and returns the 159 // Class that recognizes the name and owner of a function and returns the
159 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 160 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize)); 2378 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize));
2378 // Result is in EAX. 2379 // Result is in EAX.
2379 if (IsResultNeeded(node)) { 2380 if (IsResultNeeded(node)) {
2380 __ pushl(EAX); 2381 __ pushl(EAX);
2381 } 2382 }
2382 } 2383 }
2383 2384
2384 } // namespace dart 2385 } // namespace dart
2385 2386
2386 #endif // defined TARGET_ARCH_IA32 2387 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698