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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 if (stream.eos()) break; | 1154 if (stream.eos()) break; |
1155 // We have to read out the next offset before we do anything that may | 1155 // We have to read out the next offset before we do anything that may |
1156 // cause a gc, since the DescriptorReader is not gc safe. | 1156 // cause a gc, since the DescriptorReader is not gc safe. |
1157 offset = stream.next_position(); | 1157 offset = stream.next_position(); |
1158 PropertyDetails details = stream.GetDetails(); | 1158 PropertyDetails details = stream.GetDetails(); |
1159 switch (details.type()) { | 1159 switch (details.type()) { |
1160 case FIELD: { | 1160 case FIELD: { |
1161 HandleScope inner; | 1161 HandleScope inner; |
1162 Handle<String> key = Handle<String>(stream.GetKey()); | 1162 Handle<String> key = Handle<String>(stream.GetKey()); |
1163 int index = stream.GetFieldIndex(); | 1163 int index = stream.GetFieldIndex(); |
1164 Handle<Object> value = Handle<Object>(from->properties()->get(index)); | 1164 Handle<Object> value = Handle<Object>(from->FastPropertyAt(index)); |
1165 SetProperty(to, key, value, details.attributes()); | 1165 SetProperty(to, key, value, details.attributes()); |
1166 break; | 1166 break; |
1167 } | 1167 } |
1168 case CONSTANT_FUNCTION: { | 1168 case CONSTANT_FUNCTION: { |
1169 HandleScope inner; | 1169 HandleScope inner; |
1170 Handle<String> key = Handle<String>(stream.GetKey()); | 1170 Handle<String> key = Handle<String>(stream.GetKey()); |
1171 Handle<JSFunction> fun = | 1171 Handle<JSFunction> fun = |
1172 Handle<JSFunction>(stream.GetConstantFunction()); | 1172 Handle<JSFunction>(stream.GetConstantFunction()); |
1173 SetProperty(to, key, fun, details.attributes()); | 1173 SetProperty(to, key, fun, details.attributes()); |
1174 break; | 1174 break; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 if (!ConfigureGlobalObject(global_template)) return; | 1334 if (!ConfigureGlobalObject(global_template)) return; |
1335 | 1335 |
1336 if (!InstallExtensions(extensions)) return; | 1336 if (!InstallExtensions(extensions)) return; |
1337 | 1337 |
1338 if (!InstallSpecialObjects()) return; | 1338 if (!InstallSpecialObjects()) return; |
1339 | 1339 |
1340 result_ = global_context_; | 1340 result_ = global_context_; |
1341 } | 1341 } |
1342 | 1342 |
1343 } } // namespace v8::internal | 1343 } } // namespace v8::internal |
OLD | NEW |