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

Side by Side Diff: src/frames.cc

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 4 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/frames.h ('k') | src/full-codegen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 18 matching lines...) Expand all
29 29
30 #include "ast.h" 30 #include "ast.h"
31 #include "deoptimizer.h" 31 #include "deoptimizer.h"
32 #include "frames-inl.h" 32 #include "frames-inl.h"
33 #include "full-codegen.h" 33 #include "full-codegen.h"
34 #include "mark-compact.h" 34 #include "mark-compact.h"
35 #include "safepoint-table.h" 35 #include "safepoint-table.h"
36 #include "scopeinfo.h" 36 #include "scopeinfo.h"
37 #include "string-stream.h" 37 #include "string-stream.h"
38 38
39 #include "allocation-inl.h"
40
39 namespace v8 { 41 namespace v8 {
40 namespace internal { 42 namespace internal {
41 43
42 // Iterator that supports traversing the stack handlers of a 44 // Iterator that supports traversing the stack handlers of a
43 // particular frame. Needs to know the top of the handler chain. 45 // particular frame. Needs to know the top of the handler chain.
44 class StackHandlerIterator BASE_EMBEDDED { 46 class StackHandlerIterator BASE_EMBEDDED {
45 public: 47 public:
46 StackHandlerIterator(const StackFrame* frame, StackHandler* handler) 48 StackHandlerIterator(const StackFrame* frame, StackHandler* handler)
47 : limit_(frame->fp()), handler_(handler) { 49 : limit_(frame->fp()), handler_(handler) {
48 // Make sure the handler has already been unwound to this frame. 50 // Make sure the handler has already been unwound to this frame.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if (is_working_iterator_) { 341 if (is_working_iterator_) {
340 iterator_.Reset(); 342 iterator_.Reset();
341 iteration_done_ = false; 343 iteration_done_ = false;
342 } 344 }
343 } 345 }
344 346
345 347
346 // ------------------------------------------------------------------------- 348 // -------------------------------------------------------------------------
347 349
348 350
349 #ifdef ENABLE_LOGGING_AND_PROFILING
350 SafeStackTraceFrameIterator::SafeStackTraceFrameIterator( 351 SafeStackTraceFrameIterator::SafeStackTraceFrameIterator(
351 Isolate* isolate, 352 Isolate* isolate,
352 Address fp, Address sp, Address low_bound, Address high_bound) : 353 Address fp, Address sp, Address low_bound, Address high_bound) :
353 SafeJavaScriptFrameIterator(isolate, fp, sp, low_bound, high_bound) { 354 SafeJavaScriptFrameIterator(isolate, fp, sp, low_bound, high_bound) {
354 if (!done() && !frame()->is_java_script()) Advance(); 355 if (!done() && !frame()->is_java_script()) Advance();
355 } 356 }
356 357
357 358
358 void SafeStackTraceFrameIterator::Advance() { 359 void SafeStackTraceFrameIterator::Advance() {
359 while (true) { 360 while (true) {
360 SafeJavaScriptFrameIterator::Advance(); 361 SafeJavaScriptFrameIterator::Advance();
361 if (done()) return; 362 if (done()) return;
362 if (frame()->is_java_script()) return; 363 if (frame()->is_java_script()) return;
363 } 364 }
364 } 365 }
365 #endif
366 366
367 367
368 Code* StackFrame::GetSafepointData(Isolate* isolate, 368 Code* StackFrame::GetSafepointData(Isolate* isolate,
369 Address pc, 369 Address pc,
370 SafepointEntry* safepoint_entry, 370 SafepointEntry* safepoint_entry,
371 unsigned* stack_slots) { 371 unsigned* stack_slots) {
372 PcToCodeCache::PcToCodeCacheEntry* entry = 372 PcToCodeCache::PcToCodeCacheEntry* entry =
373 isolate->pc_to_code_cache()->GetCacheEntry(pc); 373 isolate->pc_to_code_cache()->GetCacheEntry(pc);
374 SafepointEntry cached_safepoint_entry = entry->safepoint_entry;
375 if (!entry->safepoint_entry.is_valid()) { 374 if (!entry->safepoint_entry.is_valid()) {
376 entry->safepoint_entry = entry->code->GetSafepointEntry(pc); 375 entry->safepoint_entry = entry->code->GetSafepointEntry(pc);
377 ASSERT(entry->safepoint_entry.is_valid()); 376 ASSERT(entry->safepoint_entry.is_valid());
378 } else { 377 } else {
379 ASSERT(entry->safepoint_entry.Equals(entry->code->GetSafepointEntry(pc))); 378 ASSERT(entry->safepoint_entry.Equals(entry->code->GetSafepointEntry(pc)));
380 } 379 }
381 380
382 // Fill in the results and return the code. 381 // Fill in the results and return the code.
383 Code* code = entry->code; 382 Code* code = entry->code;
384 *safepoint_entry = entry->safepoint_entry; 383 *safepoint_entry = entry->safepoint_entry;
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 ZoneList<StackFrame*> list(10); 1270 ZoneList<StackFrame*> list(10);
1272 for (StackFrameIterator it; !it.done(); it.Advance()) { 1271 for (StackFrameIterator it; !it.done(); it.Advance()) {
1273 StackFrame* frame = AllocateFrameCopy(it.frame()); 1272 StackFrame* frame = AllocateFrameCopy(it.frame());
1274 list.Add(frame); 1273 list.Add(frame);
1275 } 1274 }
1276 return list.ToVector(); 1275 return list.ToVector();
1277 } 1276 }
1278 1277
1279 1278
1280 } } // namespace v8::internal 1279 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698