| 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 // If we can't find the function in the cache, we compile a new | 1340 // If we can't find the function in the cache, we compile a new |
| 1341 // function and insert it into the cache. | 1341 // function and insert it into the cache. |
| 1342 if (cache == NULL || !cache->Lookup(name, &function_info)) { | 1342 if (cache == NULL || !cache->Lookup(name, &function_info)) { |
| 1343 ASSERT(source->IsAsciiRepresentation()); | 1343 ASSERT(source->IsAsciiRepresentation()); |
| 1344 Handle<String> script_name = factory->NewStringFromUtf8(name); | 1344 Handle<String> script_name = factory->NewStringFromUtf8(name); |
| 1345 function_info = Compiler::Compile( | 1345 function_info = Compiler::Compile( |
| 1346 source, | 1346 source, |
| 1347 script_name, | 1347 script_name, |
| 1348 0, | 1348 0, |
| 1349 0, | 1349 0, |
| 1350 top_context, |
| 1350 extension, | 1351 extension, |
| 1351 NULL, | 1352 NULL, |
| 1352 Handle<String>::null(), | 1353 Handle<String>::null(), |
| 1353 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); | 1354 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); |
| 1354 if (function_info.is_null()) return false; | 1355 if (function_info.is_null()) return false; |
| 1355 if (cache != NULL) cache->Add(name, function_info); | 1356 if (cache != NULL) cache->Add(name, function_info); |
| 1356 } | 1357 } |
| 1357 | 1358 |
| 1358 // Set up the function context. Conceptually, we should clone the | 1359 // Set up the function context. Conceptually, we should clone the |
| 1359 // function before overwriting the context but since we're in a | 1360 // function before overwriting the context but since we're in a |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2394 return from + sizeof(NestingCounterType); | 2395 return from + sizeof(NestingCounterType); |
| 2395 } | 2396 } |
| 2396 | 2397 |
| 2397 | 2398 |
| 2398 // Called when the top-level V8 mutex is destroyed. | 2399 // Called when the top-level V8 mutex is destroyed. |
| 2399 void Bootstrapper::FreeThreadResources() { | 2400 void Bootstrapper::FreeThreadResources() { |
| 2400 ASSERT(!IsActive()); | 2401 ASSERT(!IsActive()); |
| 2401 } | 2402 } |
| 2402 | 2403 |
| 2403 } } // namespace v8::internal | 2404 } } // namespace v8::internal |
| OLD | NEW |