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

Side by Side Diff: src/frames.cc

Issue 343035: Reverting 3159, 3151 and 3150 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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/globals.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 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 Address fp = Memory::Address_at(this->fp() + offset); 386 Address fp = Memory::Address_at(this->fp() + offset);
387 return ExitFrame::GetStateForFramePointer(fp, state); 387 return ExitFrame::GetStateForFramePointer(fp, state);
388 } 388 }
389 389
390 390
391 Code* EntryConstructFrame::code() const { 391 Code* EntryConstructFrame::code() const {
392 return Heap::js_construct_entry_code(); 392 return Heap::js_construct_entry_code();
393 } 393 }
394 394
395 395
396 Object*& ExitFrame::code_slot() const {
397 const int offset = ExitFrameConstants::kCodeOffset;
398 return Memory::Object_at(fp() + offset);
399 }
400
401
402 Code* ExitFrame::code() const { 396 Code* ExitFrame::code() const {
403 Object* code = code_slot(); 397 return Heap::c_entry_code();
404 if (code->IsSmi()) {
405 return Heap::c_entry_debug_break_code();
406 } else {
407 return Code::cast(code);
408 }
409 } 398 }
410 399
411 400
412 void ExitFrame::ComputeCallerState(State* state) const { 401 void ExitFrame::ComputeCallerState(State* state) const {
413 // Setup the caller state. 402 // Setup the caller state.
414 state->sp = caller_sp(); 403 state->sp = caller_sp();
415 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset); 404 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset);
416 state->pc_address 405 state->pc_address
417 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset); 406 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset);
418 } 407 }
419 408
420 409
421 Address ExitFrame::GetCallerStackPointer() const { 410 Address ExitFrame::GetCallerStackPointer() const {
422 return fp() + ExitFrameConstants::kCallerSPDisplacement; 411 return fp() + ExitFrameConstants::kCallerSPDisplacement;
423 } 412 }
424 413
425 414
415 Code* ExitDebugFrame::code() const {
416 return Heap::c_entry_debug_break_code();
417 }
418
419
426 Address StandardFrame::GetExpressionAddress(int n) const { 420 Address StandardFrame::GetExpressionAddress(int n) const {
427 const int offset = StandardFrameConstants::kExpressionsOffset; 421 const int offset = StandardFrameConstants::kExpressionsOffset;
428 return fp() + offset - n * kPointerSize; 422 return fp() + offset - n * kPointerSize;
429 } 423 }
430 424
431 425
432 int StandardFrame::ComputeExpressionsCount() const { 426 int StandardFrame::ComputeExpressionsCount() const {
433 const int offset = 427 const int offset =
434 StandardFrameConstants::kExpressionsOffset + kPointerSize; 428 StandardFrameConstants::kExpressionsOffset + kPointerSize;
435 Address base = fp() + offset; 429 Address base = fp() + offset;
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 reg_code[i++] = r; 734 reg_code[i++] = r;
741 735
742 ASSERT(i == kNumJSCallerSaved); 736 ASSERT(i == kNumJSCallerSaved);
743 } 737 }
744 ASSERT(0 <= n && n < kNumJSCallerSaved); 738 ASSERT(0 <= n && n < kNumJSCallerSaved);
745 return reg_code[n]; 739 return reg_code[n];
746 } 740 }
747 741
748 742
749 } } // namespace v8::internal 743 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698