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

Side by Side Diff: src/frames.cc

Issue 995006: Explicitly declare temporary cooked frames state (Closed)
Patch Set: merge, codereview Created 10 years, 9 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
« no previous file with comments | « no previous file | src/liveedit.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // ------------------------------------------------------------------------- 322 // -------------------------------------------------------------------------
323 323
324 324
325 bool StackFrame::HasHandler() const { 325 bool StackFrame::HasHandler() const {
326 StackHandlerIterator it(this, top_handler()); 326 StackHandlerIterator it(this, top_handler());
327 return !it.done(); 327 return !it.done();
328 } 328 }
329 329
330 330
331 void StackFrame::CookFramesForThread(ThreadLocalTop* thread) { 331 void StackFrame::CookFramesForThread(ThreadLocalTop* thread) {
332 // Only cooking frames when the collector is compacting and thus moving code
333 // around.
334 ASSERT(MarkCompactCollector::IsCompacting());
335 ASSERT(!thread->stack_is_cooked()); 332 ASSERT(!thread->stack_is_cooked());
336 for (StackFrameIterator it(thread); !it.done(); it.Advance()) { 333 for (StackFrameIterator it(thread); !it.done(); it.Advance()) {
337 it.frame()->Cook(); 334 it.frame()->Cook();
338 } 335 }
339 thread->set_stack_is_cooked(true); 336 thread->set_stack_is_cooked(true);
340 } 337 }
341 338
342 339
343 void StackFrame::UncookFramesForThread(ThreadLocalTop* thread) { 340 void StackFrame::UncookFramesForThread(ThreadLocalTop* thread) {
344 // Only uncooking frames when the collector is compacting and thus moving code
345 // around.
346 ASSERT(MarkCompactCollector::HasCompacted());
347 ASSERT(thread->stack_is_cooked()); 341 ASSERT(thread->stack_is_cooked());
348 for (StackFrameIterator it(thread); !it.done(); it.Advance()) { 342 for (StackFrameIterator it(thread); !it.done(); it.Advance()) {
349 it.frame()->Uncook(); 343 it.frame()->Uncook();
350 } 344 }
351 thread->set_stack_is_cooked(false); 345 thread->set_stack_is_cooked(false);
352 } 346 }
353 347
354 348
355 void StackFrame::Cook() { 349 void StackFrame::Cook() {
356 Code* code = this->code(); 350 Code* code = this->code();
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 reg_code[i++] = r; 761 reg_code[i++] = r;
768 762
769 ASSERT(i == kNumJSCallerSaved); 763 ASSERT(i == kNumJSCallerSaved);
770 } 764 }
771 ASSERT(0 <= n && n < kNumJSCallerSaved); 765 ASSERT(0 <= n && n < kNumJSCallerSaved);
772 return reg_code[n]; 766 return reg_code[n];
773 } 767 }
774 768
775 769
776 } } // namespace v8::internal 770 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698