Index: src/bootstrapper.cc |
=================================================================== |
--- src/bootstrapper.cc (revision 1441) |
+++ src/bootstrapper.cc (working copy) |
@@ -518,10 +518,11 @@ |
{ // --- E m p t y --- |
Handle<Code> code = |
Handle<Code>(Builtins::builtin(Builtins::EmptyFunction)); |
+ empty_function->set_code(*code); |
Handle<String> source = Factory::NewStringFromAscii(CStrVector("() {}")); |
- |
- empty_function->set_code(*code); |
- empty_function->shared()->set_script(*Factory::NewScript(source)); |
+ Handle<Script> script = Factory::NewScript(source); |
+ script->set_type(Smi::FromInt(SCRIPT_TYPE_NATIVE)); |
+ empty_function->shared()->set_script(*script); |
empty_function->shared()->set_start_position(0); |
empty_function->shared()->set_end_position(source->length()); |
empty_function->shared()->DontAdaptArguments(); |
@@ -1028,6 +1029,7 @@ |
// Allocate the empty script. |
Handle<Script> script = Factory::NewScript(Factory::empty_string()); |
+ script->set_type(Smi::FromInt(SCRIPT_TYPE_NATIVE)); |
global_context()->set_empty_script(*script); |
} |