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

Side by Side Diff: src/codegen.cc

Issue 4456002: Direct call 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 int CEntryStub::MinorKey() { 475 int CEntryStub::MinorKey() {
476 ASSERT(result_size_ == 1 || result_size_ == 2); 476 ASSERT(result_size_ == 1 || result_size_ == 2);
477 #ifdef _WIN64 477 #ifdef _WIN64
478 return result_size_ == 1 ? 0 : 1; 478 return result_size_ == 1 ? 0 : 1;
479 #else 479 #else
480 return 0; 480 return 0;
481 #endif 481 #endif
482 } 482 }
483 483
484 484
485 bool ApiGetterEntryStub::GetCustomCache(Code** code_out) { 485 // Implementation of CodeStub::GetCustomCache.
486 Object* cache = info()->load_stub_cache(); 486 static bool GetCustomCacheHelper(Object* cache, Code** code_out) {
487 if (cache->IsUndefined()) { 487 if (cache->IsUndefined()) {
488 return false; 488 return false;
489 } else { 489 } else {
490 *code_out = Code::cast(cache); 490 *code_out = Code::cast(cache);
491 return true; 491 return true;
492 } 492 }
493 } 493 }
494 494
495 495
496 bool ApiGetterEntryStub::GetCustomCache(Code** code_out) {
497 return GetCustomCacheHelper(info()->load_stub_cache(), code_out);
498 }
499
500
496 void ApiGetterEntryStub::SetCustomCache(Code* value) { 501 void ApiGetterEntryStub::SetCustomCache(Code* value) {
497 info()->set_load_stub_cache(value); 502 info()->set_load_stub_cache(value);
498 } 503 }
499 504
500 505
506 bool ApiCallEntryStub::GetCustomCache(Code** code_out) {
507 return GetCustomCacheHelper(info()->call_stub_cache(), code_out);
508 }
509
510
511 void ApiCallEntryStub::SetCustomCache(Code* value) {
512 info()->set_call_stub_cache(value);
513 }
514
515
501 } } // namespace v8::internal 516 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/assembler-ia32.h » ('j') | src/ia32/stub-cache-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698