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

Side by Side Diff: src/serialize.cc

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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
« no previous file with comments | « src/serialize.h ('k') | src/smart-pointers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 #ifdef ENABLE_DEBUGGER_SUPPORT 371 #ifdef ENABLE_DEBUGGER_SUPPORT
372 Add(ExternalReference::debug_break(isolate).address(), 372 Add(ExternalReference::debug_break(isolate).address(),
373 UNCLASSIFIED, 373 UNCLASSIFIED,
374 16, 374 16,
375 "Debug::Break()"); 375 "Debug::Break()");
376 Add(ExternalReference::debug_step_in_fp_address(isolate).address(), 376 Add(ExternalReference::debug_step_in_fp_address(isolate).address(),
377 UNCLASSIFIED, 377 UNCLASSIFIED,
378 17, 378 17,
379 "Debug::step_in_fp_addr()"); 379 "Debug::step_in_fp_addr()");
380 #endif 380 #endif
381 Add(ExternalReference::double_fp_operation(Token::ADD, isolate).address(), 381 Add(ExternalReference::mod_two_doubles_operation(isolate).address(),
382 UNCLASSIFIED,
383 18,
384 "add_two_doubles");
385 Add(ExternalReference::double_fp_operation(Token::SUB, isolate).address(),
386 UNCLASSIFIED,
387 19,
388 "sub_two_doubles");
389 Add(ExternalReference::double_fp_operation(Token::MUL, isolate).address(),
390 UNCLASSIFIED,
391 20,
392 "mul_two_doubles");
393 Add(ExternalReference::double_fp_operation(Token::DIV, isolate).address(),
394 UNCLASSIFIED,
395 21,
396 "div_two_doubles");
397 Add(ExternalReference::double_fp_operation(Token::MOD, isolate).address(),
398 UNCLASSIFIED, 382 UNCLASSIFIED,
399 22, 383 22,
400 "mod_two_doubles"); 384 "mod_two_doubles");
401 Add(ExternalReference::compare_doubles(isolate).address(),
402 UNCLASSIFIED,
403 23,
404 "compare_doubles");
405 #ifndef V8_INTERPRETED_REGEXP 385 #ifndef V8_INTERPRETED_REGEXP
406 Add(ExternalReference::re_case_insensitive_compare_uc16(isolate).address(), 386 Add(ExternalReference::re_case_insensitive_compare_uc16(isolate).address(),
407 UNCLASSIFIED, 387 UNCLASSIFIED,
408 24, 388 24,
409 "NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()"); 389 "NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()");
410 Add(ExternalReference::re_check_stack_guard_state(isolate).address(), 390 Add(ExternalReference::re_check_stack_guard_state(isolate).address(),
411 UNCLASSIFIED, 391 UNCLASSIFIED,
412 25, 392 25,
413 "RegExpMacroAssembler*::CheckStackGuardState()"); 393 "RegExpMacroAssembler*::CheckStackGuardState()");
414 Add(ExternalReference::re_grow_stack(isolate).address(), 394 Add(ExternalReference::re_grow_stack(isolate).address(),
415 UNCLASSIFIED, 395 UNCLASSIFIED,
416 26, 396 26,
417 "NativeRegExpMacroAssembler::GrowStack()"); 397 "NativeRegExpMacroAssembler::GrowStack()");
418 Add(ExternalReference::re_word_character_map().address(), 398 Add(ExternalReference::re_word_character_map().address(),
419 UNCLASSIFIED, 399 UNCLASSIFIED,
420 27, 400 27,
421 "NativeRegExpMacroAssembler::word_character_map"); 401 "NativeRegExpMacroAssembler::word_character_map");
422 #endif // V8_INTERPRETED_REGEXP 402 #endif // V8_INTERPRETED_REGEXP
423 // Keyed lookup cache. 403 // Keyed lookup cache.
424 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(), 404 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(),
425 UNCLASSIFIED, 405 UNCLASSIFIED,
426 28, 406 28,
427 "KeyedLookupCache::keys()"); 407 "KeyedLookupCache::keys()");
428 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(), 408 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(),
429 UNCLASSIFIED, 409 UNCLASSIFIED,
430 29, 410 29,
431 "KeyedLookupCache::field_offsets()"); 411 "KeyedLookupCache::field_offsets()");
432 Add(ExternalReference::transcendental_cache_array_address(isolate).address(),
433 UNCLASSIFIED,
434 30,
435 "TranscendentalCache::caches()");
436 Add(ExternalReference::handle_scope_next_address(isolate).address(), 412 Add(ExternalReference::handle_scope_next_address(isolate).address(),
437 UNCLASSIFIED, 413 UNCLASSIFIED,
438 31, 414 31,
439 "HandleScope::next"); 415 "HandleScope::next");
440 Add(ExternalReference::handle_scope_limit_address(isolate).address(), 416 Add(ExternalReference::handle_scope_limit_address(isolate).address(),
441 UNCLASSIFIED, 417 UNCLASSIFIED,
442 32, 418 32,
443 "HandleScope::limit"); 419 "HandleScope::limit");
444 Add(ExternalReference::handle_scope_level_address(isolate).address(), 420 Add(ExternalReference::handle_scope_level_address(isolate).address(),
445 UNCLASSIFIED, 421 UNCLASSIFIED,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 Deserializer::Deserializer(SnapshotByteSource* source) 763 Deserializer::Deserializer(SnapshotByteSource* source)
788 : isolate_(NULL), 764 : isolate_(NULL),
789 source_(source), 765 source_(source),
790 external_reference_decoder_(NULL) { 766 external_reference_decoder_(NULL) {
791 for (int i = 0; i < LAST_SPACE + 1; i++) { 767 for (int i = 0; i < LAST_SPACE + 1; i++) {
792 reservations_[i] = kUninitializedReservation; 768 reservations_[i] = kUninitializedReservation;
793 } 769 }
794 } 770 }
795 771
796 772
773 void Deserializer::FlushICacheForNewCodeObjects() {
774 PageIterator it(isolate_->heap()->code_space());
775 while (it.has_next()) {
776 Page* p = it.next();
777 CPU::FlushICache(p->area_start(), p->area_end() - p->area_start());
778 }
779 }
780
781
797 void Deserializer::Deserialize(Isolate* isolate) { 782 void Deserializer::Deserialize(Isolate* isolate) {
798 isolate_ = isolate; 783 isolate_ = isolate;
799 ASSERT(isolate_ != NULL); 784 ASSERT(isolate_ != NULL);
800 isolate_->heap()->ReserveSpace(reservations_, &high_water_[0]); 785 isolate_->heap()->ReserveSpace(reservations_, &high_water_[0]);
801 // No active threads. 786 // No active threads.
802 ASSERT_EQ(NULL, isolate_->thread_manager()->FirstThreadStateInUse()); 787 ASSERT_EQ(NULL, isolate_->thread_manager()->FirstThreadStateInUse());
803 // No active handles. 788 // No active handles.
804 ASSERT(isolate_->handle_scope_implementer()->blocks()->is_empty()); 789 ASSERT(isolate_->handle_scope_implementer()->blocks()->is_empty());
805 ASSERT_EQ(NULL, external_reference_decoder_); 790 ASSERT_EQ(NULL, external_reference_decoder_);
806 external_reference_decoder_ = new ExternalReferenceDecoder(isolate); 791 external_reference_decoder_ = new ExternalReferenceDecoder(isolate);
(...skipping 16 matching lines...) Expand all
823 isolate_->heap()->InitializeWeakObjectToCodeTable(); 808 isolate_->heap()->InitializeWeakObjectToCodeTable();
824 809
825 // Update data pointers to the external strings containing natives sources. 810 // Update data pointers to the external strings containing natives sources.
826 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { 811 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
827 Object* source = isolate_->heap()->natives_source_cache()->get(i); 812 Object* source = isolate_->heap()->natives_source_cache()->get(i);
828 if (!source->IsUndefined()) { 813 if (!source->IsUndefined()) {
829 ExternalAsciiString::cast(source)->update_data_cache(); 814 ExternalAsciiString::cast(source)->update_data_cache();
830 } 815 }
831 } 816 }
832 817
818 FlushICacheForNewCodeObjects();
819
833 // Issue code events for newly deserialized code objects. 820 // Issue code events for newly deserialized code objects.
834 LOG_CODE_EVENT(isolate_, LogCodeObjects()); 821 LOG_CODE_EVENT(isolate_, LogCodeObjects());
835 LOG_CODE_EVENT(isolate_, LogCompiledFunctions()); 822 LOG_CODE_EVENT(isolate_, LogCompiledFunctions());
836 } 823 }
837 824
838 825
839 void Deserializer::DeserializePartial(Isolate* isolate, Object** root) { 826 void Deserializer::DeserializePartial(Isolate* isolate, Object** root) {
840 isolate_ = isolate; 827 isolate_ = isolate;
841 for (int i = NEW_SPACE; i < kNumberOfSpaces; i++) { 828 for (int i = NEW_SPACE; i < kNumberOfSpaces; i++) {
842 ASSERT(reservations_[i] != kUninitializedReservation); 829 ASSERT(reservations_[i] != kUninitializedReservation);
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 1848
1862 bool SnapshotByteSource::AtEOF() { 1849 bool SnapshotByteSource::AtEOF() {
1863 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1850 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1864 for (int x = position_; x < length_; x++) { 1851 for (int x = position_; x < length_; x++) {
1865 if (data_[x] != SerializerDeserializer::nop()) return false; 1852 if (data_[x] != SerializerDeserializer::nop()) return false;
1866 } 1853 }
1867 return true; 1854 return true;
1868 } 1855 }
1869 1856
1870 } } // namespace v8::internal 1857 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | src/smart-pointers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698