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

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

Issue 735543003: Range feedback for binary integer operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years 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/intermediate_language.h ('k') | runtime/vm/object.h » ('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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 13 matching lines...) Expand all
24 #include "vm/symbols.h" 24 #include "vm/symbols.h"
25 25
26 #include "vm/il_printer.h" 26 #include "vm/il_printer.h"
27 27
28 namespace dart { 28 namespace dart {
29 29
30 DEFINE_FLAG(bool, propagate_ic_data, true, 30 DEFINE_FLAG(bool, propagate_ic_data, true,
31 "Propagate IC data from unoptimized to optimized IC calls."); 31 "Propagate IC data from unoptimized to optimized IC calls.");
32 DEFINE_FLAG(bool, two_args_smi_icd, true, 32 DEFINE_FLAG(bool, two_args_smi_icd, true,
33 "Generate special IC stubs for two args Smi operations"); 33 "Generate special IC stubs for two args Smi operations");
34 DEFINE_FLAG(bool, ic_range_profiling, true,
35 "Generate special IC stubs collecting range information "
36 "for binary and unary arithmetic operations");
34 DEFINE_FLAG(bool, unbox_numeric_fields, true, 37 DEFINE_FLAG(bool, unbox_numeric_fields, true,
35 "Support unboxed double and float32x4 fields."); 38 "Support unboxed double and float32x4 fields.");
36 DECLARE_FLAG(bool, enable_type_checks); 39 DECLARE_FLAG(bool, enable_type_checks);
37 DECLARE_FLAG(bool, eliminate_type_checks); 40 DECLARE_FLAG(bool, eliminate_type_checks);
38 DECLARE_FLAG(bool, trace_optimization); 41 DECLARE_FLAG(bool, trace_optimization);
39 DECLARE_FLAG(bool, trace_constant_propagation); 42 DECLARE_FLAG(bool, trace_constant_propagation);
40 DECLARE_FLAG(bool, throw_on_javascript_int_overflow); 43 DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
41 44
42 Definition::Definition(intptr_t deopt_id) 45 Definition::Definition(intptr_t deopt_id)
43 : Instruction(deopt_id), 46 : Instruction(deopt_id),
(...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 (class_ids[0] == kSmiCid) && (class_ids[1] == kSmiCid)) { 2882 (class_ids[0] == kSmiCid) && (class_ids[1] == kSmiCid)) {
2880 is_smi_two_args_op = true; 2883 is_smi_two_args_op = true;
2881 } 2884 }
2882 } 2885 }
2883 } 2886 }
2884 if (is_smi_two_args_op) { 2887 if (is_smi_two_args_op) {
2885 ASSERT(ArgumentCount() == 2); 2888 ASSERT(ArgumentCount() == 2);
2886 ExternalLabel target_label(label_address); 2889 ExternalLabel target_label(label_address);
2887 compiler->EmitInstanceCall(&target_label, *call_ic_data, ArgumentCount(), 2890 compiler->EmitInstanceCall(&target_label, *call_ic_data, ArgumentCount(),
2888 deopt_id(), token_pos(), locs()); 2891 deopt_id(), token_pos(), locs());
2892 } else if (FLAG_ic_range_profiling &&
2893 (Token::IsBinaryArithmeticOperator(token_kind()) ||
2894 Token::IsUnaryArithmeticOperator(token_kind()))) {
2895 ASSERT(Token::IsUnaryArithmeticOperator(token_kind()) ==
2896 (ArgumentCount() == 1));
2897 ASSERT(Token::IsBinaryArithmeticOperator(token_kind()) ==
2898 (ArgumentCount() == 2));
2899 StubCode* stub_code = isolate->stub_code();
2900 ExternalLabel target_label((ArgumentCount() == 1) ?
2901 stub_code->UnaryRangeCollectingInlineCacheEntryPoint() :
2902 stub_code->BinaryRangeCollectingInlineCacheEntryPoint());
2903 compiler->EmitInstanceCall(&target_label, *call_ic_data, ArgumentCount(),
2904 deopt_id(), token_pos(), locs());
2889 } else { 2905 } else {
2890 compiler->GenerateInstanceCall(deopt_id(), 2906 compiler->GenerateInstanceCall(deopt_id(),
2891 token_pos(), 2907 token_pos(),
2892 ArgumentCount(), 2908 ArgumentCount(),
2893 locs(), 2909 locs(),
2894 *call_ic_data); 2910 *call_ic_data);
2895 } 2911 }
2896 } 2912 }
2897 } 2913 }
2898 2914
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 case Token::kTRUNCDIV: return 0; 3486 case Token::kTRUNCDIV: return 0;
3471 case Token::kMOD: return 1; 3487 case Token::kMOD: return 1;
3472 default: UNIMPLEMENTED(); return -1; 3488 default: UNIMPLEMENTED(); return -1;
3473 } 3489 }
3474 } 3490 }
3475 3491
3476 3492
3477 #undef __ 3493 #undef __
3478 3494
3479 } // namespace dart 3495 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698