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/runtime.cc

Issue 6532091: Merge bleeding_edge revision (5922, 5934] to isolates branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' 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/platform-linux.cc ('k') | src/runtime-profiler.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 7150 matching lines...) Expand 10 before | Expand all | Expand 10 after
7161 // unoptimized code. 7161 // unoptimized code.
7162 JavaScriptFrameIterator it; 7162 JavaScriptFrameIterator it;
7163 JavaScriptFrame* frame = it.frame(); 7163 JavaScriptFrame* frame = it.frame();
7164 ASSERT(frame->function() == *function); 7164 ASSERT(frame->function() == *function);
7165 ASSERT(frame->LookupCode(isolate) == *unoptimized); 7165 ASSERT(frame->LookupCode(isolate) == *unoptimized);
7166 ASSERT(unoptimized->contains(frame->pc())); 7166 ASSERT(unoptimized->contains(frame->pc()));
7167 7167
7168 // Use linear search of the unoptimized code's stack check table to find 7168 // Use linear search of the unoptimized code's stack check table to find
7169 // the AST id matching the PC. 7169 // the AST id matching the PC.
7170 Address start = unoptimized->instruction_start(); 7170 Address start = unoptimized->instruction_start();
7171 unsigned target_pc_offset = frame->pc() - start; 7171 unsigned target_pc_offset = static_cast<unsigned>(frame->pc() - start);
7172 Address table_cursor = start + unoptimized->stack_check_table_start(); 7172 Address table_cursor = start + unoptimized->stack_check_table_start();
7173 uint32_t table_length = Memory::uint32_at(table_cursor); 7173 uint32_t table_length = Memory::uint32_at(table_cursor);
7174 table_cursor += kIntSize; 7174 table_cursor += kIntSize;
7175 for (unsigned i = 0; i < table_length; ++i) { 7175 for (unsigned i = 0; i < table_length; ++i) {
7176 // Table entries are (AST id, pc offset) pairs. 7176 // Table entries are (AST id, pc offset) pairs.
7177 uint32_t pc_offset = Memory::uint32_at(table_cursor + kIntSize); 7177 uint32_t pc_offset = Memory::uint32_at(table_cursor + kIntSize);
7178 if (pc_offset == target_pc_offset) { 7178 if (pc_offset == target_pc_offset) {
7179 ast_id = static_cast<int>(Memory::uint32_at(table_cursor)); 7179 ast_id = static_cast<int>(Memory::uint32_at(table_cursor));
7180 break; 7180 break;
7181 } 7181 }
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after
11270 } else { 11270 } else {
11271 // Handle last resort GC and make sure to allow future allocations 11271 // Handle last resort GC and make sure to allow future allocations
11272 // to grow the heap without causing GCs (if possible). 11272 // to grow the heap without causing GCs (if possible).
11273 COUNTERS->gc_last_resort_from_js()->Increment(); 11273 COUNTERS->gc_last_resort_from_js()->Increment();
11274 HEAP->CollectAllGarbage(false); 11274 HEAP->CollectAllGarbage(false);
11275 } 11275 }
11276 } 11276 }
11277 11277
11278 11278
11279 } } // namespace v8::internal 11279 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698