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

Side by Side Diff: src/code-stubs.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/code-stubs.h ('k') | src/code-stubs-hydrogen.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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 handle(Type::String(), isolate)), isolate); 675 handle(Type::String(), isolate)), isolate);
676 } 676 }
677 ASSERT(result_state_ != GENERIC); 677 ASSERT(result_state_ != GENERIC);
678 if (result_state_ == NUMBER && op_ == Token::SHR) { 678 if (result_state_ == NUMBER && op_ == Token::SHR) {
679 return handle(Type::Unsigned32(), isolate); 679 return handle(Type::Unsigned32(), isolate);
680 } 680 }
681 return StateToType(result_state_, isolate); 681 return StateToType(result_state_, isolate);
682 } 682 }
683 683
684 684
685 void NewStringAddStub::PrintBaseName(StringStream* stream) {
686 stream->Add("NewStringAddStub");
687 if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
688 stream->Add("_CheckBoth");
689 } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
690 stream->Add("_CheckLeft");
691 } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
692 stream->Add("_CheckRight");
693 }
694 if (pretenure_flag() == TENURED) {
695 stream->Add("_Tenured");
696 }
697 }
698
699
685 InlineCacheState ICCompareStub::GetICState() { 700 InlineCacheState ICCompareStub::GetICState() {
686 CompareIC::State state = Max(left_, right_); 701 CompareIC::State state = Max(left_, right_);
687 switch (state) { 702 switch (state) {
688 case CompareIC::UNINITIALIZED: 703 case CompareIC::UNINITIALIZED:
689 return ::v8::internal::UNINITIALIZED; 704 return ::v8::internal::UNINITIALIZED;
690 case CompareIC::SMI: 705 case CompareIC::SMI:
691 case CompareIC::NUMBER: 706 case CompareIC::NUMBER:
692 case CompareIC::INTERNALIZED_STRING: 707 case CompareIC::INTERNALIZED_STRING:
693 case CompareIC::STRING: 708 case CompareIC::STRING:
694 case CompareIC::UNIQUE_NAME: 709 case CompareIC::UNIQUE_NAME:
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 InstallDescriptor(isolate, &stub); 1142 InstallDescriptor(isolate, &stub);
1128 } 1143 }
1129 1144
1130 1145
1131 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) { 1146 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) {
1132 FastNewClosureStub stub(STRICT_MODE, false); 1147 FastNewClosureStub stub(STRICT_MODE, false);
1133 InstallDescriptor(isolate, &stub); 1148 InstallDescriptor(isolate, &stub);
1134 } 1149 }
1135 1150
1136 1151
1152 // static
1153 void NewStringAddStub::InstallDescriptors(Isolate* isolate) {
1154 NewStringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED);
1155 InstallDescriptor(isolate, &stub);
1156 }
1157
1158
1137 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) 1159 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
1138 : argument_count_(ANY) { 1160 : argument_count_(ANY) {
1139 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1161 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1140 } 1162 }
1141 1163
1142 1164
1143 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate, 1165 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate,
1144 int argument_count) { 1166 int argument_count) {
1145 if (argument_count == 0) { 1167 if (argument_count == 0) {
1146 argument_count_ = NONE; 1168 argument_count_ = NONE;
(...skipping 17 matching lines...) Expand all
1164 InstallDescriptor(isolate, &stub3); 1186 InstallDescriptor(isolate, &stub3);
1165 } 1187 }
1166 1188
1167 InternalArrayConstructorStub::InternalArrayConstructorStub( 1189 InternalArrayConstructorStub::InternalArrayConstructorStub(
1168 Isolate* isolate) { 1190 Isolate* isolate) {
1169 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1191 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1170 } 1192 }
1171 1193
1172 1194
1173 } } // namespace v8::internal 1195 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698