| 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 if (FLAG_harmony_generators && | 2073 if (FLAG_harmony_generators && |
| 2073 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2074 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2074 "native generator.js") == 0) { | 2075 "native generator.js") == 0) { |
| 2075 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2076 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2076 } | 2077 } |
| 2077 if (FLAG_harmony_iteration && | 2078 if (FLAG_harmony_iteration && |
| 2078 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2079 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2079 "native array-iterator.js") == 0) { | 2080 "native array-iterator.js") == 0) { |
| 2080 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2081 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2081 } | 2082 } |
| 2083 if (FLAG_harmony_strings && |
| 2084 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2085 "native harmony-string.js") == 0) { |
| 2086 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2087 } |
| 2082 } | 2088 } |
| 2083 | 2089 |
| 2084 InstallExperimentalNativeFunctions(); | 2090 InstallExperimentalNativeFunctions(); |
| 2085 | 2091 |
| 2086 return true; | 2092 return true; |
| 2087 } | 2093 } |
| 2088 | 2094 |
| 2089 | 2095 |
| 2090 static Handle<JSObject> ResolveBuiltinIdHolder( | 2096 static Handle<JSObject> ResolveBuiltinIdHolder( |
| 2091 Handle<Context> native_context, | 2097 Handle<Context> native_context, |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 return from + sizeof(NestingCounterType); | 2682 return from + sizeof(NestingCounterType); |
| 2677 } | 2683 } |
| 2678 | 2684 |
| 2679 | 2685 |
| 2680 // Called when the top-level V8 mutex is destroyed. | 2686 // Called when the top-level V8 mutex is destroyed. |
| 2681 void Bootstrapper::FreeThreadResources() { | 2687 void Bootstrapper::FreeThreadResources() { |
| 2682 ASSERT(!IsActive()); | 2688 ASSERT(!IsActive()); |
| 2683 } | 2689 } |
| 2684 | 2690 |
| 2685 } } // namespace v8::internal | 2691 } } // namespace v8::internal |
| OLD | NEW |