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

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

Powered by Google App Engine
This is Rietveld 408576698