| 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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 // If we can't find the function in the cache, we compile a new | 1518 // If we can't find the function in the cache, we compile a new |
| 1519 // function and insert it into the cache. | 1519 // function and insert it into the cache. |
| 1520 if (cache == NULL || !cache->Lookup(name, &function_info)) { | 1520 if (cache == NULL || !cache->Lookup(name, &function_info)) { |
| 1521 ASSERT(source->IsOneByteRepresentation()); | 1521 ASSERT(source->IsOneByteRepresentation()); |
| 1522 Handle<String> script_name = factory->NewStringFromUtf8(name); | 1522 Handle<String> script_name = factory->NewStringFromUtf8(name); |
| 1523 function_info = Compiler::Compile( | 1523 function_info = Compiler::Compile( |
| 1524 source, | 1524 source, |
| 1525 script_name, | 1525 script_name, |
| 1526 0, | 1526 0, |
| 1527 0, | 1527 0, |
| 1528 false, |
| 1528 top_context, | 1529 top_context, |
| 1529 extension, | 1530 extension, |
| 1530 NULL, | 1531 NULL, |
| 1531 Handle<String>::null(), | 1532 Handle<String>::null(), |
| 1532 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); | 1533 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); |
| 1533 if (function_info.is_null()) return false; | 1534 if (function_info.is_null()) return false; |
| 1534 if (cache != NULL) cache->Add(name, function_info); | 1535 if (cache != NULL) cache->Add(name, function_info); |
| 1535 } | 1536 } |
| 1536 | 1537 |
| 1537 // Set up the function context. Conceptually, we should clone the | 1538 // Set up the function context. Conceptually, we should clone the |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2674 return from + sizeof(NestingCounterType); | 2675 return from + sizeof(NestingCounterType); |
| 2675 } | 2676 } |
| 2676 | 2677 |
| 2677 | 2678 |
| 2678 // Called when the top-level V8 mutex is destroyed. | 2679 // Called when the top-level V8 mutex is destroyed. |
| 2679 void Bootstrapper::FreeThreadResources() { | 2680 void Bootstrapper::FreeThreadResources() { |
| 2680 ASSERT(!IsActive()); | 2681 ASSERT(!IsActive()); |
| 2681 } | 2682 } |
| 2682 | 2683 |
| 2683 } } // namespace v8::internal | 2684 } } // namespace v8::internal |
| OLD | NEW |