| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 } | 518 } |
| 519 | 519 |
| 520 script->set_data(script_data.is_null() ? HEAP->undefined_value() | 520 script->set_data(script_data.is_null() ? HEAP->undefined_value() |
| 521 : *script_data); | 521 : *script_data); |
| 522 | 522 |
| 523 // Compile the function and add it to the cache. | 523 // Compile the function and add it to the cache. |
| 524 CompilationInfo info(script); | 524 CompilationInfo info(script); |
| 525 info.MarkAsGlobal(); | 525 info.MarkAsGlobal(); |
| 526 info.SetExtension(extension); | 526 info.SetExtension(extension); |
| 527 info.SetPreParseData(pre_data); | 527 info.SetPreParseData(pre_data); |
| 528 if (natives == NATIVES_CODE) info.MarkAsAllowingNativesSyntax(); | |
| 529 result = MakeFunctionInfo(&info); | 528 result = MakeFunctionInfo(&info); |
| 530 if (extension == NULL && !result.is_null()) { | 529 if (extension == NULL && !result.is_null()) { |
| 531 compilation_cache->PutScript(source, result); | 530 compilation_cache->PutScript(source, result); |
| 532 } | 531 } |
| 533 | 532 |
| 534 // Get rid of the pre-parsing data (if necessary). | 533 // Get rid of the pre-parsing data (if necessary). |
| 535 if (input_pre_data == NULL && pre_data != NULL) { | 534 if (input_pre_data == NULL && pre_data != NULL) { |
| 536 delete pre_data; | 535 delete pre_data; |
| 537 } | 536 } |
| 538 } | 537 } |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 shared->DebugName())); | 790 shared->DebugName())); |
| 792 } | 791 } |
| 793 } | 792 } |
| 794 | 793 |
| 795 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 794 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
| 796 Handle<Script>(info->script()), | 795 Handle<Script>(info->script()), |
| 797 Handle<Code>(info->code()))); | 796 Handle<Code>(info->code()))); |
| 798 } | 797 } |
| 799 | 798 |
| 800 } } // namespace v8::internal | 799 } } // namespace v8::internal |
| OLD | NEW |