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

Side by Side Diff: src/api.cc

Issue 110203002: Refactor the compiling pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years 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/accessors.cc ('k') | src/arm/builtins-arm.cc » ('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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 i::ScriptDataImpl* pre_data_impl = 1806 i::ScriptDataImpl* pre_data_impl =
1807 static_cast<i::ScriptDataImpl*>(pre_data); 1807 static_cast<i::ScriptDataImpl*>(pre_data);
1808 // We assert that the pre-data is sane, even though we can actually 1808 // We assert that the pre-data is sane, even though we can actually
1809 // handle it if it turns out not to be in release mode. 1809 // handle it if it turns out not to be in release mode.
1810 ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck()); 1810 ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck());
1811 // If the pre-data isn't sane we simply ignore it 1811 // If the pre-data isn't sane we simply ignore it
1812 if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) { 1812 if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) {
1813 pre_data_impl = NULL; 1813 pre_data_impl = NULL;
1814 } 1814 }
1815 i::Handle<i::SharedFunctionInfo> result = 1815 i::Handle<i::SharedFunctionInfo> result =
1816 i::Compiler::Compile(str, 1816 i::Compiler::CompileScript(str,
1817 name_obj, 1817 name_obj,
1818 line_offset, 1818 line_offset,
1819 column_offset, 1819 column_offset,
1820 is_shared_cross_origin, 1820 is_shared_cross_origin,
1821 isolate->global_context(), 1821 isolate->global_context(),
1822 NULL, 1822 NULL,
1823 pre_data_impl, 1823 pre_data_impl,
1824 Utils::OpenHandle(*script_data, true), 1824 Utils::OpenHandle(*script_data, true),
1825 i::NOT_NATIVES_CODE); 1825 i::NOT_NATIVES_CODE);
1826 has_pending_exception = result.is_null(); 1826 has_pending_exception = result.is_null();
1827 EXCEPTION_BAILOUT_CHECK(isolate, Local<Script>()); 1827 EXCEPTION_BAILOUT_CHECK(isolate, Local<Script>());
1828 raw_result = *result; 1828 raw_result = *result;
1829 } 1829 }
1830 i::Handle<i::SharedFunctionInfo> result(raw_result, isolate); 1830 i::Handle<i::SharedFunctionInfo> result(raw_result, isolate);
1831 return ToApiHandle<Script>(result); 1831 return ToApiHandle<Script>(result);
1832 } 1832 }
1833 1833
1834 1834
1835 Local<Script> Script::New(v8::Handle<String> source, 1835 Local<Script> Script::New(v8::Handle<String> source,
(...skipping 5943 matching lines...) Expand 10 before | Expand all | Expand 10 after
7779 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7779 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7780 Address callback_address = 7780 Address callback_address =
7781 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7781 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7782 VMState<EXTERNAL> state(isolate); 7782 VMState<EXTERNAL> state(isolate);
7783 ExternalCallbackScope call_scope(isolate, callback_address); 7783 ExternalCallbackScope call_scope(isolate, callback_address);
7784 callback(info); 7784 callback(info);
7785 } 7785 }
7786 7786
7787 7787
7788 } } // namespace v8::internal 7788 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698