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

Side by Side Diff: src/frames.cc

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 8 years, 6 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 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 #define DEFINE_WRAPPER(type, field) \ 1387 #define DEFINE_WRAPPER(type, field) \
1388 class field##_Wrapper : public ZoneObject { \ 1388 class field##_Wrapper : public ZoneObject { \
1389 public: /* NOLINT */ \ 1389 public: /* NOLINT */ \
1390 field##_Wrapper(const field& original) : frame_(original) { \ 1390 field##_Wrapper(const field& original) : frame_(original) { \
1391 } \ 1391 } \
1392 field frame_; \ 1392 field frame_; \
1393 }; 1393 };
1394 STACK_FRAME_TYPE_LIST(DEFINE_WRAPPER) 1394 STACK_FRAME_TYPE_LIST(DEFINE_WRAPPER)
1395 #undef DEFINE_WRAPPER 1395 #undef DEFINE_WRAPPER
1396 1396
1397 static StackFrame* AllocateFrameCopy(StackFrame* frame) { 1397 static StackFrame* AllocateFrameCopy(StackFrame* frame, Zone* zone) {
1398 #define FRAME_TYPE_CASE(type, field) \ 1398 #define FRAME_TYPE_CASE(type, field) \
1399 case StackFrame::type: { \ 1399 case StackFrame::type: { \
1400 field##_Wrapper* wrapper = \ 1400 field##_Wrapper* wrapper = \
1401 new field##_Wrapper(*(reinterpret_cast<field*>(frame))); \ 1401 new(zone) field##_Wrapper(*(reinterpret_cast<field*>(frame))); \
1402 return &wrapper->frame_; \ 1402 return &wrapper->frame_; \
1403 } 1403 }
1404 1404
1405 switch (frame->type()) { 1405 switch (frame->type()) {
1406 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE) 1406 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE)
1407 default: UNREACHABLE(); 1407 default: UNREACHABLE();
1408 } 1408 }
1409 #undef FRAME_TYPE_CASE 1409 #undef FRAME_TYPE_CASE
1410 return NULL; 1410 return NULL;
1411 } 1411 }
1412 1412
1413 Vector<StackFrame*> CreateStackMap() { 1413 Vector<StackFrame*> CreateStackMap(Zone* zone) {
1414 ZoneList<StackFrame*> list(10); 1414 ZoneList<StackFrame*> list(10, zone);
1415 for (StackFrameIterator it; !it.done(); it.Advance()) { 1415 for (StackFrameIterator it; !it.done(); it.Advance()) {
1416 StackFrame* frame = AllocateFrameCopy(it.frame()); 1416 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1417 list.Add(frame); 1417 list.Add(frame, zone);
1418 } 1418 }
1419 return list.ToVector(); 1419 return list.ToVector();
1420 } 1420 }
1421 1421
1422 1422
1423 } } // namespace v8::internal 1423 } } // 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