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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 proxy_type, | 1048 proxy_type, |
1049 common_attributes); | 1049 common_attributes); |
1050 Handle<Proxy> proxy_line_ends = | 1050 Handle<Proxy> proxy_line_ends = |
1051 Factory::NewProxy(&Accessors::ScriptLineEnds); | 1051 Factory::NewProxy(&Accessors::ScriptLineEnds); |
1052 script_descriptors = | 1052 script_descriptors = |
1053 Factory::CopyAppendProxyDescriptor( | 1053 Factory::CopyAppendProxyDescriptor( |
1054 script_descriptors, | 1054 script_descriptors, |
1055 Factory::LookupAsciiSymbol("line_ends"), | 1055 Factory::LookupAsciiSymbol("line_ends"), |
1056 proxy_line_ends, | 1056 proxy_line_ends, |
1057 common_attributes); | 1057 common_attributes); |
| 1058 Handle<Proxy> proxy_context_data = |
| 1059 Factory::NewProxy(&Accessors::ScriptContextData); |
| 1060 script_descriptors = |
| 1061 Factory::CopyAppendProxyDescriptor( |
| 1062 script_descriptors, |
| 1063 Factory::LookupAsciiSymbol("context_data"), |
| 1064 proxy_context_data, |
| 1065 common_attributes); |
1058 | 1066 |
1059 Handle<Map> script_map = Handle<Map>(script_fun->initial_map()); | 1067 Handle<Map> script_map = Handle<Map>(script_fun->initial_map()); |
1060 script_map->set_instance_descriptors(*script_descriptors); | 1068 script_map->set_instance_descriptors(*script_descriptors); |
1061 | 1069 |
1062 // Allocate the empty script. | 1070 // Allocate the empty script. |
1063 Handle<Script> script = Factory::NewScript(Factory::empty_string()); | 1071 Handle<Script> script = Factory::NewScript(Factory::empty_string()); |
1064 script->set_type(Smi::FromInt(SCRIPT_TYPE_NATIVE)); | 1072 script->set_type(Smi::FromInt(SCRIPT_TYPE_NATIVE)); |
1065 global_context()->set_empty_script(*script); | 1073 global_context()->set_empty_script(*script); |
1066 } | 1074 } |
1067 | 1075 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 } | 1558 } |
1551 | 1559 |
1552 | 1560 |
1553 // Restore statics that are thread local. | 1561 // Restore statics that are thread local. |
1554 char* Genesis::RestoreState(char* from) { | 1562 char* Genesis::RestoreState(char* from) { |
1555 current_ = *reinterpret_cast<Genesis**>(from); | 1563 current_ = *reinterpret_cast<Genesis**>(from); |
1556 return from + sizeof(current_); | 1564 return from + sizeof(current_); |
1557 } | 1565 } |
1558 | 1566 |
1559 } } // namespace v8::internal | 1567 } } // namespace v8::internal |
OLD | NEW |