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

Side by Side Diff: src/frames.cc

Issue 9638018: [v8-dev] Optimise Math.floor(x/y) to use integer division for specific divisor.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 8 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
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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 int n = 0; 1362 return CompilerIntrinsics::CountSetBits(reglist);
1363 while (reglist != 0) {
1364 n++;
1365 reglist &= reglist - 1; // clear one bit
1366 }
1367 return n;
1368 } 1363 }
1369 1364
1370 1365
1371 struct JSCallerSavedCodeData { 1366 struct JSCallerSavedCodeData {
1372 JSCallerSavedCodeData() { 1367 JSCallerSavedCodeData() {
1373 int i = 0; 1368 int i = 0;
1374 for (int r = 0; r < kNumRegs; r++) 1369 for (int r = 0; r < kNumRegs; r++)
1375 if ((kJSCallerSaved & (1 << r)) != 0) 1370 if ((kJSCallerSaved & (1 << r)) != 0)
1376 reg_code[i++] = r; 1371 reg_code[i++] = r;
1377 1372
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 ZoneList<StackFrame*> list(10); 1415 ZoneList<StackFrame*> list(10);
1421 for (StackFrameIterator it; !it.done(); it.Advance()) { 1416 for (StackFrameIterator it; !it.done(); it.Advance()) {
1422 StackFrame* frame = AllocateFrameCopy(it.frame()); 1417 StackFrame* frame = AllocateFrameCopy(it.frame());
1423 list.Add(frame); 1418 list.Add(frame);
1424 } 1419 }
1425 return list.ToVector(); 1420 return list.ToVector();
1426 } 1421 }
1427 1422
1428 1423
1429 } } // namespace v8::internal 1424 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698