| 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 13 matching lines...) Expand all Loading... |
| 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 for (int r = 0; r < kNumRegs; r++) | 1345 for (int r = 0; r < kNumRegs; r++) |
| 1345 if ((kJSCallerSaved & (1 << r)) != 0) | 1346 if ((kJSCallerSaved & (1 << r)) != 0) |
| 1346 reg_code[i++] = r; | 1347 reg_code[i++] = r; |
| 1347 | 1348 |
| 1348 ASSERT(i == kNumJSCallerSaved); | 1349 ASSERT(i == kNumJSCallerSaved); |
| 1349 } | 1350 } |
| 1350 int reg_code[kNumJSCallerSaved]; | 1351 int reg_code[kNumJSCallerSaved]; |
| 1351 }; | 1352 }; |
| 1352 | 1353 |
| 1353 | 1354 |
| 1354 static const JSCallerSavedCodeData kCallerSavedCodeData; | 1355 static LazyInstance<JSCallerSavedCodeData>::type caller_saved_code_data = |
| 1355 | 1356 LAZY_INSTANCE_INITIALIZER; |
| 1356 | 1357 |
| 1357 int JSCallerSavedCode(int n) { | 1358 int JSCallerSavedCode(int n) { |
| 1358 ASSERT(0 <= n && n < kNumJSCallerSaved); | 1359 ASSERT(0 <= n && n < kNumJSCallerSaved); |
| 1359 return kCallerSavedCodeData.reg_code[n]; | 1360 return caller_saved_code_data.Get().reg_code[n]; |
| 1360 } | 1361 } |
| 1361 | 1362 |
| 1362 | 1363 |
| 1363 #define DEFINE_WRAPPER(type, field) \ | 1364 #define DEFINE_WRAPPER(type, field) \ |
| 1364 class field##_Wrapper : public ZoneObject { \ | 1365 class field##_Wrapper : public ZoneObject { \ |
| 1365 public: /* NOLINT */ \ | 1366 public: /* NOLINT */ \ |
| 1366 field##_Wrapper(const field& original) : frame_(original) { \ | 1367 field##_Wrapper(const field& original) : frame_(original) { \ |
| 1367 } \ | 1368 } \ |
| 1368 field frame_; \ | 1369 field frame_; \ |
| 1369 }; | 1370 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1390 ZoneList<StackFrame*> list(10); | 1391 ZoneList<StackFrame*> list(10); |
| 1391 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1392 for (StackFrameIterator it; !it.done(); it.Advance()) { |
| 1392 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1393 StackFrame* frame = AllocateFrameCopy(it.frame()); |
| 1393 list.Add(frame); | 1394 list.Add(frame); |
| 1394 } | 1395 } |
| 1395 return list.ToVector(); | 1396 return list.ToVector(); |
| 1396 } | 1397 } |
| 1397 | 1398 |
| 1398 | 1399 |
| 1399 } } // namespace v8::internal | 1400 } } // namespace v8::internal |
| OLD | NEW |