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

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

Issue 61893009: Add initial hydrogenized NewStringAddStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case for --new-string-add. 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
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('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 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 3621
3622 __ bind(&done); 3622 __ bind(&done);
3623 context()->Plug(result); 3623 context()->Plug(result);
3624 } 3624 }
3625 3625
3626 3626
3627 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { 3627 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
3628 ZoneList<Expression*>* args = expr->arguments(); 3628 ZoneList<Expression*>* args = expr->arguments();
3629 ASSERT_EQ(2, args->length()); 3629 ASSERT_EQ(2, args->length());
3630 3630
3631 VisitForStackValue(args->at(0)); 3631 if (FLAG_new_string_add) {
3632 VisitForStackValue(args->at(1)); 3632 VisitForStackValue(args->at(0));
3633 VisitForAccumulatorValue(args->at(1));
3633 3634
3634 StringAddStub stub(STRING_ADD_CHECK_BOTH); 3635 __ pop(rdx);
3635 __ CallStub(&stub); 3636 NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED);
3637 __ CallStub(&stub);
3638 } else {
3639 VisitForStackValue(args->at(0));
3640 VisitForStackValue(args->at(1));
3641
3642 StringAddStub stub(STRING_ADD_CHECK_BOTH);
3643 __ CallStub(&stub);
3644 }
3636 context()->Plug(rax); 3645 context()->Plug(rax);
3637 } 3646 }
3638 3647
3639 3648
3640 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { 3649 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) {
3641 ZoneList<Expression*>* args = expr->arguments(); 3650 ZoneList<Expression*>* args = expr->arguments();
3642 ASSERT_EQ(2, args->length()); 3651 ASSERT_EQ(2, args->length());
3643 3652
3644 VisitForStackValue(args->at(0)); 3653 VisitForStackValue(args->at(0));
3645 VisitForStackValue(args->at(1)); 3654 VisitForStackValue(args->at(1));
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
4951 4960
4952 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4961 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4953 Assembler::target_address_at(call_target_address)); 4962 Assembler::target_address_at(call_target_address));
4954 return OSR_AFTER_STACK_CHECK; 4963 return OSR_AFTER_STACK_CHECK;
4955 } 4964 }
4956 4965
4957 4966
4958 } } // namespace v8::internal 4967 } } // namespace v8::internal
4959 4968
4960 #endif // V8_TARGET_ARCH_X64 4969 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698