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

Side by Side Diff: src/code-stubs.cc

Issue 106453003: Allocation site support for monomorphic StringAdds in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 7 years 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 240
241 // static 241 // static
242 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate, 242 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate,
243 const BinaryOpIC::State& state) { 243 const BinaryOpIC::State& state) {
244 BinaryOpICStub stub(state); 244 BinaryOpICStub stub(state);
245 stub.GetCode(isolate); 245 stub.GetCode(isolate);
246 } 246 }
247 247
248 248
249 // static
250 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
251 // Generate special versions of the stub.
252 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
253 }
254
255
256 void BinaryOpICWithAllocationSiteStub::PrintState(StringStream* stream) {
257 state_.Print(stream);
258 }
259
260
261 // static
262 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(
263 Isolate* isolate, const BinaryOpIC::State& state) {
264 if (state.CouldCreateAllocationMementos()) {
265 BinaryOpICWithAllocationSiteStub stub(state);
266 stub.GetCode(isolate);
267 }
268 }
269
270
249 void NewStringAddStub::PrintBaseName(StringStream* stream) { 271 void NewStringAddStub::PrintBaseName(StringStream* stream) {
250 stream->Add("NewStringAddStub"); 272 stream->Add("NewStringAddStub");
251 if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) { 273 if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
252 stream->Add("_CheckBoth"); 274 stream->Add("_CheckBoth");
253 } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) { 275 } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
254 stream->Add("_CheckLeft"); 276 stream->Add("_CheckLeft");
255 } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) { 277 } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
256 stream->Add("_CheckRight"); 278 stream->Add("_CheckRight");
257 } 279 }
258 if (pretenure_flag() == TENURED) { 280 if (pretenure_flag() == TENURED) {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 InstallDescriptor(isolate, &stub3); 784 InstallDescriptor(isolate, &stub3);
763 } 785 }
764 786
765 InternalArrayConstructorStub::InternalArrayConstructorStub( 787 InternalArrayConstructorStub::InternalArrayConstructorStub(
766 Isolate* isolate) { 788 Isolate* isolate) {
767 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 789 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
768 } 790 }
769 791
770 792
771 } } // namespace v8::internal 793 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698