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

Side by Side Diff: src/serialize.cc

Issue 119036: * Modify simulator and ARM code generator to avoid swi... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 months 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 444
445 ExternalReferenceTable* ExternalReferenceTable::instance_ = NULL; 445 ExternalReferenceTable* ExternalReferenceTable::instance_ = NULL;
446 446
447 447
448 void ExternalReferenceTable::AddFromId(TypeCode type, 448 void ExternalReferenceTable::AddFromId(TypeCode type,
449 uint16_t id, 449 uint16_t id,
450 const char* name) { 450 const char* name) {
451 Address address; 451 Address address;
452 switch (type) { 452 switch (type) {
453 case C_BUILTIN: 453 case C_BUILTIN: {
454 address = Builtins::c_function_address( 454 ExternalReference ref(static_cast<Builtins::CFunctionId>(id));
455 static_cast<Builtins::CFunctionId>(id)); 455 address = ref.address();
456 break; 456 break;
457 case BUILTIN: 457 }
458 address = Builtins::builtin_address(static_cast<Builtins::Name>(id)); 458 case BUILTIN: {
459 ExternalReference ref(static_cast<Builtins::Name>(id));
460 address = ref.address();
459 break; 461 break;
460 case RUNTIME_FUNCTION: 462 }
461 address = Runtime::FunctionForId( 463 case RUNTIME_FUNCTION: {
462 static_cast<Runtime::FunctionId>(id))->entry; 464 ExternalReference ref(static_cast<Runtime::FunctionId>(id));
465 address = ref.address();
463 break; 466 break;
464 case IC_UTILITY: 467 }
465 address = IC::AddressFromUtilityId(static_cast<IC::UtilityId>(id)); 468 case IC_UTILITY: {
469 ExternalReference ref(IC_Utility(static_cast<IC::UtilityId>(id)));
470 address = ref.address();
466 break; 471 break;
472 }
467 default: 473 default:
468 UNREACHABLE(); 474 UNREACHABLE();
469 return; 475 return;
470 } 476 }
471 Add(address, type, id, name); 477 Add(address, type, id, name);
472 } 478 }
473 479
474 480
475 void ExternalReferenceTable::Add(Address address, 481 void ExternalReferenceTable::Add(Address address,
476 TypeCode type, 482 TypeCode type,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 Add(SCTableReference::keyReference(StubCache::kSecondary).address(), 641 Add(SCTableReference::keyReference(StubCache::kSecondary).address(),
636 STUB_CACHE_TABLE, 642 STUB_CACHE_TABLE,
637 3, 643 3,
638 "StubCache::secondary_->key"); 644 "StubCache::secondary_->key");
639 Add(SCTableReference::valueReference(StubCache::kSecondary).address(), 645 Add(SCTableReference::valueReference(StubCache::kSecondary).address(),
640 STUB_CACHE_TABLE, 646 STUB_CACHE_TABLE,
641 4, 647 4,
642 "StubCache::secondary_->value"); 648 "StubCache::secondary_->value");
643 649
644 // Runtime entries 650 // Runtime entries
645 Add(FUNCTION_ADDR(Runtime::PerformGC), 651 Add(ExternalReference::perform_gc_function().address(),
646 RUNTIME_ENTRY, 652 RUNTIME_ENTRY,
647 1, 653 1,
648 "Runtime::PerformGC"); 654 "Runtime::PerformGC");
649 655
650 // Miscellaneous 656 // Miscellaneous
651 Add(ExternalReference::builtin_passed_function().address(), 657 Add(ExternalReference::builtin_passed_function().address(),
652 UNCLASSIFIED, 658 UNCLASSIFIED,
653 1, 659 1,
654 "Builtins::builtin_passed_function"); 660 "Builtins::builtin_passed_function");
655 Add(ExternalReference::the_hole_value_location().address(), 661 Add(ExternalReference::the_hole_value_location().address(),
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 ASSERT(index < large_objects_.length()); 1619 ASSERT(index < large_objects_.length());
1614 } 1620 }
1615 return large_objects_[index]; // s.page_offset() is ignored. 1621 return large_objects_[index]; // s.page_offset() is ignored.
1616 } 1622 }
1617 UNREACHABLE(); 1623 UNREACHABLE();
1618 return NULL; 1624 return NULL;
1619 } 1625 }
1620 1626
1621 1627
1622 } } // namespace v8::internal 1628 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698