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

Side by Side Diff: src/frames.cc

Issue 12093089: Support pass-through of stub caller arguments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix bugs Created 7 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/frames.h ('k') | src/frames-inl.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 1297
1298 void InternalFrame::Iterate(ObjectVisitor* v) const { 1298 void InternalFrame::Iterate(ObjectVisitor* v) const {
1299 // Internal frames only have object pointers on the expression stack 1299 // Internal frames only have object pointers on the expression stack
1300 // as they never have any arguments. 1300 // as they never have any arguments.
1301 IterateExpressions(v); 1301 IterateExpressions(v);
1302 IteratePc(v, pc_address(), LookupCode()); 1302 IteratePc(v, pc_address(), LookupCode());
1303 } 1303 }
1304 1304
1305 1305
1306 void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const { 1306 void StubFailureTrampolineFrame::Iterate(ObjectVisitor* v) const {
1307 Object** base = &Memory::Object_at(sp());
1308 Object** limit = &Memory::Object_at(fp() +
1309 kFirstRegisterParameterFrameOffset);
1310 v->VisitPointers(base, limit);
1311 base = &Memory::Object_at(fp() + StandardFrameConstants::kMarkerOffset);
1307 const int offset = StandardFrameConstants::kContextOffset; 1312 const int offset = StandardFrameConstants::kContextOffset;
1308 Object** base = &Memory::Object_at(sp()); 1313 limit = &Memory::Object_at(fp() + offset) + 1;
1309 Object** limit = &Memory::Object_at(fp() + offset) + 1;
1310 v->VisitPointers(base, limit); 1314 v->VisitPointers(base, limit);
1311 IteratePc(v, pc_address(), LookupCode()); 1315 IteratePc(v, pc_address(), LookupCode());
1312 } 1316 }
1313 1317
1314 1318
1319 Address StubFailureTrampolineFrame::GetCallerStackPointer() const {
1320 return fp() + StandardFrameConstants::kCallerSPOffset;
1321 }
1322
1323
1324 Code* StubFailureTrampolineFrame::unchecked_code() const {
1325 int i = 0;
1326 for (; i <= StubFailureTrampolineStub::kMaxExtraExpressionStackCount; ++i) {
1327 Code* trampoline;
1328 StubFailureTrampolineStub(i).FindCodeInCache(&trampoline, isolate());
Michael Starzinger 2013/02/04 16:05:10 Are we sure that this stub is in the cache? We sho
1329 ASSERT(trampoline != NULL);
1330 Address current_pc = pc();
1331 Address code_start = trampoline->instruction_start();
1332 Address code_end = code_start + trampoline->instruction_size();
1333 if (code_start <= current_pc && current_pc < code_end) {
1334 return trampoline;
1335 }
1336 }
1337 UNREACHABLE();
1338 return NULL;
1339 }
1340
1341
1315 // ------------------------------------------------------------------------- 1342 // -------------------------------------------------------------------------
1316 1343
1317 1344
1318 JavaScriptFrame* StackFrameLocator::FindJavaScriptFrame(int n) { 1345 JavaScriptFrame* StackFrameLocator::FindJavaScriptFrame(int n) {
1319 ASSERT(n >= 0); 1346 ASSERT(n >= 0);
1320 for (int i = 0; i <= n; i++) { 1347 for (int i = 0; i <= n; i++) {
1321 while (!iterator_.frame()->is_java_script()) iterator_.Advance(); 1348 while (!iterator_.frame()->is_java_script()) iterator_.Advance();
1322 if (i == n) return JavaScriptFrame::cast(iterator_.frame()); 1349 if (i == n) return JavaScriptFrame::cast(iterator_.frame());
1323 iterator_.Advance(); 1350 iterator_.Advance();
1324 } 1351 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 ZoneList<StackFrame*> list(10, zone); 1504 ZoneList<StackFrame*> list(10, zone);
1478 for (StackFrameIterator it; !it.done(); it.Advance()) { 1505 for (StackFrameIterator it; !it.done(); it.Advance()) {
1479 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1506 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1480 list.Add(frame, zone); 1507 list.Add(frame, zone);
1481 } 1508 }
1482 return list.ToVector(); 1509 return list.ToVector();
1483 } 1510 }
1484 1511
1485 1512
1486 } } // namespace v8::internal 1513 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698