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

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

Issue 214593005: Revert "Clean up runtime functions for Maths." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/code-stubs-arm64.cc ('k') | src/harmony-math.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after
3485 ASSERT_EQ(2, args->length()); 3485 ASSERT_EQ(2, args->length());
3486 VisitForStackValue(args->at(0)); 3486 VisitForStackValue(args->at(0));
3487 VisitForStackValue(args->at(1)); 3487 VisitForStackValue(args->at(1));
3488 3488
3489 StringCompareStub stub; 3489 StringCompareStub stub;
3490 __ CallStub(&stub); 3490 __ CallStub(&stub);
3491 context()->Plug(x0); 3491 context()->Plug(x0);
3492 } 3492 }
3493 3493
3494 3494
3495 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
3496 // Load the argument on the stack and call the runtime function.
3497 ZoneList<Expression*>* args = expr->arguments();
3498 ASSERT(args->length() == 1);
3499 VisitForStackValue(args->at(0));
3500 __ CallRuntime(Runtime::kMath_log, 1);
3501 context()->Plug(x0);
3502 }
3503
3504
3505 void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) {
3506 // Load the argument on the stack and call the runtime function.
3507 ZoneList<Expression*>* args = expr->arguments();
3508 ASSERT(args->length() == 1);
3509 VisitForStackValue(args->at(0));
3510 __ CallRuntime(Runtime::kMath_sqrt, 1);
3511 context()->Plug(x0);
3512 }
3513
3514
3495 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { 3515 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
3496 ASM_LOCATION("FullCodeGenerator::EmitCallFunction"); 3516 ASM_LOCATION("FullCodeGenerator::EmitCallFunction");
3497 ZoneList<Expression*>* args = expr->arguments(); 3517 ZoneList<Expression*>* args = expr->arguments();
3498 ASSERT(args->length() >= 2); 3518 ASSERT(args->length() >= 2);
3499 3519
3500 int arg_count = args->length() - 2; // 2 ~ receiver and function. 3520 int arg_count = args->length() - 2; // 2 ~ receiver and function.
3501 for (int i = 0; i < arg_count + 1; i++) { 3521 for (int i = 0; i < arg_count + 1; i++) {
3502 VisitForStackValue(args->at(i)); 3522 VisitForStackValue(args->at(i));
3503 } 3523 }
3504 VisitForAccumulatorValue(args->last()); // Function. 3524 VisitForAccumulatorValue(args->last()); // Function.
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
4986 return previous_; 5006 return previous_;
4987 } 5007 }
4988 5008
4989 5009
4990 #undef __ 5010 #undef __
4991 5011
4992 5012
4993 } } // namespace v8::internal 5013 } } // namespace v8::internal
4994 5014
4995 #endif // V8_TARGET_ARCH_ARM64 5015 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/harmony-math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698