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

Side by Side Diff: src/code-stubs.cc

Issue 2263253002: [interpreter] Make the binary op with Smi bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 4 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 | « src/code-stubs.h ('k') | src/compiler/bytecode-graph-builder.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 var_result.Bind(result); 902 var_result.Bind(result);
903 assembler->Goto(&end); 903 assembler->Goto(&end);
904 } 904 }
905 assembler->Bind(&end); 905 assembler->Bind(&end);
906 return var_result.value(); 906 return var_result.value();
907 } 907 }
908 908
909 // static 909 // static
910 compiler::Node* AddWithFeedbackStub::Generate( 910 compiler::Node* AddWithFeedbackStub::Generate(
911 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs, 911 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs,
912 compiler::Node* context, compiler::Node* type_feedback_vector, 912 compiler::Node* slot_id, compiler::Node* type_feedback_vector,
913 compiler::Node* slot_id) { 913 compiler::Node* context) {
914 typedef CodeStubAssembler::Label Label; 914 typedef CodeStubAssembler::Label Label;
915 typedef compiler::Node Node; 915 typedef compiler::Node Node;
916 typedef CodeStubAssembler::Variable Variable; 916 typedef CodeStubAssembler::Variable Variable;
917 917
918 // Shared entry for floating point addition. 918 // Shared entry for floating point addition.
919 Label do_fadd(assembler), end(assembler), 919 Label do_fadd(assembler), end(assembler),
920 call_add_stub(assembler, Label::kDeferred); 920 call_add_stub(assembler, Label::kDeferred);
921 Variable var_fadd_lhs(assembler, MachineRepresentation::kFloat64), 921 Variable var_fadd_lhs(assembler, MachineRepresentation::kFloat64),
922 var_fadd_rhs(assembler, MachineRepresentation::kFloat64), 922 var_fadd_rhs(assembler, MachineRepresentation::kFloat64),
923 var_type_feedback(assembler, MachineRepresentation::kWord32), 923 var_type_feedback(assembler, MachineRepresentation::kWord32),
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 var_result.Bind(assembler->ChangeFloat64ToTagged(value)); 1210 var_result.Bind(assembler->ChangeFloat64ToTagged(value));
1211 assembler->Goto(&end); 1211 assembler->Goto(&end);
1212 } 1212 }
1213 assembler->Bind(&end); 1213 assembler->Bind(&end);
1214 return var_result.value(); 1214 return var_result.value();
1215 } 1215 }
1216 1216
1217 // static 1217 // static
1218 compiler::Node* SubtractWithFeedbackStub::Generate( 1218 compiler::Node* SubtractWithFeedbackStub::Generate(
1219 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs, 1219 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs,
1220 compiler::Node* context, compiler::Node* type_feedback_vector, 1220 compiler::Node* slot_id, compiler::Node* type_feedback_vector,
1221 compiler::Node* slot_id) { 1221 compiler::Node* context) {
1222 typedef CodeStubAssembler::Label Label; 1222 typedef CodeStubAssembler::Label Label;
1223 typedef compiler::Node Node; 1223 typedef compiler::Node Node;
1224 typedef CodeStubAssembler::Variable Variable; 1224 typedef CodeStubAssembler::Variable Variable;
1225 1225
1226 // Shared entry for floating point subtraction. 1226 // Shared entry for floating point subtraction.
1227 Label do_fsub(assembler), end(assembler), 1227 Label do_fsub(assembler), end(assembler),
1228 call_subtract_stub(assembler, Label::kDeferred); 1228 call_subtract_stub(assembler, Label::kDeferred);
1229 Variable var_fsub_lhs(assembler, MachineRepresentation::kFloat64), 1229 Variable var_fsub_lhs(assembler, MachineRepresentation::kFloat64),
1230 var_fsub_rhs(assembler, MachineRepresentation::kFloat64), 1230 var_fsub_rhs(assembler, MachineRepresentation::kFloat64),
1231 var_type_feedback(assembler, MachineRepresentation::kWord32), 1231 var_type_feedback(assembler, MachineRepresentation::kWord32),
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 assembler->Goto(&return_result); 1499 assembler->Goto(&return_result);
1500 } 1500 }
1501 1501
1502 assembler->Bind(&return_result); 1502 assembler->Bind(&return_result);
1503 return var_result.value(); 1503 return var_result.value();
1504 } 1504 }
1505 1505
1506 // static 1506 // static
1507 compiler::Node* MultiplyWithFeedbackStub::Generate( 1507 compiler::Node* MultiplyWithFeedbackStub::Generate(
1508 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs, 1508 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs,
1509 compiler::Node* context, compiler::Node* type_feedback_vector, 1509 compiler::Node* slot_id, compiler::Node* type_feedback_vector,
1510 compiler::Node* slot_id) { 1510 compiler::Node* context) {
1511 using compiler::Node; 1511 using compiler::Node;
1512 typedef CodeStubAssembler::Label Label; 1512 typedef CodeStubAssembler::Label Label;
1513 typedef CodeStubAssembler::Variable Variable; 1513 typedef CodeStubAssembler::Variable Variable;
1514 1514
1515 // Shared entry point for floating point multiplication. 1515 // Shared entry point for floating point multiplication.
1516 Label do_fmul(assembler), end(assembler), 1516 Label do_fmul(assembler), end(assembler),
1517 call_multiply_stub(assembler, Label::kDeferred); 1517 call_multiply_stub(assembler, Label::kDeferred);
1518 Variable var_lhs_float64(assembler, MachineRepresentation::kFloat64), 1518 Variable var_lhs_float64(assembler, MachineRepresentation::kFloat64),
1519 var_rhs_float64(assembler, MachineRepresentation::kFloat64), 1519 var_rhs_float64(assembler, MachineRepresentation::kFloat64),
1520 var_result(assembler, MachineRepresentation::kTagged), 1520 var_result(assembler, MachineRepresentation::kTagged),
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 var_result.Bind(assembler->ChangeFloat64ToTagged(value)); 1834 var_result.Bind(assembler->ChangeFloat64ToTagged(value));
1835 assembler->Goto(&end); 1835 assembler->Goto(&end);
1836 } 1836 }
1837 assembler->Bind(&end); 1837 assembler->Bind(&end);
1838 return var_result.value(); 1838 return var_result.value();
1839 } 1839 }
1840 1840
1841 // static 1841 // static
1842 compiler::Node* DivideWithFeedbackStub::Generate( 1842 compiler::Node* DivideWithFeedbackStub::Generate(
1843 CodeStubAssembler* assembler, compiler::Node* dividend, 1843 CodeStubAssembler* assembler, compiler::Node* dividend,
1844 compiler::Node* divisor, compiler::Node* context, 1844 compiler::Node* divisor, compiler::Node* slot_id,
1845 compiler::Node* type_feedback_vector, compiler::Node* slot_id) { 1845 compiler::Node* type_feedback_vector, compiler::Node* context) {
1846 using compiler::Node; 1846 using compiler::Node;
1847 typedef CodeStubAssembler::Label Label; 1847 typedef CodeStubAssembler::Label Label;
1848 typedef CodeStubAssembler::Variable Variable; 1848 typedef CodeStubAssembler::Variable Variable;
1849 1849
1850 // Shared entry point for floating point division. 1850 // Shared entry point for floating point division.
1851 Label do_fdiv(assembler), end(assembler), call_divide_stub(assembler); 1851 Label do_fdiv(assembler), end(assembler), call_divide_stub(assembler);
1852 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64), 1852 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64),
1853 var_divisor_float64(assembler, MachineRepresentation::kFloat64), 1853 var_divisor_float64(assembler, MachineRepresentation::kFloat64),
1854 var_result(assembler, MachineRepresentation::kTagged), 1854 var_result(assembler, MachineRepresentation::kTagged),
1855 var_type_feedback(assembler, MachineRepresentation::kWord32); 1855 var_type_feedback(assembler, MachineRepresentation::kWord32);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 assembler->Goto(&return_result); 2169 assembler->Goto(&return_result);
2170 } 2170 }
2171 2171
2172 assembler->Bind(&return_result); 2172 assembler->Bind(&return_result);
2173 return var_result.value(); 2173 return var_result.value();
2174 } 2174 }
2175 2175
2176 // static 2176 // static
2177 compiler::Node* ModulusWithFeedbackStub::Generate( 2177 compiler::Node* ModulusWithFeedbackStub::Generate(
2178 CodeStubAssembler* assembler, compiler::Node* dividend, 2178 CodeStubAssembler* assembler, compiler::Node* dividend,
2179 compiler::Node* divisor, compiler::Node* context, 2179 compiler::Node* divisor, compiler::Node* slot_id,
2180 compiler::Node* type_feedback_vector, compiler::Node* slot_id) { 2180 compiler::Node* type_feedback_vector, compiler::Node* context) {
2181 using compiler::Node; 2181 using compiler::Node;
2182 typedef CodeStubAssembler::Label Label; 2182 typedef CodeStubAssembler::Label Label;
2183 typedef CodeStubAssembler::Variable Variable; 2183 typedef CodeStubAssembler::Variable Variable;
2184 2184
2185 // Shared entry point for floating point division. 2185 // Shared entry point for floating point division.
2186 Label do_fmod(assembler), end(assembler), call_modulus_stub(assembler); 2186 Label do_fmod(assembler), end(assembler), call_modulus_stub(assembler);
2187 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64), 2187 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64),
2188 var_divisor_float64(assembler, MachineRepresentation::kFloat64), 2188 var_divisor_float64(assembler, MachineRepresentation::kFloat64),
2189 var_result(assembler, MachineRepresentation::kTagged), 2189 var_result(assembler, MachineRepresentation::kTagged),
2190 var_type_feedback(assembler, MachineRepresentation::kWord32); 2190 var_type_feedback(assembler, MachineRepresentation::kWord32);
(...skipping 3658 matching lines...) Expand 10 before | Expand all | Expand 10 after
5849 if (type->Is(Type::UntaggedPointer())) { 5849 if (type->Is(Type::UntaggedPointer())) {
5850 return Representation::External(); 5850 return Representation::External();
5851 } 5851 }
5852 5852
5853 DCHECK(!type->Is(Type::Untagged())); 5853 DCHECK(!type->Is(Type::Untagged()));
5854 return Representation::Tagged(); 5854 return Representation::Tagged();
5855 } 5855 }
5856 5856
5857 } // namespace internal 5857 } // namespace internal
5858 } // namespace v8 5858 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/bytecode-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698