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

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

Issue 1227963004: Trace typed data allocations (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_arm64.cc ('k') | runtime/vm/intrinsifier_mips.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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 Immediate(reinterpret_cast<int32_t>(Object::null())); 179 Immediate(reinterpret_cast<int32_t>(Object::null()));
180 __ movl(EAX, raw_null); 180 __ movl(EAX, raw_null);
181 __ ret(); 181 __ ret();
182 __ Bind(&fall_through); 182 __ Bind(&fall_through);
183 } 183 }
184 184
185 185
186 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_factor) \ 186 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_factor) \
187 Label fall_through; \ 187 Label fall_through; \
188 const intptr_t kArrayLengthStackOffset = 1 * kWordSize; \ 188 const intptr_t kArrayLengthStackOffset = 1 * kWordSize; \
189 __ MaybeTraceAllocation(cid, EDI, &fall_through, false); \
189 __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */ \ 190 __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */ \
190 /* Check that length is a positive Smi. */ \ 191 /* Check that length is a positive Smi. */ \
191 /* EDI: requested array length argument. */ \ 192 /* EDI: requested array length argument. */ \
192 __ testl(EDI, Immediate(kSmiTagMask)); \ 193 __ testl(EDI, Immediate(kSmiTagMask)); \
193 __ j(NOT_ZERO, &fall_through); \ 194 __ j(NOT_ZERO, &fall_through); \
194 __ cmpl(EDI, Immediate(0)); \ 195 __ cmpl(EDI, Immediate(0)); \
195 __ j(LESS, &fall_through); \ 196 __ j(LESS, &fall_through); \
196 __ SmiUntag(EDI); \ 197 __ SmiUntag(EDI); \
197 /* Check for maximum allowed length. */ \ 198 /* Check for maximum allowed length. */ \
198 /* EDI: untagged array length. */ \ 199 /* EDI: untagged array length. */ \
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 Isolate::current_tag_offset()); 2154 Isolate::current_tag_offset());
2154 // Set return value to Isolate::current_tag_. 2155 // Set return value to Isolate::current_tag_.
2155 __ movl(EAX, current_tag_addr); 2156 __ movl(EAX, current_tag_addr);
2156 __ ret(); 2157 __ ret();
2157 } 2158 }
2158 2159
2159 #undef __ 2160 #undef __
2160 } // namespace dart 2161 } // namespace dart
2161 2162
2162 #endif // defined TARGET_ARCH_IA32 2163 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698