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

Side by Side Diff: src/factory.cc

Issue 111001: Added context information to scripts (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
OLDNEW
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 Heap::SetLastScriptId(Smi::FromInt(id)); 167 Heap::SetLastScriptId(Smi::FromInt(id));
168 168
169 // Create and initialize script object. 169 // Create and initialize script object.
170 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); 170 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE));
171 script->set_source(*source); 171 script->set_source(*source);
172 script->set_name(Heap::undefined_value()); 172 script->set_name(Heap::undefined_value());
173 script->set_id(Heap::last_script_id()); 173 script->set_id(Heap::last_script_id());
174 script->set_line_offset(Smi::FromInt(0)); 174 script->set_line_offset(Smi::FromInt(0));
175 script->set_column_offset(Smi::FromInt(0)); 175 script->set_column_offset(Smi::FromInt(0));
176 script->set_data(Heap::undefined_value()); 176 script->set_data(Heap::undefined_value());
177 script->set_context_data(Heap::undefined_value());
177 script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL)); 178 script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL));
178 script->set_wrapper(*Factory::NewProxy(0, TENURED)); 179 script->set_wrapper(*Factory::NewProxy(0, TENURED));
179 script->set_line_ends(Heap::undefined_value()); 180 script->set_line_ends(Heap::undefined_value());
180 181
181 return script; 182 return script;
182 } 183 }
183 184
184 185
185 Handle<Proxy> Factory::NewProxy(Address addr, PretenureFlag pretenure) { 186 Handle<Proxy> Factory::NewProxy(Address addr, PretenureFlag pretenure) {
186 CALL_HEAP_FUNCTION(Heap::AllocateProxy(addr, pretenure), Proxy); 187 CALL_HEAP_FUNCTION(Heap::AllocateProxy(addr, pretenure), Proxy);
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 Execution::ConfigureInstance(instance, 897 Execution::ConfigureInstance(instance,
897 instance_template, 898 instance_template,
898 pending_exception); 899 pending_exception);
899 } else { 900 } else {
900 *pending_exception = false; 901 *pending_exception = false;
901 } 902 }
902 } 903 }
903 904
904 905
905 } } // namespace v8::internal 906 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug-delay.js ('k') | src/mirror-delay.js » ('j') | src/mirror-delay.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698