OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 | 1048 |
1049 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); | 1049 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); |
1050 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); | 1050 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); |
1051 | 1051 |
1052 // Check the state of the object. | 1052 // Check the state of the object. |
1053 ASSERT(result->HasFastProperties()); | 1053 ASSERT(result->HasFastProperties()); |
1054 ASSERT(result->HasFastElements()); | 1054 ASSERT(result->HasFastElements()); |
1055 #endif | 1055 #endif |
1056 } | 1056 } |
1057 | 1057 |
1058 { // --- aliased_arguments_boilerplate_ | |
1059 Handle<Map> old_map(global_context()->arguments_boilerplate()->map()); | |
1060 Handle<Map> new_map = factory->CopyMapDropTransitions(old_map); | |
1061 new_map->set_pre_allocated_property_fields(2); | |
1062 Handle<JSObject> result = factory->NewJSObjectFromMap(new_map); | |
1063 new_map->set_elements_kind(JSObject::NON_STRICT_ARGUMENTS_ELEMENTS); | |
1064 // Set up a well-formed parameter map to make assertions happy. | |
1065 Handle<FixedArray> elements = factory->NewFixedArray(2); | |
1066 elements->set_map(heap->non_strict_arguments_elements_map()); | |
1067 elements->set(0, *factory->NewFixedArray(0)); | |
1068 elements->set(1, *factory->NewFixedArray(0)); | |
1069 result->set_elements(*elements); | |
1070 global_context()->set_aliased_arguments_boilerplate(*result); | |
1071 } | |
1072 | |
1073 { // --- strict mode arguments boilerplate | 1058 { // --- strict mode arguments boilerplate |
1074 const PropertyAttributes attributes = | 1059 const PropertyAttributes attributes = |
1075 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); | 1060 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); |
1076 | 1061 |
1077 // Create the ThrowTypeError functions. | 1062 // Create the ThrowTypeError functions. |
1078 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED); | 1063 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED); |
1079 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED); | 1064 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED); |
1080 | 1065 |
1081 Handle<JSFunction> throw_function = | 1066 Handle<JSFunction> throw_function = |
1082 GetThrowTypeErrorFunction(); | 1067 GetThrowTypeErrorFunction(); |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 return from + sizeof(NestingCounterType); | 2180 return from + sizeof(NestingCounterType); |
2196 } | 2181 } |
2197 | 2182 |
2198 | 2183 |
2199 // Called when the top-level V8 mutex is destroyed. | 2184 // Called when the top-level V8 mutex is destroyed. |
2200 void Bootstrapper::FreeThreadResources() { | 2185 void Bootstrapper::FreeThreadResources() { |
2201 ASSERT(!IsActive()); | 2186 ASSERT(!IsActive()); |
2202 } | 2187 } |
2203 | 2188 |
2204 } } // namespace v8::internal | 2189 } } // namespace v8::internal |
OLD | NEW |