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

Side by Side Diff: src/bootstrapper.cc

Issue 185533014: 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: rebased 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(),
1524 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); 1523 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE);
1525 if (function_info.is_null()) return false; 1524 if (function_info.is_null()) return false;
1526 if (cache != NULL) cache->Add(name, function_info); 1525 if (cache != NULL) cache->Add(name, function_info);
1527 } 1526 }
1528 1527
1529 // Set up the function context. Conceptually, we should clone the 1528 // Set up the function context. Conceptually, we should clone the
1530 // function before overwriting the context but since we're in a 1529 // function before overwriting the context but since we're in a
1531 // single-threaded environment it is not strictly necessary. 1530 // single-threaded environment it is not strictly necessary.
1532 ASSERT(top_context->IsNativeContext()); 1531 ASSERT(top_context->IsNativeContext());
1533 Handle<Context> context = 1532 Handle<Context> context =
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 Handle<String> line_offset_string( 1747 Handle<String> line_offset_string(
1749 factory()->InternalizeOneByteString( 1748 factory()->InternalizeOneByteString(
1750 STATIC_ASCII_VECTOR("line_offset"))); 1749 STATIC_ASCII_VECTOR("line_offset")));
1751 Handle<Foreign> script_line_offset( 1750 Handle<Foreign> script_line_offset(
1752 factory()->NewForeign(&Accessors::ScriptLineOffset)); 1751 factory()->NewForeign(&Accessors::ScriptLineOffset));
1753 Handle<String> column_offset_string( 1752 Handle<String> column_offset_string(
1754 factory()->InternalizeOneByteString( 1753 factory()->InternalizeOneByteString(
1755 STATIC_ASCII_VECTOR("column_offset"))); 1754 STATIC_ASCII_VECTOR("column_offset")));
1756 Handle<Foreign> script_column_offset( 1755 Handle<Foreign> script_column_offset(
1757 factory()->NewForeign(&Accessors::ScriptColumnOffset)); 1756 factory()->NewForeign(&Accessors::ScriptColumnOffset));
1758 Handle<String> data_string(factory()->InternalizeOneByteString(
1759 STATIC_ASCII_VECTOR("data")));
1760 Handle<Foreign> script_data(factory()->NewForeign(&Accessors::ScriptData));
1761 Handle<String> type_string(factory()->InternalizeOneByteString( 1757 Handle<String> type_string(factory()->InternalizeOneByteString(
1762 STATIC_ASCII_VECTOR("type"))); 1758 STATIC_ASCII_VECTOR("type")));
1763 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType)); 1759 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType));
1764 Handle<String> compilation_type_string( 1760 Handle<String> compilation_type_string(
1765 factory()->InternalizeOneByteString( 1761 factory()->InternalizeOneByteString(
1766 STATIC_ASCII_VECTOR("compilation_type"))); 1762 STATIC_ASCII_VECTOR("compilation_type")));
1767 Handle<Foreign> script_compilation_type( 1763 Handle<Foreign> script_compilation_type(
1768 factory()->NewForeign(&Accessors::ScriptCompilationType)); 1764 factory()->NewForeign(&Accessors::ScriptCompilationType));
1769 Handle<String> line_ends_string(factory()->InternalizeOneByteString( 1765 Handle<String> line_ends_string(factory()->InternalizeOneByteString(
1770 STATIC_ASCII_VECTOR("line_ends"))); 1766 STATIC_ASCII_VECTOR("line_ends")));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 script_map->AppendDescriptor(&d, witness); 1811 script_map->AppendDescriptor(&d, witness);
1816 } 1812 }
1817 1813
1818 { 1814 {
1819 CallbacksDescriptor d( 1815 CallbacksDescriptor d(
1820 *column_offset_string, *script_column_offset, attribs); 1816 *column_offset_string, *script_column_offset, attribs);
1821 script_map->AppendDescriptor(&d, witness); 1817 script_map->AppendDescriptor(&d, witness);
1822 } 1818 }
1823 1819
1824 { 1820 {
1825 CallbacksDescriptor d(*data_string, *script_data, attribs);
1826 script_map->AppendDescriptor(&d, witness);
1827 }
1828
1829 {
1830 CallbacksDescriptor d(*type_string, *script_type, attribs); 1821 CallbacksDescriptor d(*type_string, *script_type, attribs);
1831 script_map->AppendDescriptor(&d, witness); 1822 script_map->AppendDescriptor(&d, witness);
1832 } 1823 }
1833 1824
1834 { 1825 {
1835 CallbacksDescriptor d( 1826 CallbacksDescriptor d(
1836 *compilation_type_string, *script_compilation_type, attribs); 1827 *compilation_type_string, *script_compilation_type, attribs);
1837 script_map->AppendDescriptor(&d, witness); 1828 script_map->AppendDescriptor(&d, witness);
1838 } 1829 }
1839 1830
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 return from + sizeof(NestingCounterType); 2737 return from + sizeof(NestingCounterType);
2747 } 2738 }
2748 2739
2749 2740
2750 // Called when the top-level V8 mutex is destroyed. 2741 // Called when the top-level V8 mutex is destroyed.
2751 void Bootstrapper::FreeThreadResources() { 2742 void Bootstrapper::FreeThreadResources() {
2752 ASSERT(!IsActive()); 2743 ASSERT(!IsActive());
2753 } 2744 }
2754 2745
2755 } } // namespace v8::internal 2746 } } // 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