| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 JS_ARRAY_TYPE, | 1668 JS_ARRAY_TYPE, |
| 1669 JSArray::kSize, | 1669 JSArray::kSize, |
| 1670 isolate()->initial_object_prototype(), | 1670 isolate()->initial_object_prototype(), |
| 1671 Builtins::kInternalArrayCode, | 1671 Builtins::kInternalArrayCode, |
| 1672 true); | 1672 true); |
| 1673 Handle<JSObject> prototype = | 1673 Handle<JSObject> prototype = |
| 1674 factory()->NewJSObject(isolate()->object_function(), TENURED); | 1674 factory()->NewJSObject(isolate()->object_function(), TENURED); |
| 1675 SetPrototype(array_function, prototype); | 1675 SetPrototype(array_function, prototype); |
| 1676 | 1676 |
| 1677 array_function->shared()->set_construct_stub( | 1677 array_function->shared()->set_construct_stub( |
| 1678 isolate()->builtins()->builtin(Builtins::kArrayConstructCode)); | 1678 isolate()->builtins()->builtin(Builtins::kInternalArrayConstructCode)); |
| 1679 array_function->shared()->DontAdaptArguments(); | 1679 array_function->shared()->DontAdaptArguments(); |
| 1680 | 1680 |
| 1681 // InternalArrays should not use Smi-Only array optimizations. There are too | 1681 // InternalArrays should not use Smi-Only array optimizations. There are too |
| 1682 // many places in the C++ runtime code (e.g. RegEx) that assume that | 1682 // many places in the C++ runtime code (e.g. RegEx) that assume that |
| 1683 // elements in InternalArrays can be set to non-Smi values without going | 1683 // elements in InternalArrays can be set to non-Smi values without going |
| 1684 // through a common bottleneck that would make the SMI_ONLY -> FAST_ELEMENT | 1684 // through a common bottleneck that would make the SMI_ONLY -> FAST_ELEMENT |
| 1685 // transition easy to trap. Moreover, they rarely are smi-only. | 1685 // transition easy to trap. Moreover, they rarely are smi-only. |
| 1686 MaybeObject* maybe_map = array_function->initial_map()->Copy(); | 1686 MaybeObject* maybe_map = array_function->initial_map()->Copy(); |
| 1687 Map* new_map; | 1687 Map* new_map; |
| 1688 if (!maybe_map->To(&new_map)) return false; | 1688 if (!maybe_map->To(&new_map)) return false; |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2429 return from + sizeof(NestingCounterType); | 2429 return from + sizeof(NestingCounterType); |
| 2430 } | 2430 } |
| 2431 | 2431 |
| 2432 | 2432 |
| 2433 // Called when the top-level V8 mutex is destroyed. | 2433 // Called when the top-level V8 mutex is destroyed. |
| 2434 void Bootstrapper::FreeThreadResources() { | 2434 void Bootstrapper::FreeThreadResources() { |
| 2435 ASSERT(!IsActive()); | 2435 ASSERT(!IsActive()); |
| 2436 } | 2436 } |
| 2437 | 2437 |
| 2438 } } // namespace v8::internal | 2438 } } // namespace v8::internal |
| OLD | NEW |