OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 EXCEPTION_PREAMBLE(); | 1130 EXCEPTION_PREAMBLE(); |
1131 i::ScriptDataImpl* pre_data_impl = static_cast<i::ScriptDataImpl*>(pre_data); | 1131 i::ScriptDataImpl* pre_data_impl = static_cast<i::ScriptDataImpl*>(pre_data); |
1132 // We assert that the pre-data is sane, even though we can actually | 1132 // We assert that the pre-data is sane, even though we can actually |
1133 // handle it if it turns out not to be in release mode. | 1133 // handle it if it turns out not to be in release mode. |
1134 ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck()); | 1134 ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck()); |
1135 // If the pre-data isn't sane we simply ignore it | 1135 // If the pre-data isn't sane we simply ignore it |
1136 if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) { | 1136 if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) { |
1137 pre_data_impl = NULL; | 1137 pre_data_impl = NULL; |
1138 } | 1138 } |
1139 i::Handle<i::JSFunction> boilerplate = | 1139 i::Handle<i::JSFunction> boilerplate = |
1140 i::Compiler::Compile(str, name_obj, line_offset, column_offset, NULL, | 1140 i::Compiler::Compile(str, |
1141 pre_data_impl, Utils::OpenHandle(*script_data)); | 1141 name_obj, |
| 1142 line_offset, |
| 1143 column_offset, |
| 1144 NULL, |
| 1145 pre_data_impl, |
| 1146 Utils::OpenHandle(*script_data), |
| 1147 i::NOT_NATIVES_CODE); |
1142 has_pending_exception = boilerplate.is_null(); | 1148 has_pending_exception = boilerplate.is_null(); |
1143 EXCEPTION_BAILOUT_CHECK(Local<Script>()); | 1149 EXCEPTION_BAILOUT_CHECK(Local<Script>()); |
1144 return Local<Script>(ToApi<Script>(boilerplate)); | 1150 return Local<Script>(ToApi<Script>(boilerplate)); |
1145 } | 1151 } |
1146 | 1152 |
1147 | 1153 |
1148 Local<Script> Script::New(v8::Handle<String> source, | 1154 Local<Script> Script::New(v8::Handle<String> source, |
1149 v8::Handle<Value> file_name) { | 1155 v8::Handle<Value> file_name) { |
1150 ScriptOrigin origin(file_name); | 1156 ScriptOrigin origin(file_name); |
1151 return New(source, &origin); | 1157 return New(source, &origin); |
(...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4000 | 4006 |
4001 | 4007 |
4002 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4008 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
4003 HandleScopeImplementer* thread_local = | 4009 HandleScopeImplementer* thread_local = |
4004 reinterpret_cast<HandleScopeImplementer*>(storage); | 4010 reinterpret_cast<HandleScopeImplementer*>(storage); |
4005 thread_local->IterateThis(v); | 4011 thread_local->IterateThis(v); |
4006 return storage + ArchiveSpacePerThread(); | 4012 return storage + ArchiveSpacePerThread(); |
4007 } | 4013 } |
4008 | 4014 |
4009 } } // namespace v8::internal | 4015 } } // namespace v8::internal |
OLD | NEW |