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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 entry->safepoint_entry.Reset(); | 1352 entry->safepoint_entry.Reset(); |
1353 entry->inner_pointer = inner_pointer; | 1353 entry->inner_pointer = inner_pointer; |
1354 } | 1354 } |
1355 return entry; | 1355 return entry; |
1356 } | 1356 } |
1357 | 1357 |
1358 | 1358 |
1359 // ------------------------------------------------------------------------- | 1359 // ------------------------------------------------------------------------- |
1360 | 1360 |
1361 int NumRegs(RegList reglist) { | 1361 int NumRegs(RegList reglist) { |
1362 return CompilerIntrinsics::CountSetBits(reglist); | 1362 int n = 0; |
| 1363 while (reglist != 0) { |
| 1364 n++; |
| 1365 reglist &= reglist - 1; // clear one bit |
| 1366 } |
| 1367 return n; |
1363 } | 1368 } |
1364 | 1369 |
1365 | 1370 |
1366 struct JSCallerSavedCodeData { | 1371 struct JSCallerSavedCodeData { |
1367 int reg_code[kNumJSCallerSaved]; | 1372 int reg_code[kNumJSCallerSaved]; |
1368 }; | 1373 }; |
1369 | 1374 |
1370 JSCallerSavedCodeData caller_saved_code_data; | 1375 JSCallerSavedCodeData caller_saved_code_data; |
1371 | 1376 |
1372 void SetUpJSCallerSavedCodeData() { | 1377 void SetUpJSCallerSavedCodeData() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 ZoneList<StackFrame*> list(10); | 1419 ZoneList<StackFrame*> list(10); |
1415 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1420 for (StackFrameIterator it; !it.done(); it.Advance()) { |
1416 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1421 StackFrame* frame = AllocateFrameCopy(it.frame()); |
1417 list.Add(frame); | 1422 list.Add(frame); |
1418 } | 1423 } |
1419 return list.ToVector(); | 1424 return list.ToVector(); |
1420 } | 1425 } |
1421 | 1426 |
1422 | 1427 |
1423 } } // namespace v8::internal | 1428 } } // namespace v8::internal |
OLD | NEW |