| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 // because then we know that we want to optimize the function. | 1295 // because then we know that we want to optimize the function. |
| 1296 if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) { | 1296 if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) { |
| 1297 return result; | 1297 return result; |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 // Compile now with optimization. | 1300 // Compile now with optimization. |
| 1301 HandleScope scope; | 1301 HandleScope scope; |
| 1302 Handle<JSFunction> function = Handle<JSFunction>(JSFunction::cast(result)); | 1302 Handle<JSFunction> function = Handle<JSFunction>(JSFunction::cast(result)); |
| 1303 InLoopFlag in_loop = ic.target()->ic_in_loop(); | 1303 InLoopFlag in_loop = ic.target()->ic_in_loop(); |
| 1304 if (in_loop == IN_LOOP) { | 1304 if (in_loop == IN_LOOP) { |
| 1305 CompileLazyInLoop(function, CLEAR_EXCEPTION); | 1305 CompileLazyInLoop(function, args.at<Object>(0), CLEAR_EXCEPTION); |
| 1306 } else { | 1306 } else { |
| 1307 CompileLazy(function, CLEAR_EXCEPTION); | 1307 CompileLazy(function, args.at<Object>(0), CLEAR_EXCEPTION); |
| 1308 } | 1308 } |
| 1309 return *function; | 1309 return *function; |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 | 1312 |
| 1313 // Used from ic_<arch>.cc. | 1313 // Used from ic_<arch>.cc. |
| 1314 Object* LoadIC_Miss(Arguments args) { | 1314 Object* LoadIC_Miss(Arguments args) { |
| 1315 NoHandleAllocation na; | 1315 NoHandleAllocation na; |
| 1316 ASSERT(args.length() == 2); | 1316 ASSERT(args.length() == 2); |
| 1317 LoadIC ic; | 1317 LoadIC ic; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 #undef ADDR | 1433 #undef ADDR |
| 1434 }; | 1434 }; |
| 1435 | 1435 |
| 1436 | 1436 |
| 1437 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1437 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 1438 return IC_utilities[id]; | 1438 return IC_utilities[id]; |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 | 1441 |
| 1442 } } // namespace v8::internal | 1442 } } // namespace v8::internal |
| OLD | NEW |