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

Side by Side Diff: src/bootstrapper.cc

Issue 184403002: 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 1757 Handle<String> data_string(factory()->InternalizeOneByteString(
1759 STATIC_ASCII_VECTOR("data"))); 1758 STATIC_ASCII_VECTOR("data")));
1760 Handle<Foreign> script_data(factory()->NewForeign(&Accessors::ScriptData));
1761 Handle<String> type_string(factory()->InternalizeOneByteString( 1759 Handle<String> type_string(factory()->InternalizeOneByteString(
1762 STATIC_ASCII_VECTOR("type"))); 1760 STATIC_ASCII_VECTOR("type")));
1763 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType)); 1761 Handle<Foreign> script_type(factory()->NewForeign(&Accessors::ScriptType));
1764 Handle<String> compilation_type_string( 1762 Handle<String> compilation_type_string(
1765 factory()->InternalizeOneByteString( 1763 factory()->InternalizeOneByteString(
1766 STATIC_ASCII_VECTOR("compilation_type"))); 1764 STATIC_ASCII_VECTOR("compilation_type")));
1767 Handle<Foreign> script_compilation_type( 1765 Handle<Foreign> script_compilation_type(
1768 factory()->NewForeign(&Accessors::ScriptCompilationType)); 1766 factory()->NewForeign(&Accessors::ScriptCompilationType));
1769 Handle<String> line_ends_string(factory()->InternalizeOneByteString( 1767 Handle<String> line_ends_string(factory()->InternalizeOneByteString(
1770 STATIC_ASCII_VECTOR("line_ends"))); 1768 STATIC_ASCII_VECTOR("line_ends")));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 script_map->AppendDescriptor(&d, witness); 1813 script_map->AppendDescriptor(&d, witness);
1816 } 1814 }
1817 1815
1818 { 1816 {
1819 CallbacksDescriptor d( 1817 CallbacksDescriptor d(
1820 *column_offset_string, *script_column_offset, attribs); 1818 *column_offset_string, *script_column_offset, attribs);
1821 script_map->AppendDescriptor(&d, witness); 1819 script_map->AppendDescriptor(&d, witness);
1822 } 1820 }
1823 1821
1824 { 1822 {
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); 1823 CallbacksDescriptor d(*type_string, *script_type, attribs);
1831 script_map->AppendDescriptor(&d, witness); 1824 script_map->AppendDescriptor(&d, witness);
1832 } 1825 }
1833 1826
1834 { 1827 {
1835 CallbacksDescriptor d( 1828 CallbacksDescriptor d(
1836 *compilation_type_string, *script_compilation_type, attribs); 1829 *compilation_type_string, *script_compilation_type, attribs);
1837 script_map->AppendDescriptor(&d, witness); 1830 script_map->AppendDescriptor(&d, witness);
1838 } 1831 }
1839 1832
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 return from + sizeof(NestingCounterType); 2739 return from + sizeof(NestingCounterType);
2747 } 2740 }
2748 2741
2749 2742
2750 // Called when the top-level V8 mutex is destroyed. 2743 // Called when the top-level V8 mutex is destroyed.
2751 void Bootstrapper::FreeThreadResources() { 2744 void Bootstrapper::FreeThreadResources() {
2752 ASSERT(!IsActive()); 2745 ASSERT(!IsActive());
2753 } 2746 }
2754 2747
2755 } } // namespace v8::internal 2748 } } // 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