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

Side by Side Diff: src/codegen.cc

Issue 4695003: Removing redundant stubs for API functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 int CEntryStub::MinorKey() { 442 int CEntryStub::MinorKey() {
443 ASSERT(result_size_ == 1 || result_size_ == 2); 443 ASSERT(result_size_ == 1 || result_size_ == 2);
444 #ifdef _WIN64 444 #ifdef _WIN64
445 return result_size_ == 1 ? 0 : 1; 445 return result_size_ == 1 ? 0 : 1;
446 #else 446 #else
447 return 0; 447 return 0;
448 #endif 448 #endif
449 } 449 }
450 450
451 451
452 // Implementation of CodeStub::GetCustomCache.
453 static bool GetCustomCacheHelper(Object* cache, Code** code_out) {
454 if (cache->IsUndefined()) {
455 return false;
456 } else {
457 *code_out = Code::cast(cache);
458 return true;
459 }
460 }
461
462
463 bool ApiGetterEntryStub::GetCustomCache(Code** code_out) {
464 return GetCustomCacheHelper(info()->load_stub_cache(), code_out);
465 }
466
467
468 void ApiGetterEntryStub::SetCustomCache(Code* value) {
469 info()->set_load_stub_cache(value);
470 }
471
472
473 bool ApiCallEntryStub::GetCustomCache(Code** code_out) {
474 return GetCustomCacheHelper(info()->call_stub_cache(), code_out);
475 }
476
477
478 void ApiCallEntryStub::SetCustomCache(Code* value) {
479 info()->set_call_stub_cache(value);
480 }
481
482
483 } } // namespace v8::internal 452 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698