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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 function->shared()->set_expected_nof_properties(2); | 1088 function->shared()->set_expected_nof_properties(2); |
1089 Handle<JSObject> result = factory->NewJSObject(function); | 1089 Handle<JSObject> result = factory->NewJSObject(function); |
1090 | 1090 |
1091 native_context()->set_arguments_boilerplate(*result); | 1091 native_context()->set_arguments_boilerplate(*result); |
1092 // Note: length must be added as the first property and | 1092 // Note: length must be added as the first property and |
1093 // callee must be added as the second property. | 1093 // callee must be added as the second property. |
1094 CHECK_NOT_EMPTY_HANDLE(isolate, | 1094 CHECK_NOT_EMPTY_HANDLE(isolate, |
1095 JSObject::SetLocalPropertyIgnoreAttributes( | 1095 JSObject::SetLocalPropertyIgnoreAttributes( |
1096 result, factory->length_string(), | 1096 result, factory->length_string(), |
1097 factory->undefined_value(), DONT_ENUM, | 1097 factory->undefined_value(), DONT_ENUM, |
1098 Object::FORCE_TAGGED, JSReceiver::FORCE_FIELD)); | 1098 Object::FORCE_TAGGED, FORCE_FIELD)); |
1099 CHECK_NOT_EMPTY_HANDLE(isolate, | 1099 CHECK_NOT_EMPTY_HANDLE(isolate, |
1100 JSObject::SetLocalPropertyIgnoreAttributes( | 1100 JSObject::SetLocalPropertyIgnoreAttributes( |
1101 result, factory->callee_string(), | 1101 result, factory->callee_string(), |
1102 factory->undefined_value(), DONT_ENUM, | 1102 factory->undefined_value(), DONT_ENUM, |
1103 Object::FORCE_TAGGED, JSReceiver::FORCE_FIELD)); | 1103 Object::FORCE_TAGGED, FORCE_FIELD)); |
1104 | 1104 |
1105 #ifdef DEBUG | 1105 #ifdef DEBUG |
1106 LookupResult lookup(isolate); | 1106 LookupResult lookup(isolate); |
1107 result->LocalLookup(heap->callee_string(), &lookup); | 1107 result->LocalLookup(heap->callee_string(), &lookup); |
1108 ASSERT(lookup.IsField()); | 1108 ASSERT(lookup.IsField()); |
1109 ASSERT(lookup.GetFieldIndex().field_index() == Heap::kArgumentsCalleeIndex); | 1109 ASSERT(lookup.GetFieldIndex().field_index() == Heap::kArgumentsCalleeIndex); |
1110 | 1110 |
1111 result->LocalLookup(heap->length_string(), &lookup); | 1111 result->LocalLookup(heap->length_string(), &lookup); |
1112 ASSERT(lookup.IsField()); | 1112 ASSERT(lookup.IsField()); |
1113 ASSERT(lookup.GetFieldIndex().field_index() == Heap::kArgumentsLengthIndex); | 1113 ASSERT(lookup.GetFieldIndex().field_index() == Heap::kArgumentsLengthIndex); |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2685 return from + sizeof(NestingCounterType); | 2685 return from + sizeof(NestingCounterType); |
2686 } | 2686 } |
2687 | 2687 |
2688 | 2688 |
2689 // Called when the top-level V8 mutex is destroyed. | 2689 // Called when the top-level V8 mutex is destroyed. |
2690 void Bootstrapper::FreeThreadResources() { | 2690 void Bootstrapper::FreeThreadResources() { |
2691 ASSERT(!IsActive()); | 2691 ASSERT(!IsActive()); |
2692 } | 2692 } |
2693 | 2693 |
2694 } } // namespace v8::internal | 2694 } } // namespace v8::internal |
OLD | NEW |