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

Side by Side Diff: src/full-codegen.cc

Issue 209353006: Refactor optimized in hydrogen only runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing + rebase Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 ASSERT(args->length() == 2); 945 ASSERT(args->length() == 2);
946 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW); 946 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW);
947 } 947 }
948 948
949 949
950 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) { 950 void FullCodeGenerator::EmitDebugBreakInOptimizedCode(CallRuntime* expr) {
951 context()->Plug(handle(Smi::FromInt(0), isolate())); 951 context()->Plug(handle(Smi::FromInt(0), isolate()));
952 } 952 }
953 953
954 954
955 void FullCodeGenerator::EmitDoubleHi(CallRuntime* expr) {
956 ZoneList<Expression*>* args = expr->arguments();
957 ASSERT(args->length() == 1);
958 VisitForStackValue(args->at(0));
959 masm()->CallRuntime(Runtime::kDoubleHi, 1);
960 context()->Plug(result_register());
961 }
962
963
964 void FullCodeGenerator::EmitDoubleLo(CallRuntime* expr) {
965 ZoneList<Expression*>* args = expr->arguments();
966 ASSERT(args->length() == 1);
967 VisitForStackValue(args->at(0));
968 masm()->CallRuntime(Runtime::kDoubleLo, 1);
969 context()->Plug(result_register());
970 }
971
972
973 void FullCodeGenerator::EmitConstructDouble(CallRuntime* expr) {
974 ZoneList<Expression*>* args = expr->arguments();
975 ASSERT(args->length() == 2);
976 VisitForStackValue(args->at(0));
977 VisitForStackValue(args->at(1));
978 masm()->CallRuntime(Runtime::kConstructDouble, 2);
979 context()->Plug(result_register());
980 }
981
982
983 void FullCodeGenerator::EmitTypedArrayInitialize(CallRuntime* expr) {
984 ZoneList<Expression*>* args = expr->arguments();
985 ASSERT(args->length() == 5);
986 for (int i = 0; i < 5; i++) VisitForStackValue(args->at(i));
987 masm()->CallRuntime(Runtime::kTypedArrayInitialize, 5);
988 context()->Plug(result_register());
989 }
990
991
992 void FullCodeGenerator::EmitDataViewInitialize(CallRuntime* expr) {
993 ZoneList<Expression*>* args = expr->arguments();
994 ASSERT(args->length() == 4);
995 for (int i = 0; i < 4; i++) VisitForStackValue(args->at(i));
996 masm()->CallRuntime(Runtime::kDataViewInitialize, 4);
997 context()->Plug(result_register());
998 }
999
1000
1001 void FullCodeGenerator::EmitMaxSmi(CallRuntime* expr) {
1002 ASSERT(expr->arguments()->length() == 0);
1003 masm()->CallRuntime(Runtime::kMaxSmi, 0);
1004 context()->Plug(result_register());
1005 }
1006
1007
1008 void FullCodeGenerator::EmitTypedArrayMaxSizeInHeap(CallRuntime* expr) {
1009 ASSERT(expr->arguments()->length() == 0);
1010 masm()->CallRuntime(Runtime::kTypedArrayMaxSizeInHeap, 0);
1011 context()->Plug(result_register());
1012 }
1013
1014
1015 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { 955 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) {
1016 switch (expr->op()) { 956 switch (expr->op()) {
1017 case Token::COMMA: 957 case Token::COMMA:
1018 return VisitComma(expr); 958 return VisitComma(expr);
1019 case Token::OR: 959 case Token::OR:
1020 case Token::AND: 960 case Token::AND:
1021 return VisitLogicalExpression(expr); 961 return VisitLogicalExpression(expr);
1022 default: 962 default:
1023 return VisitArithmeticExpression(expr); 963 return VisitArithmeticExpression(expr);
1024 } 964 }
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 } 1730 }
1791 return true; 1731 return true;
1792 } 1732 }
1793 #endif // DEBUG 1733 #endif // DEBUG
1794 1734
1795 1735
1796 #undef __ 1736 #undef __
1797 1737
1798 1738
1799 } } // namespace v8::internal 1739 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698