| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 Handle<SharedFunctionInfo> function_info, | 530 Handle<SharedFunctionInfo> function_info, |
| 531 Handle<Context> context, | 531 Handle<Context> context, |
| 532 PretenureFlag pretenure) { | 532 PretenureFlag pretenure) { |
| 533 Handle<JSFunction> result = BaseNewFunctionFromSharedFunctionInfo( | 533 Handle<JSFunction> result = BaseNewFunctionFromSharedFunctionInfo( |
| 534 function_info, | 534 function_info, |
| 535 function_info->is_classic_mode() | 535 function_info->is_classic_mode() |
| 536 ? isolate()->function_map() | 536 ? isolate()->function_map() |
| 537 : isolate()->strict_mode_function_map(), | 537 : isolate()->strict_mode_function_map(), |
| 538 pretenure); | 538 pretenure); |
| 539 | 539 |
| 540 if (function_info->ic_age() != isolate()->heap()->global_ic_age()) { |
| 541 function_info->ResetForNewContext(isolate()->heap()->global_ic_age()); |
| 542 } |
| 543 |
| 540 result->set_context(*context); | 544 result->set_context(*context); |
| 541 if (!function_info->bound()) { | 545 if (!function_info->bound()) { |
| 542 int number_of_literals = function_info->num_literals(); | 546 int number_of_literals = function_info->num_literals(); |
| 543 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); | 547 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); |
| 544 if (number_of_literals > 0) { | 548 if (number_of_literals > 0) { |
| 545 // Store the object, regexp and array functions in the literals | 549 // Store the object, regexp and array functions in the literals |
| 546 // array prefix. These functions will be used when creating | 550 // array prefix. These functions will be used when creating |
| 547 // object, regexp and array literals in this function. | 551 // object, regexp and array literals in this function. |
| 548 literals->set(JSFunction::kLiteralGlobalContextIndex, | 552 literals->set(JSFunction::kLiteralGlobalContextIndex, |
| 549 context->global_context()); | 553 context->global_context()); |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 | 1425 |
| 1422 | 1426 |
| 1423 Handle<Object> Factory::ToBoolean(bool value) { | 1427 Handle<Object> Factory::ToBoolean(bool value) { |
| 1424 return Handle<Object>(value | 1428 return Handle<Object>(value |
| 1425 ? isolate()->heap()->true_value() | 1429 ? isolate()->heap()->true_value() |
| 1426 : isolate()->heap()->false_value()); | 1430 : isolate()->heap()->false_value()); |
| 1427 } | 1431 } |
| 1428 | 1432 |
| 1429 | 1433 |
| 1430 } } // namespace v8::internal | 1434 } } // namespace v8::internal |
| OLD | NEW |