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

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

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2633 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2633 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2634 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); 2634 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this);
2635 compiler->AddSlowPathCode(slow_path); 2635 compiler->AddSlowPathCode(slow_path);
2636 2636
2637 Register out_reg = locs()->out().reg(); 2637 Register out_reg = locs()->out().reg();
2638 XmmRegister value = locs()->in(0).fpu_reg(); 2638 XmmRegister value = locs()->in(0).fpu_reg();
2639 2639
2640 __ TryAllocate(compiler->double_class(), 2640 __ TryAllocate(compiler->double_class(),
2641 slow_path->entry_label(), 2641 slow_path->entry_label(),
2642 Assembler::kFarJump, 2642 Assembler::kFarJump,
2643 out_reg); 2643 out_reg,
2644 kNoRegister);
2644 __ Bind(slow_path->exit_label()); 2645 __ Bind(slow_path->exit_label());
2645 __ movsd(FieldAddress(out_reg, Double::value_offset()), value); 2646 __ movsd(FieldAddress(out_reg, Double::value_offset()), value);
2646 } 2647 }
2647 2648
2648 2649
2649 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const { 2650 LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const {
2650 const intptr_t kNumInputs = 1; 2651 const intptr_t kNumInputs = 1;
2651 const intptr_t value_cid = value()->Type()->ToCid(); 2652 const intptr_t value_cid = value()->Type()->ToCid();
2652 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); 2653 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid));
2653 const bool needs_writable_input = (value_cid == kSmiCid); 2654 const bool needs_writable_input = (value_cid == kSmiCid);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 2741 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
2741 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); 2742 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this);
2742 compiler->AddSlowPathCode(slow_path); 2743 compiler->AddSlowPathCode(slow_path);
2743 2744
2744 Register out_reg = locs()->out().reg(); 2745 Register out_reg = locs()->out().reg();
2745 XmmRegister value = locs()->in(0).fpu_reg(); 2746 XmmRegister value = locs()->in(0).fpu_reg();
2746 2747
2747 __ TryAllocate(compiler->float32x4_class(), 2748 __ TryAllocate(compiler->float32x4_class(),
2748 slow_path->entry_label(), 2749 slow_path->entry_label(),
2749 Assembler::kFarJump, 2750 Assembler::kFarJump,
2750 out_reg); 2751 out_reg,
2752 kNoRegister);
2751 __ Bind(slow_path->exit_label()); 2753 __ Bind(slow_path->exit_label());
2752 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value); 2754 __ movups(FieldAddress(out_reg, Float32x4::value_offset()), value);
2753 } 2755 }
2754 2756
2755 2757
2756 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const { 2758 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary() const {
2757 const intptr_t value_cid = value()->Type()->ToCid(); 2759 const intptr_t value_cid = value()->Type()->ToCid();
2758 const intptr_t kNumInputs = 1; 2760 const intptr_t kNumInputs = 1;
2759 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; 2761 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1;
2760 LocationSummary* summary = 2762 LocationSummary* summary =
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2834 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 2836 void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
2835 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this); 2837 BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this);
2836 compiler->AddSlowPathCode(slow_path); 2838 compiler->AddSlowPathCode(slow_path);
2837 2839
2838 Register out_reg = locs()->out().reg(); 2840 Register out_reg = locs()->out().reg();
2839 XmmRegister value = locs()->in(0).fpu_reg(); 2841 XmmRegister value = locs()->in(0).fpu_reg();
2840 2842
2841 __ TryAllocate(compiler->int32x4_class(), 2843 __ TryAllocate(compiler->int32x4_class(),
2842 slow_path->entry_label(), 2844 slow_path->entry_label(),
2843 Assembler::kFarJump, 2845 Assembler::kFarJump,
2844 out_reg); 2846 out_reg,
2847 kNoRegister);
2845 __ Bind(slow_path->exit_label()); 2848 __ Bind(slow_path->exit_label());
2846 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value); 2849 __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value);
2847 } 2850 }
2848 2851
2849 2852
2850 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const { 2853 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const {
2851 const intptr_t value_cid = value()->Type()->ToCid(); 2854 const intptr_t value_cid = value()->Type()->ToCid();
2852 const intptr_t kNumInputs = 1; 2855 const intptr_t kNumInputs = 1;
2853 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; 2856 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1;
2854 LocationSummary* summary = 2857 LocationSummary* summary =
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
4286 4289
4287 __ SmiTag(EAX); 4290 __ SmiTag(EAX);
4288 __ movl(out_reg, EAX); 4291 __ movl(out_reg, EAX);
4289 __ jmp(&done); 4292 __ jmp(&done);
4290 4293
4291 __ Bind(&not_smi); 4294 __ Bind(&not_smi);
4292 __ TryAllocate( 4295 __ TryAllocate(
4293 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()), 4296 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()),
4294 slow_path->entry_label(), 4297 slow_path->entry_label(),
4295 Assembler::kFarJump, 4298 Assembler::kFarJump,
4296 out_reg); 4299 out_reg,
4300 kNoRegister);
4297 __ Bind(slow_path->exit_label()); 4301 __ Bind(slow_path->exit_label());
4298 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value); 4302 __ movsd(FieldAddress(out_reg, Mint::value_offset()), value);
4299 __ Bind(&done); 4303 __ Bind(&done);
4300 } 4304 }
4301 4305
4302 4306
4303 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const { 4307 LocationSummary* BinaryMintOpInstr::MakeLocationSummary() const {
4304 const intptr_t kNumInputs = 2; 4308 const intptr_t kNumInputs = 2;
4305 switch (op_kind()) { 4309 switch (op_kind()) {
4306 case Token::kBIT_AND: 4310 case Token::kBIT_AND:
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
4884 PcDescriptors::kOther, 4888 PcDescriptors::kOther,
4885 locs()); 4889 locs());
4886 __ Drop(2); // Discard type arguments and receiver. 4890 __ Drop(2); // Discard type arguments and receiver.
4887 } 4891 }
4888 4892
4889 } // namespace dart 4893 } // namespace dart
4890 4894
4891 #undef __ 4895 #undef __
4892 4896
4893 #endif // defined TARGET_ARCH_IA32 4897 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698