OLD | NEW |
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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 for (int r = 0; r < kNumRegs; r++) | 1374 for (int r = 0; r < kNumRegs; r++) |
1375 if ((kJSCallerSaved & (1 << r)) != 0) | 1375 if ((kJSCallerSaved & (1 << r)) != 0) |
1376 reg_code[i++] = r; | 1376 reg_code[i++] = r; |
1377 | 1377 |
1378 ASSERT(i == kNumJSCallerSaved); | 1378 ASSERT(i == kNumJSCallerSaved); |
1379 } | 1379 } |
1380 int reg_code[kNumJSCallerSaved]; | 1380 int reg_code[kNumJSCallerSaved]; |
1381 }; | 1381 }; |
1382 | 1382 |
1383 | 1383 |
1384 static LazyInstance<JSCallerSavedCodeData>::type caller_saved_code_data = | 1384 static LazyInstance< |
1385 LAZY_INSTANCE_INITIALIZER; | 1385 JSCallerSavedCodeData, |
| 1386 DefaultConstructTrait<JSCallerSavedCodeData>, |
| 1387 SingleThreadInitOnceTrait>::type caller_saved_code_data = |
| 1388 LAZY_INSTANCE_INITIALIZER; |
1386 | 1389 |
1387 int JSCallerSavedCode(int n) { | 1390 int JSCallerSavedCode(int n) { |
1388 ASSERT(0 <= n && n < kNumJSCallerSaved); | 1391 ASSERT(0 <= n && n < kNumJSCallerSaved); |
1389 return caller_saved_code_data.Get().reg_code[n]; | 1392 return caller_saved_code_data.Get().reg_code[n]; |
1390 } | 1393 } |
1391 | 1394 |
1392 | 1395 |
1393 #define DEFINE_WRAPPER(type, field) \ | 1396 #define DEFINE_WRAPPER(type, field) \ |
1394 class field##_Wrapper : public ZoneObject { \ | 1397 class field##_Wrapper : public ZoneObject { \ |
1395 public: /* NOLINT */ \ | 1398 public: /* NOLINT */ \ |
(...skipping 24 matching lines...) Expand all Loading... |
1420 ZoneList<StackFrame*> list(10); | 1423 ZoneList<StackFrame*> list(10); |
1421 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1424 for (StackFrameIterator it; !it.done(); it.Advance()) { |
1422 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1425 StackFrame* frame = AllocateFrameCopy(it.frame()); |
1423 list.Add(frame); | 1426 list.Add(frame); |
1424 } | 1427 } |
1425 return list.ToVector(); | 1428 return list.ToVector(); |
1426 } | 1429 } |
1427 | 1430 |
1428 | 1431 |
1429 } } // namespace v8::internal | 1432 } } // namespace v8::internal |
OLD | NEW |