| 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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 to->set_map(*new_to_map); | 1464 to->set_map(*new_to_map); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 | 1467 |
| 1468 void Genesis::MakeFunctionInstancePrototypeWritable() { | 1468 void Genesis::MakeFunctionInstancePrototypeWritable() { |
| 1469 // Make a new function map so all future functions | 1469 // Make a new function map so all future functions |
| 1470 // will have settable and enumerable prototype properties. | 1470 // will have settable and enumerable prototype properties. |
| 1471 HandleScope scope; | 1471 HandleScope scope; |
| 1472 | 1472 |
| 1473 Handle<DescriptorArray> function_map_descriptors = | 1473 Handle<DescriptorArray> function_map_descriptors = |
| 1474 ComputeFunctionInstanceDescriptor(false, true); | 1474 ComputeFunctionInstanceDescriptor(false); |
| 1475 Handle<Map> fm = Factory::CopyMapDropDescriptors(Top::function_map()); | 1475 Handle<Map> fm = Factory::CopyMapDropDescriptors(Top::function_map()); |
| 1476 fm->set_instance_descriptors(*function_map_descriptors); | 1476 fm->set_instance_descriptors(*function_map_descriptors); |
| 1477 Top::context()->global_context()->set_function_map(*fm); | 1477 Top::context()->global_context()->set_function_map(*fm); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 | 1480 |
| 1481 void Genesis::AddSpecialFunction(Handle<JSObject> prototype, | 1481 void Genesis::AddSpecialFunction(Handle<JSObject> prototype, |
| 1482 const char* name, | 1482 const char* name, |
| 1483 Handle<Code> code) { | 1483 Handle<Code> code) { |
| 1484 Handle<String> key = Factory::LookupAsciiSymbol(name); | 1484 Handle<String> key = Factory::LookupAsciiSymbol(name); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 | 1600 |
| 1601 // Restore statics that are thread local. | 1601 // Restore statics that are thread local. |
| 1602 char* Genesis::RestoreState(char* from) { | 1602 char* Genesis::RestoreState(char* from) { |
| 1603 current_ = *reinterpret_cast<Genesis**>(from); | 1603 current_ = *reinterpret_cast<Genesis**>(from); |
| 1604 return from + sizeof(current_); | 1604 return from + sizeof(current_); |
| 1605 } | 1605 } |
| 1606 | 1606 |
| 1607 } } // namespace v8::internal | 1607 } } // namespace v8::internal |
| OLD | NEW |