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

Side by Side Diff: src/frames.cc

Issue 341082: Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor (Closed)
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
« 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
396 Code* ExitFrame::code() const { 402 Code* ExitFrame::code() const {
397 return Heap::c_entry_code(); 403 Object* code = code_slot();
404 if (code->IsSmi()) {
405 return Heap::c_entry_debug_break_code();
406 } else {
407 return Code::cast(code);
408 }
398 } 409 }
399 410
400 411
401 void ExitFrame::ComputeCallerState(State* state) const { 412 void ExitFrame::ComputeCallerState(State* state) const {
402 // Setup the caller state. 413 // Setup the caller state.
403 state->sp = caller_sp(); 414 state->sp = caller_sp();
404 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset); 415 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset);
405 state->pc_address 416 state->pc_address
406 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset); 417 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset);
407 } 418 }
408 419
409 420
410 Address ExitFrame::GetCallerStackPointer() const { 421 Address ExitFrame::GetCallerStackPointer() const {
411 return fp() + ExitFrameConstants::kCallerSPDisplacement; 422 return fp() + ExitFrameConstants::kCallerSPDisplacement;
412 } 423 }
413 424
414 425
415 Code* ExitDebugFrame::code() const {
416 return Heap::c_entry_debug_break_code();
417 }
418
419
420 Address StandardFrame::GetExpressionAddress(int n) const { 426 Address StandardFrame::GetExpressionAddress(int n) const {
421 const int offset = StandardFrameConstants::kExpressionsOffset; 427 const int offset = StandardFrameConstants::kExpressionsOffset;
422 return fp() + offset - n * kPointerSize; 428 return fp() + offset - n * kPointerSize;
423 } 429 }
424 430
425 431
426 int StandardFrame::ComputeExpressionsCount() const { 432 int StandardFrame::ComputeExpressionsCount() const {
427 const int offset = 433 const int offset =
428 StandardFrameConstants::kExpressionsOffset + kPointerSize; 434 StandardFrameConstants::kExpressionsOffset + kPointerSize;
429 Address base = fp() + offset; 435 Address base = fp() + offset;
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 reg_code[i++] = r; 740 reg_code[i++] = r;
735 741
736 ASSERT(i == kNumJSCallerSaved); 742 ASSERT(i == kNumJSCallerSaved);
737 } 743 }
738 ASSERT(0 <= n && n < kNumJSCallerSaved); 744 ASSERT(0 <= n && n < kNumJSCallerSaved);
739 return reg_code[n]; 745 return reg_code[n];
740 } 746 }
741 747
742 748
743 } } // namespace v8::internal 749 } } // 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