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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 proxy_line_ends, | 1104 proxy_line_ends, |
1105 common_attributes); | 1105 common_attributes); |
1106 Handle<Proxy> proxy_context_data = | 1106 Handle<Proxy> proxy_context_data = |
1107 Factory::NewProxy(&Accessors::ScriptContextData); | 1107 Factory::NewProxy(&Accessors::ScriptContextData); |
1108 script_descriptors = | 1108 script_descriptors = |
1109 Factory::CopyAppendProxyDescriptor( | 1109 Factory::CopyAppendProxyDescriptor( |
1110 script_descriptors, | 1110 script_descriptors, |
1111 Factory::LookupAsciiSymbol("context_data"), | 1111 Factory::LookupAsciiSymbol("context_data"), |
1112 proxy_context_data, | 1112 proxy_context_data, |
1113 common_attributes); | 1113 common_attributes); |
1114 Handle<Proxy> proxy_eval_from_function = | 1114 Handle<Proxy> proxy_eval_from_script = |
1115 Factory::NewProxy(&Accessors::ScriptEvalFromFunction); | 1115 Factory::NewProxy(&Accessors::ScriptEvalFromScript); |
1116 script_descriptors = | 1116 script_descriptors = |
1117 Factory::CopyAppendProxyDescriptor( | 1117 Factory::CopyAppendProxyDescriptor( |
1118 script_descriptors, | 1118 script_descriptors, |
1119 Factory::LookupAsciiSymbol("eval_from_function"), | 1119 Factory::LookupAsciiSymbol("eval_from_script"), |
1120 proxy_eval_from_function, | 1120 proxy_eval_from_script, |
1121 common_attributes); | 1121 common_attributes); |
1122 Handle<Proxy> proxy_eval_from_position = | 1122 Handle<Proxy> proxy_eval_from_script_position = |
1123 Factory::NewProxy(&Accessors::ScriptEvalFromPosition); | 1123 Factory::NewProxy(&Accessors::ScriptEvalFromScriptPosition); |
1124 script_descriptors = | 1124 script_descriptors = |
1125 Factory::CopyAppendProxyDescriptor( | 1125 Factory::CopyAppendProxyDescriptor( |
1126 script_descriptors, | 1126 script_descriptors, |
1127 Factory::LookupAsciiSymbol("eval_from_position"), | 1127 Factory::LookupAsciiSymbol("eval_from_script_position"), |
1128 proxy_eval_from_position, | 1128 proxy_eval_from_script_position, |
| 1129 common_attributes); |
| 1130 Handle<Proxy> proxy_eval_from_function_name = |
| 1131 Factory::NewProxy(&Accessors::ScriptEvalFromFunctionName); |
| 1132 script_descriptors = |
| 1133 Factory::CopyAppendProxyDescriptor( |
| 1134 script_descriptors, |
| 1135 Factory::LookupAsciiSymbol("eval_from_function_name"), |
| 1136 proxy_eval_from_function_name, |
1129 common_attributes); | 1137 common_attributes); |
1130 | 1138 |
1131 Handle<Map> script_map = Handle<Map>(script_fun->initial_map()); | 1139 Handle<Map> script_map = Handle<Map>(script_fun->initial_map()); |
1132 script_map->set_instance_descriptors(*script_descriptors); | 1140 script_map->set_instance_descriptors(*script_descriptors); |
1133 | 1141 |
1134 // Allocate the empty script. | 1142 // Allocate the empty script. |
1135 Handle<Script> script = Factory::NewScript(Factory::empty_string()); | 1143 Handle<Script> script = Factory::NewScript(Factory::empty_string()); |
1136 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); | 1144 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
1137 global_context()->set_empty_script(*script); | 1145 global_context()->set_empty_script(*script); |
1138 } | 1146 } |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 } | 1644 } |
1637 | 1645 |
1638 | 1646 |
1639 // Restore statics that are thread local. | 1647 // Restore statics that are thread local. |
1640 char* Genesis::RestoreState(char* from) { | 1648 char* Genesis::RestoreState(char* from) { |
1641 current_ = *reinterpret_cast<Genesis**>(from); | 1649 current_ = *reinterpret_cast<Genesis**>(from); |
1642 return from + sizeof(current_); | 1650 return from + sizeof(current_); |
1643 } | 1651 } |
1644 | 1652 |
1645 } } // namespace v8::internal | 1653 } } // namespace v8::internal |
OLD | NEW |