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

Side by Side Diff: src/objects.cc

Issue 6334083: Streamline the code for patching optimized code for lazy deopt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Rewrite the incorrect comment mentioning absolute calls. Created 9 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-inl.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 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 5983 matching lines...) Expand 10 before | Expand all | Expand 10 after
5994 5994
5995 SafepointEntry Code::GetSafepointEntry(Address pc) { 5995 SafepointEntry Code::GetSafepointEntry(Address pc) {
5996 SafepointTable table(this); 5996 SafepointTable table(this);
5997 return table.FindEntry(pc); 5997 return table.FindEntry(pc);
5998 } 5998 }
5999 5999
6000 6000
6001 void Code::SetNoStackCheckTable() { 6001 void Code::SetNoStackCheckTable() {
6002 // Indicate the absence of a stack-check table by a table start after the 6002 // Indicate the absence of a stack-check table by a table start after the
6003 // end of the instructions. Table start must be aligned, so round up. 6003 // end of the instructions. Table start must be aligned, so round up.
6004 set_stack_check_table_start(RoundUp(instruction_size(), kIntSize)); 6004 set_stack_check_table_offset(RoundUp(instruction_size(), kIntSize));
6005 } 6005 }
6006 6006
6007 6007
6008 Map* Code::FindFirstMap() { 6008 Map* Code::FindFirstMap() {
6009 ASSERT(is_inline_cache_stub()); 6009 ASSERT(is_inline_cache_stub());
6010 AssertNoAllocation no_allocation; 6010 AssertNoAllocation no_allocation;
6011 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 6011 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
6012 for (RelocIterator it(this, mask); !it.done(); it.next()) { 6012 for (RelocIterator it(this, mask); !it.done(); it.next()) {
6013 RelocInfo* info = it.rinfo(); 6013 RelocInfo* info = it.rinfo();
6014 Object* object = info->target_object(); 6014 Object* object = info->target_object();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
6271 } else { 6271 } else {
6272 PrintF(out, " <none>"); 6272 PrintF(out, " <none>");
6273 } 6273 }
6274 if (entry.argument_count() > 0) { 6274 if (entry.argument_count() > 0) {
6275 PrintF(out, " argc: %d", entry.argument_count()); 6275 PrintF(out, " argc: %d", entry.argument_count());
6276 } 6276 }
6277 PrintF(out, "\n"); 6277 PrintF(out, "\n");
6278 } 6278 }
6279 PrintF(out, "\n"); 6279 PrintF(out, "\n");
6280 } else if (kind() == FUNCTION) { 6280 } else if (kind() == FUNCTION) {
6281 unsigned offset = stack_check_table_start(); 6281 unsigned offset = stack_check_table_offset();
6282 // If there is no stack check table, the "table start" will at or after 6282 // If there is no stack check table, the "table start" will at or after
6283 // (due to alignment) the end of the instruction stream. 6283 // (due to alignment) the end of the instruction stream.
6284 if (static_cast<int>(offset) < instruction_size()) { 6284 if (static_cast<int>(offset) < instruction_size()) {
6285 unsigned* address = 6285 unsigned* address =
6286 reinterpret_cast<unsigned*>(instruction_start() + offset); 6286 reinterpret_cast<unsigned*>(instruction_start() + offset);
6287 unsigned length = address[0]; 6287 unsigned length = address[0];
6288 PrintF(out, "Stack checks (size = %u)\n", length); 6288 PrintF(out, "Stack checks (size = %u)\n", length);
6289 PrintF(out, "ast_id pc_offset\n"); 6289 PrintF(out, "ast_id pc_offset\n");
6290 for (unsigned i = 0; i < length; ++i) { 6290 for (unsigned i = 0; i < length; ++i) {
6291 unsigned index = (2 * i) + 1; 6291 unsigned index = (2 * i) + 1;
(...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after
9871 if (break_point_objects()->IsUndefined()) return 0; 9871 if (break_point_objects()->IsUndefined()) return 0;
9872 // Single beak point. 9872 // Single beak point.
9873 if (!break_point_objects()->IsFixedArray()) return 1; 9873 if (!break_point_objects()->IsFixedArray()) return 1;
9874 // Multiple break points. 9874 // Multiple break points.
9875 return FixedArray::cast(break_point_objects())->length(); 9875 return FixedArray::cast(break_point_objects())->length();
9876 } 9876 }
9877 #endif 9877 #endif
9878 9878
9879 9879
9880 } } // namespace v8::internal 9880 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698