| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 id = 1; | 160 id = 1; |
| 161 } else { | 161 } else { |
| 162 // Increment id, wrap when positive smi is exhausted. | 162 // Increment id, wrap when positive smi is exhausted. |
| 163 id = Smi::cast(Heap::last_script_id())->value(); | 163 id = Smi::cast(Heap::last_script_id())->value(); |
| 164 id++; | 164 id++; |
| 165 if (!Smi::IsValid(id)) { | 165 if (!Smi::IsValid(id)) { |
| 166 id = 0; | 166 id = 0; |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 Heap::SetLastScriptId(Smi::FromInt(id)); | 169 Heap::SetLastScriptId(Smi::FromInt(id)); |
| 170 | 170 |
| 171 // Create and initialize script object. | 171 // Create and initialize script object. |
| 172 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); | 172 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); |
| 173 script->set_source(*source); | 173 script->set_source(*source); |
| 174 script->set_name(Heap::undefined_value()); | 174 script->set_name(Heap::undefined_value()); |
| 175 script->set_id(Heap::last_script_id()); | 175 script->set_id(Heap::last_script_id()); |
| 176 script->set_line_offset(Smi::FromInt(0)); | 176 script->set_line_offset(Smi::FromInt(0)); |
| 177 script->set_column_offset(Smi::FromInt(0)); | 177 script->set_column_offset(Smi::FromInt(0)); |
| 178 script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL)); | 178 script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL)); |
| 179 script->set_wrapper(*Factory::NewProxy(0, TENURED)); | 179 script->set_wrapper(*Factory::NewProxy(0, TENURED)); |
| 180 script->set_line_ends(Heap::undefined_value()); | 180 script->set_line_ends(Heap::undefined_value()); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 Execution::ConfigureInstance(instance, | 875 Execution::ConfigureInstance(instance, |
| 876 instance_template, | 876 instance_template, |
| 877 pending_exception); | 877 pending_exception); |
| 878 } else { | 878 } else { |
| 879 *pending_exception = false; | 879 *pending_exception = false; |
| 880 } | 880 } |
| 881 } | 881 } |
| 882 | 882 |
| 883 | 883 |
| 884 } } // namespace v8::internal | 884 } } // namespace v8::internal |
| OLD | NEW |