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

Side by Side Diff: src/arm/full-codegen-arm.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/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.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 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3698 generator.GenerateSlow(masm_, call_helper); 3698 generator.GenerateSlow(masm_, call_helper);
3699 3699
3700 __ bind(&done); 3700 __ bind(&done);
3701 context()->Plug(result); 3701 context()->Plug(result);
3702 } 3702 }
3703 3703
3704 3704
3705 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { 3705 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
3706 ZoneList<Expression*>* args = expr->arguments(); 3706 ZoneList<Expression*>* args = expr->arguments();
3707 ASSERT_EQ(2, args->length()); 3707 ASSERT_EQ(2, args->length());
3708 VisitForStackValue(args->at(0));
3709 VisitForStackValue(args->at(1));
3710 3708
3711 StringAddStub stub(STRING_ADD_CHECK_BOTH); 3709 if (FLAG_new_string_add) {
3712 __ CallStub(&stub); 3710 VisitForStackValue(args->at(0));
3711 VisitForAccumulatorValue(args->at(1));
3712
3713 __ pop(r1);
3714 NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED);
3715 __ CallStub(&stub);
3716 } else {
3717 VisitForStackValue(args->at(0));
3718 VisitForStackValue(args->at(1));
3719
3720 StringAddStub stub(STRING_ADD_CHECK_BOTH);
3721 __ CallStub(&stub);
3722 }
3713 context()->Plug(r0); 3723 context()->Plug(r0);
3714 } 3724 }
3715 3725
3716 3726
3717 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { 3727 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) {
3718 ZoneList<Expression*>* args = expr->arguments(); 3728 ZoneList<Expression*>* args = expr->arguments();
3719 ASSERT_EQ(2, args->length()); 3729 ASSERT_EQ(2, args->length());
3720 VisitForStackValue(args->at(0)); 3730 VisitForStackValue(args->at(0));
3721 VisitForStackValue(args->at(1)); 3731 VisitForStackValue(args->at(1));
3722 3732
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4988 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4979 reinterpret_cast<uint32_t>( 4989 reinterpret_cast<uint32_t>(
4980 isolate->builtins()->OsrAfterStackCheck()->entry())); 4990 isolate->builtins()->OsrAfterStackCheck()->entry()));
4981 return OSR_AFTER_STACK_CHECK; 4991 return OSR_AFTER_STACK_CHECK;
4982 } 4992 }
4983 4993
4984 4994
4985 } } // namespace v8::internal 4995 } } // namespace v8::internal
4986 4996
4987 #endif // V8_TARGET_ARCH_ARM 4997 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698