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

Side by Side Diff: src/objects.cc

Issue 159933002: A64: Synchronize with r19289. (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/objects.h ('k') | src/objects-debug.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 10613 matching lines...) Expand 10 before | Expand all | Expand 10 after
10624 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); 10624 Code* target(Code::GetCodeFromTargetAddress(info->target_address()));
10625 if (target->is_inline_cache_stub()) { 10625 if (target->is_inline_cache_stub()) {
10626 if (kind == NULL || *kind == target->kind()) { 10626 if (kind == NULL || *kind == target->kind()) {
10627 IC::Clear(this->GetIsolate(), info->pc()); 10627 IC::Clear(this->GetIsolate(), info->pc());
10628 } 10628 }
10629 } 10629 }
10630 } 10630 }
10631 } 10631 }
10632 10632
10633 10633
10634 void Code::ClearTypeFeedbackCells(Heap* heap) { 10634 void Code::ClearTypeFeedbackInfo(Heap* heap) {
10635 if (kind() != FUNCTION) return; 10635 if (kind() != FUNCTION) return;
10636 Object* raw_info = type_feedback_info(); 10636 Object* raw_info = type_feedback_info();
10637 if (raw_info->IsTypeFeedbackInfo()) { 10637 if (raw_info->IsTypeFeedbackInfo()) {
10638 TypeFeedbackCells* type_feedback_cells = 10638 FixedArray* feedback_vector =
10639 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); 10639 TypeFeedbackInfo::cast(raw_info)->feedback_vector();
10640 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { 10640 for (int i = 0; i < feedback_vector->length(); i++) {
10641 Cell* cell = type_feedback_cells->GetCell(i); 10641 Object* obj = feedback_vector->get(i);
10642 // Don't clear AllocationSites 10642 if (!obj->IsAllocationSite()) {
10643 Object* value = cell->value(); 10643 // TODO(mvstanton): Can't I avoid a write barrier for this sentinel?
10644 if (value == NULL || !value->IsAllocationSite()) { 10644 feedback_vector->set(i,
10645 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); 10645 TypeFeedbackInfo::RawUninitializedSentinel(heap));
10646 } 10646 }
10647 } 10647 }
10648 } 10648 }
10649 } 10649 }
10650 10650
10651 10651
10652 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { 10652 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) {
10653 DisallowHeapAllocation no_gc; 10653 DisallowHeapAllocation no_gc;
10654 ASSERT(kind() == FUNCTION); 10654 ASSERT(kind() == FUNCTION);
10655 BackEdgeTable back_edges(this, &no_gc); 10655 BackEdgeTable back_edges(this, &no_gc);
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
11084 11084
11085 11085
11086 void Code::Disassemble(const char* name, FILE* out) { 11086 void Code::Disassemble(const char* name, FILE* out) {
11087 PrintF(out, "kind = %s\n", Kind2String(kind())); 11087 PrintF(out, "kind = %s\n", Kind2String(kind()));
11088 if (has_major_key()) { 11088 if (has_major_key()) {
11089 PrintF(out, "major_key = %s\n", 11089 PrintF(out, "major_key = %s\n",
11090 CodeStub::MajorName(CodeStub::GetMajorKey(this), true)); 11090 CodeStub::MajorName(CodeStub::GetMajorKey(this), true));
11091 } 11091 }
11092 if (is_inline_cache_stub()) { 11092 if (is_inline_cache_stub()) {
11093 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); 11093 PrintF(out, "ic_state = %s\n", ICState2String(ic_state()));
11094 PrintExtraICState(out, kind(), needs_extended_extra_ic_state(kind()) ? 11094 PrintExtraICState(out, kind(), extra_ic_state());
11095 extended_extra_ic_state() : extra_ic_state());
11096 if (ic_state() == MONOMORPHIC) { 11095 if (ic_state() == MONOMORPHIC) {
11097 PrintF(out, "type = %s\n", StubType2String(type())); 11096 PrintF(out, "type = %s\n", StubType2String(type()));
11098 } 11097 }
11099 if (is_compare_ic_stub()) { 11098 if (is_compare_ic_stub()) {
11100 ASSERT(major_key() == CodeStub::CompareIC); 11099 ASSERT(major_key() == CodeStub::CompareIC);
11101 CompareIC::State left_state, right_state, handler_state; 11100 CompareIC::State left_state, right_state, handler_state;
11102 Token::Value op; 11101 Token::Value op;
11103 ICCompareStub::DecodeMinorKey(stub_info(), &left_state, &right_state, 11102 ICCompareStub::DecodeMinorKey(stub_info(), &left_state, &right_state,
11104 &handler_state, &op); 11103 &handler_state, &op);
11105 PrintF(out, "compare_state = %s*%s -> %s\n", 11104 PrintF(out, "compare_state = %s*%s -> %s\n",
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
11757 DisallowHeapAllocation no_allocation_scope; 11756 DisallowHeapAllocation no_allocation_scope;
11758 DependentCode::GroupStartIndexes starts(this); 11757 DependentCode::GroupStartIndexes starts(this);
11759 int start = starts.at(group); 11758 int start = starts.at(group);
11760 int end = starts.at(group + 1); 11759 int end = starts.at(group + 1);
11761 int code_entries = starts.number_of_entries(); 11760 int code_entries = starts.number_of_entries();
11762 if (start == end) return false; 11761 if (start == end) return false;
11763 11762
11764 // Mark all the code that needs to be deoptimized. 11763 // Mark all the code that needs to be deoptimized.
11765 bool marked = false; 11764 bool marked = false;
11766 for (int i = start; i < end; i++) { 11765 for (int i = start; i < end; i++) {
11767 Object* object = object_at(i); 11766 if (is_code_at(i)) {
11768 // TODO(hpayer): This is a temporary hack. Foreign objects move after 11767 Code* code = code_at(i);
11769 // new space evacuation. Since pretenuring may mark these objects as aborted
11770 // we have to follow the forwarding pointer in that case.
11771 MapWord map_word = HeapObject::cast(object)->map_word();
11772 if (map_word.IsForwardingAddress()) {
11773 object = map_word.ToForwardingAddress();
11774 }
11775 if (object->IsCode()) {
11776 Code* code = Code::cast(object);
11777 if (!code->marked_for_deoptimization()) { 11768 if (!code->marked_for_deoptimization()) {
11778 code->set_marked_for_deoptimization(true); 11769 code->set_marked_for_deoptimization(true);
11779 marked = true; 11770 marked = true;
11780 } 11771 }
11781 } else { 11772 } else {
11782 CompilationInfo* info = reinterpret_cast<CompilationInfo*>( 11773 CompilationInfo* info = compilation_info_at(i);
11783 Foreign::cast(object)->foreign_address());
11784 info->AbortDueToDependencyChange(); 11774 info->AbortDueToDependencyChange();
11785 } 11775 }
11786 } 11776 }
11787 // Compact the array by moving all subsequent groups to fill in the new holes. 11777 // Compact the array by moving all subsequent groups to fill in the new holes.
11788 for (int src = end, dst = start; src < code_entries; src++, dst++) { 11778 for (int src = end, dst = start; src < code_entries; src++, dst++) {
11789 copy(src, dst); 11779 copy(src, dst);
11790 } 11780 }
11791 // Now the holes are at the end of the array, zap them for heap-verifier. 11781 // Now the holes are at the end of the array, zap them for heap-verifier.
11792 int removed = end - start; 11782 int removed = end - start;
11793 for (int i = code_entries - removed; i < code_entries; i++) { 11783 for (int i = code_entries - removed; i < code_entries; i++) {
(...skipping 4712 matching lines...) Expand 10 before | Expand all | Expand 10 after
16506 #define ERROR_MESSAGES_TEXTS(C, T) T, 16496 #define ERROR_MESSAGES_TEXTS(C, T) T,
16507 static const char* error_messages_[] = { 16497 static const char* error_messages_[] = {
16508 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16498 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16509 }; 16499 };
16510 #undef ERROR_MESSAGES_TEXTS 16500 #undef ERROR_MESSAGES_TEXTS
16511 return error_messages_[reason]; 16501 return error_messages_[reason];
16512 } 16502 }
16513 16503
16514 16504
16515 } } // namespace v8::internal 16505 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698