| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 if ((scope->num_parameters() + 1) > parameter_limit) { | 347 if ((scope->num_parameters() + 1) > parameter_limit) { |
| 348 return AbortAndDisableOptimization(kTooManyParameters); | 348 return AbortAndDisableOptimization(kTooManyParameters); |
| 349 } | 349 } |
| 350 | 350 |
| 351 const int locals_limit = LUnallocated::kMaxFixedSlotIndex; | 351 const int locals_limit = LUnallocated::kMaxFixedSlotIndex; |
| 352 if (info()->is_osr() && | 352 if (info()->is_osr() && |
| 353 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit) { | 353 scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit) { |
| 354 return AbortAndDisableOptimization(kTooManyParametersLocals); | 354 return AbortAndDisableOptimization(kTooManyParametersLocals); |
| 355 } | 355 } |
| 356 | 356 |
| 357 if (scope->HasIllegalRedeclaration()) { |
| 358 return AbortAndDisableOptimization(kFunctionWithIllegalRedeclaration); |
| 359 } |
| 360 |
| 357 // Take --hydrogen-filter into account. | 361 // Take --hydrogen-filter into account. |
| 358 if (!info()->closure()->PassesFilter(FLAG_hydrogen_filter)) { | 362 if (!info()->closure()->PassesFilter(FLAG_hydrogen_filter)) { |
| 359 return AbortOptimization(kHydrogenFilter); | 363 return AbortOptimization(kHydrogenFilter); |
| 360 } | 364 } |
| 361 | 365 |
| 362 // Recompile the unoptimized version of the code if the current version | 366 // Recompile the unoptimized version of the code if the current version |
| 363 // doesn't have deoptimization support. Alternatively, we may decide to | 367 // doesn't have deoptimization support. Alternatively, we may decide to |
| 364 // run the full code generator to get a baseline for the compile-time | 368 // run the full code generator to get a baseline for the compile-time |
| 365 // performance of the hydrogen-based compiler. | 369 // performance of the hydrogen-based compiler. |
| 366 bool should_recompile = !info()->shared_info()->has_deoptimization_support(); | 370 bool should_recompile = !info()->shared_info()->has_deoptimization_support(); |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 AllowHandleDereference allow_deref; | 1310 AllowHandleDereference allow_deref; |
| 1307 bool tracing_on = info()->IsStub() | 1311 bool tracing_on = info()->IsStub() |
| 1308 ? FLAG_trace_hydrogen_stubs | 1312 ? FLAG_trace_hydrogen_stubs |
| 1309 : (FLAG_trace_hydrogen && | 1313 : (FLAG_trace_hydrogen && |
| 1310 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1314 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
| 1311 return (tracing_on && | 1315 return (tracing_on && |
| 1312 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1316 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1313 } | 1317 } |
| 1314 | 1318 |
| 1315 } } // namespace v8::internal | 1319 } } // namespace v8::internal |
| OLD | NEW |