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

Side by Side Diff: src/frames.cc

Issue 9666052: Landing for pliard@chromium.org: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/flags.cc ('k') | src/gdb-jit.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 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "ast.h" 30 #include "ast.h"
31 #include "deoptimizer.h" 31 #include "deoptimizer.h"
32 #include "frames-inl.h" 32 #include "frames-inl.h"
33 #include "full-codegen.h" 33 #include "full-codegen.h"
34 #include "lazy-instance.h"
34 #include "mark-compact.h" 35 #include "mark-compact.h"
35 #include "safepoint-table.h" 36 #include "safepoint-table.h"
36 #include "scopeinfo.h" 37 #include "scopeinfo.h"
37 #include "string-stream.h" 38 #include "string-stream.h"
38 39
39 #include "allocation-inl.h" 40 #include "allocation-inl.h"
40 41
41 namespace v8 { 42 namespace v8 {
42 namespace internal { 43 namespace internal {
43 44
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 for (int r = 0; r < kNumRegs; r++) 1374 for (int r = 0; r < kNumRegs; r++)
1374 if ((kJSCallerSaved & (1 << r)) != 0) 1375 if ((kJSCallerSaved & (1 << r)) != 0)
1375 reg_code[i++] = r; 1376 reg_code[i++] = r;
1376 1377
1377 ASSERT(i == kNumJSCallerSaved); 1378 ASSERT(i == kNumJSCallerSaved);
1378 } 1379 }
1379 int reg_code[kNumJSCallerSaved]; 1380 int reg_code[kNumJSCallerSaved];
1380 }; 1381 };
1381 1382
1382 1383
1383 static const JSCallerSavedCodeData kCallerSavedCodeData; 1384 static LazyInstance<JSCallerSavedCodeData>::type caller_saved_code_data =
1384 1385 LAZY_INSTANCE_INITIALIZER;
1385 1386
1386 int JSCallerSavedCode(int n) { 1387 int JSCallerSavedCode(int n) {
1387 ASSERT(0 <= n && n < kNumJSCallerSaved); 1388 ASSERT(0 <= n && n < kNumJSCallerSaved);
1388 return kCallerSavedCodeData.reg_code[n]; 1389 return caller_saved_code_data.Get().reg_code[n];
1389 } 1390 }
1390 1391
1391 1392
1392 #define DEFINE_WRAPPER(type, field) \ 1393 #define DEFINE_WRAPPER(type, field) \
1393 class field##_Wrapper : public ZoneObject { \ 1394 class field##_Wrapper : public ZoneObject { \
1394 public: /* NOLINT */ \ 1395 public: /* NOLINT */ \
1395 field##_Wrapper(const field& original) : frame_(original) { \ 1396 field##_Wrapper(const field& original) : frame_(original) { \
1396 } \ 1397 } \
1397 field frame_; \ 1398 field frame_; \
1398 }; 1399 };
(...skipping 20 matching lines...) Expand all
1419 ZoneList<StackFrame*> list(10); 1420 ZoneList<StackFrame*> list(10);
1420 for (StackFrameIterator it; !it.done(); it.Advance()) { 1421 for (StackFrameIterator it; !it.done(); it.Advance()) {
1421 StackFrame* frame = AllocateFrameCopy(it.frame()); 1422 StackFrame* frame = AllocateFrameCopy(it.frame());
1422 list.Add(frame); 1423 list.Add(frame);
1423 } 1424 }
1424 return list.ToVector(); 1425 return list.ToVector();
1425 } 1426 }
1426 1427
1427 1428
1428 } } // namespace v8::internal 1429 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flags.cc ('k') | src/gdb-jit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698