Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Side by Side Diff: src/bootstrapper.cc

Issue 181113008: Revert "Remove Script::SetData and the script_data parameter from Script::(Compile|New)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/compiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 Handle<String> script_name = factory->NewStringFromUtf8(name); 1513 Handle<String> script_name = factory->NewStringFromUtf8(name);
1514 function_info = Compiler::CompileScript( 1514 function_info = Compiler::CompileScript(
1515 source, 1515 source,
1516 script_name, 1516 script_name,
1517 0, 1517 0,
1518 0, 1518 0,
1519 false, 1519 false,
1520 top_context, 1520 top_context,
1521 extension, 1521 extension,
1522 NULL, 1522 NULL,
1523 Handle<String>::null(),
1523 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); 1524 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE);
1524 if (function_info.is_null()) return false; 1525 if (function_info.is_null()) return false;
1525 if (cache != NULL) cache->Add(name, function_info); 1526 if (cache != NULL) cache->Add(name, function_info);
1526 } 1527 }
1527 1528
1528 // Set up the function context. Conceptually, we should clone the 1529 // Set up the function context. Conceptually, we should clone the
1529 // function before overwriting the context but since we're in a 1530 // function before overwriting the context but since we're in a
1530 // single-threaded environment it is not strictly necessary. 1531 // single-threaded environment it is not strictly necessary.
1531 ASSERT(top_context->IsNativeContext()); 1532 ASSERT(top_context->IsNativeContext());
1532 Handle<Context> context = 1533 Handle<Context> context =
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 STATIC_ASCII_VECTOR("line_offset"))); 1750 STATIC_ASCII_VECTOR("line_offset")));
1750 Handle<Foreign> script_line_offset( 1751 Handle<Foreign> script_line_offset(
1751 factory()->NewForeign(&Accessors::ScriptLineOffset)); 1752 factory()->NewForeign(&Accessors::ScriptLineOffset));
1752 Handle<String> column_offset_string( 1753 Handle<String> column_offset_string(
1753 factory()->InternalizeOneByteString( 1754 factory()->InternalizeOneByteString(
1754 STATIC_ASCII_VECTOR("column_offset"))); 1755 STATIC_ASCII_VECTOR("column_offset")));
1755 Handle<Foreign> script_column_offset( 1756 Handle<Foreign> script_column_offset(
1756 factory()->NewForeign(&Accessors::ScriptColumnOffset)); 1757 factory()->NewForeign(&Accessors::ScriptColumnOffset));
1757 Handle<String> data_string(factory()->InternalizeOneByteString( 1758 Handle<String> data_string(factory()->InternalizeOneByteString(
1758 STATIC_ASCII_VECTOR("data"))); 1759 STATIC_ASCII_VECTOR("data")));
1760 Handle<Foreign> script_data(factory()->NewForeign(&Accessors::ScriptData));
1759 Handle<String> type_string(factory()->InternalizeOneByteString( 1761 Handle<String> type_string(factory()->InternalizeOneByteString(
1760 STATIC_ASCII_VECTOR("type"))); 1762 STATIC_ASCII_VECTOR("type")));
1761 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType)); 1763 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType));
1762 Handle<String> compilation_type_string( 1764 Handle<String> compilation_type_string(
1763 factory()->InternalizeOneByteString( 1765 factory()->InternalizeOneByteString(
1764 STATIC_ASCII_VECTOR("compilation_type"))); 1766 STATIC_ASCII_VECTOR("compilation_type")));
1765 Handle<Foreign> script_compilation_type( 1767 Handle<Foreign> script_compilation_type(
1766 factory()->NewForeign(&Accessors::ScriptCompilationType)); 1768 factory()->NewForeign(&Accessors::ScriptCompilationType));
1767 Handle<String> line_ends_string(factory()->InternalizeOneByteString( 1769 Handle<String> line_ends_string(factory()->InternalizeOneByteString(
1768 STATIC_ASCII_VECTOR("line_ends"))); 1770 STATIC_ASCII_VECTOR("line_ends")));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 script_map->AppendDescriptor(&d, witness); 1815 script_map->AppendDescriptor(&d, witness);
1814 } 1816 }
1815 1817
1816 { 1818 {
1817 CallbacksDescriptor d( 1819 CallbacksDescriptor d(
1818 *column_offset_string, *script_column_offset, attribs); 1820 *column_offset_string, *script_column_offset, attribs);
1819 script_map->AppendDescriptor(&d, witness); 1821 script_map->AppendDescriptor(&d, witness);
1820 } 1822 }
1821 1823
1822 { 1824 {
1825 CallbacksDescriptor d(*data_string, *script_data, attribs);
1826 script_map->AppendDescriptor(&d, witness);
1827 }
1828
1829 {
1823 CallbacksDescriptor d(*type_string, *script_type, attribs); 1830 CallbacksDescriptor d(*type_string, *script_type, attribs);
1824 script_map->AppendDescriptor(&d, witness); 1831 script_map->AppendDescriptor(&d, witness);
1825 } 1832 }
1826 1833
1827 { 1834 {
1828 CallbacksDescriptor d( 1835 CallbacksDescriptor d(
1829 *compilation_type_string, *script_compilation_type, attribs); 1836 *compilation_type_string, *script_compilation_type, attribs);
1830 script_map->AppendDescriptor(&d, witness); 1837 script_map->AppendDescriptor(&d, witness);
1831 } 1838 }
1832 1839
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 return from + sizeof(NestingCounterType); 2746 return from + sizeof(NestingCounterType);
2740 } 2747 }
2741 2748
2742 2749
2743 // Called when the top-level V8 mutex is destroyed. 2750 // Called when the top-level V8 mutex is destroyed.
2744 void Bootstrapper::FreeThreadResources() { 2751 void Bootstrapper::FreeThreadResources() {
2745 ASSERT(!IsActive()); 2752 ASSERT(!IsActive());
2746 } 2753 }
2747 2754
2748 } } // namespace v8::internal 2755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698