| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 } | 502 } |
| 503 | 503 |
| 504 script->set_data(script_data.is_null() ? HEAP->undefined_value() | 504 script->set_data(script_data.is_null() ? HEAP->undefined_value() |
| 505 : *script_data); | 505 : *script_data); |
| 506 | 506 |
| 507 // Compile the function and add it to the cache. | 507 // Compile the function and add it to the cache. |
| 508 CompilationInfo info(script); | 508 CompilationInfo info(script); |
| 509 info.MarkAsGlobal(); | 509 info.MarkAsGlobal(); |
| 510 info.SetExtension(extension); | 510 info.SetExtension(extension); |
| 511 info.SetPreParseData(pre_data); | 511 info.SetPreParseData(pre_data); |
| 512 if (natives == NATIVES_CODE) { | |
| 513 info.MarkAsAllowingNativesSyntax(); | |
| 514 } | |
| 515 result = MakeFunctionInfo(&info); | 512 result = MakeFunctionInfo(&info); |
| 516 if (extension == NULL && !result.is_null()) { | 513 if (extension == NULL && !result.is_null()) { |
| 517 compilation_cache->PutScript(source, result); | 514 compilation_cache->PutScript(source, result); |
| 518 } | 515 } |
| 519 | 516 |
| 520 // Get rid of the pre-parsing data (if necessary). | 517 // Get rid of the pre-parsing data (if necessary). |
| 521 if (input_pre_data == NULL && pre_data != NULL) { | 518 if (input_pre_data == NULL && pre_data != NULL) { |
| 522 delete pre_data; | 519 delete pre_data; |
| 523 } | 520 } |
| 524 } | 521 } |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 } | 779 } |
| 783 } | 780 } |
| 784 | 781 |
| 785 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 782 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
| 786 Handle<Script>(info->script()), | 783 Handle<Script>(info->script()), |
| 787 Handle<Code>(info->code()), | 784 Handle<Code>(info->code()), |
| 788 info)); | 785 info)); |
| 789 } | 786 } |
| 790 | 787 |
| 791 } } // namespace v8::internal | 788 } } // namespace v8::internal |
| OLD | NEW |