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

Side by Side Diff: src/objects.cc

Issue 23710014: Introduce concurrent on-stack replacement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 3 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/optimizing-compiler-thread.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 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 10307 matching lines...) Expand 10 before | Expand all | Expand 10 after
10318 // Don't clear AllocationSites 10318 // Don't clear AllocationSites
10319 Object* value = cell->value(); 10319 Object* value = cell->value();
10320 if (value == NULL || !value->IsAllocationSite()) { 10320 if (value == NULL || !value->IsAllocationSite()) {
10321 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); 10321 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap));
10322 } 10322 }
10323 } 10323 }
10324 } 10324 }
10325 } 10325 }
10326 10326
10327 10327
10328 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) {
10329 DisallowHeapAllocation no_gc;
10330 ASSERT(kind() == FUNCTION);
10331 for (FullCodeGenerator::BackEdgeTableIterator it(this, &no_gc);
10332 !it.Done();
10333 it.Next()) {
10334 if (it.pc_offset() == pc_offset) return it.ast_id();
10335 }
10336 return BailoutId::None();
10337 }
10338
10339
10328 bool Code::allowed_in_shared_map_code_cache() { 10340 bool Code::allowed_in_shared_map_code_cache() {
10329 return is_keyed_load_stub() || is_keyed_store_stub() || 10341 return is_keyed_load_stub() || is_keyed_store_stub() ||
10330 (is_compare_ic_stub() && 10342 (is_compare_ic_stub() &&
10331 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); 10343 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT);
10332 } 10344 }
10333 10345
10334 10346
10335 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { 10347 void Code::MakeCodeAgeSequenceYoung(byte* sequence) {
10336 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); 10348 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY);
10337 } 10349 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
10778 PrintF(out, " argc: %d", entry.argument_count()); 10790 PrintF(out, " argc: %d", entry.argument_count());
10779 } 10791 }
10780 PrintF(out, "\n"); 10792 PrintF(out, "\n");
10781 } 10793 }
10782 PrintF(out, "\n"); 10794 PrintF(out, "\n");
10783 } else if (kind() == FUNCTION) { 10795 } else if (kind() == FUNCTION) {
10784 unsigned offset = back_edge_table_offset(); 10796 unsigned offset = back_edge_table_offset();
10785 // If there is no back edge table, the "table start" will be at or after 10797 // If there is no back edge table, the "table start" will be at or after
10786 // (due to alignment) the end of the instruction stream. 10798 // (due to alignment) the end of the instruction stream.
10787 if (static_cast<int>(offset) < instruction_size()) { 10799 if (static_cast<int>(offset) < instruction_size()) {
10788 FullCodeGenerator::BackEdgeTableIterator back_edges(this); 10800 DisallowHeapAllocation no_gc;
10801 FullCodeGenerator::BackEdgeTableIterator back_edges(this, &no_gc);
10789 10802
10790 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); 10803 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length());
10791 PrintF(out, "ast_id pc_offset loop_depth\n"); 10804 PrintF(out, "ast_id pc_offset loop_depth\n");
10792 10805
10793 for ( ; !back_edges.Done(); back_edges.Next()) { 10806 for ( ; !back_edges.Done(); back_edges.Next()) {
10794 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), 10807 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(),
10795 back_edges.pc_offset(), 10808 back_edges.pc_offset(),
10796 back_edges.loop_depth()); 10809 back_edges.loop_depth());
10797 } 10810 }
10798 10811
(...skipping 5169 matching lines...) Expand 10 before | Expand all | Expand 10 after
15968 #define ERROR_MESSAGES_TEXTS(C, T) T, 15981 #define ERROR_MESSAGES_TEXTS(C, T) T,
15969 static const char* error_messages_[] = { 15982 static const char* error_messages_[] = {
15970 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 15983 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
15971 }; 15984 };
15972 #undef ERROR_MESSAGES_TEXTS 15985 #undef ERROR_MESSAGES_TEXTS
15973 return error_messages_[reason]; 15986 return error_messages_[reason];
15974 } 15987 }
15975 15988
15976 15989
15977 } } // namespace v8::internal 15990 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698