OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 if (!proto_template->IsUndefined()) { | 762 if (!proto_template->IsUndefined()) { |
763 js_global_object_template = | 763 js_global_object_template = |
764 Handle<ObjectTemplateInfo>::cast(proto_template); | 764 Handle<ObjectTemplateInfo>::cast(proto_template); |
765 } | 765 } |
766 } | 766 } |
767 | 767 |
768 if (js_global_object_template.is_null()) { | 768 if (js_global_object_template.is_null()) { |
769 Handle<String> name = Handle<String>(heap()->empty_string()); | 769 Handle<String> name = Handle<String>(heap()->empty_string()); |
770 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( | 770 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( |
771 Builtins::kIllegal)); | 771 Builtins::kIllegal)); |
| 772 js_global_object_function = factory()->NewFunction( |
| 773 name, code, JS_GLOBAL_OBJECT_TYPE, JSGlobalObject::kSize); |
| 774 // Change the constructor property of the prototype of the |
| 775 // hidden global function to refer to the Object function. |
772 Handle<JSObject> prototype = | 776 Handle<JSObject> prototype = |
773 factory()->NewFunctionPrototype(isolate()->object_function()); | 777 Handle<JSObject>( |
774 js_global_object_function = factory()->NewFunction( | 778 JSObject::cast(js_global_object_function->instance_prototype())); |
775 name, code, prototype, JS_GLOBAL_OBJECT_TYPE, JSGlobalObject::kSize); | 779 JSObject::SetOwnPropertyIgnoreAttributes( |
776 #ifdef DEBUG | 780 prototype, factory()->constructor_string(), |
777 LookupIterator it(prototype, factory()->constructor_string(), | 781 isolate()->object_function(), NONE).Check(); |
778 LookupIterator::CHECK_OWN_REAL); | |
779 Handle<Object> value = JSReceiver::GetProperty(&it).ToHandleChecked(); | |
780 ASSERT(it.IsFound()); | |
781 ASSERT_EQ(*isolate()->object_function(), *value); | |
782 #endif | |
783 } else { | 782 } else { |
784 Handle<FunctionTemplateInfo> js_global_object_constructor( | 783 Handle<FunctionTemplateInfo> js_global_object_constructor( |
785 FunctionTemplateInfo::cast(js_global_object_template->constructor())); | 784 FunctionTemplateInfo::cast(js_global_object_template->constructor())); |
786 js_global_object_function = | 785 js_global_object_function = |
787 factory()->CreateApiFunction(js_global_object_constructor, | 786 factory()->CreateApiFunction(js_global_object_constructor, |
788 factory()->the_hole_value(), | 787 factory()->the_hole_value(), |
789 factory()->GlobalObjectType); | 788 factory()->GlobalObjectType); |
790 } | 789 } |
791 | 790 |
792 js_global_object_function->initial_map()->set_is_hidden_prototype(); | 791 js_global_object_function->initial_map()->set_is_hidden_prototype(); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 native_context()->set_data_view_fun(*data_view_fun); | 1126 native_context()->set_data_view_fun(*data_view_fun); |
1128 } | 1127 } |
1129 | 1128 |
1130 // -- W e a k M a p | 1129 // -- W e a k M a p |
1131 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1130 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
1132 isolate->initial_object_prototype(), Builtins::kIllegal); | 1131 isolate->initial_object_prototype(), Builtins::kIllegal); |
1133 // -- W e a k S e t | 1132 // -- W e a k S e t |
1134 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, | 1133 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, |
1135 isolate->initial_object_prototype(), Builtins::kIllegal); | 1134 isolate->initial_object_prototype(), Builtins::kIllegal); |
1136 | 1135 |
1137 { // --- sloppy arguments map | 1136 { // --- arguments_boilerplate_ |
1138 // Make sure we can recognize argument objects at runtime. | 1137 // Make sure we can recognize argument objects at runtime. |
1139 // This is done by introducing an anonymous function with | 1138 // This is done by introducing an anonymous function with |
1140 // class_name equals 'Arguments'. | 1139 // class_name equals 'Arguments'. |
1141 Handle<String> arguments_string = factory->InternalizeOneByteString( | 1140 Handle<String> arguments_string = factory->InternalizeOneByteString( |
1142 STATIC_ASCII_VECTOR("Arguments")); | 1141 STATIC_ASCII_VECTOR("Arguments")); |
1143 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal)); | 1142 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal)); |
| 1143 |
1144 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype( | 1144 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype( |
1145 arguments_string, code); | 1145 arguments_string, code); |
| 1146 ASSERT(!function->has_initial_map()); |
1146 function->shared()->set_instance_class_name(*arguments_string); | 1147 function->shared()->set_instance_class_name(*arguments_string); |
| 1148 function->shared()->set_expected_nof_properties(2); |
| 1149 function->set_prototype_or_initial_map( |
| 1150 native_context()->object_function()->prototype()); |
| 1151 Handle<JSObject> result = factory->NewJSObject(function); |
1147 | 1152 |
1148 Handle<Map> map = | 1153 native_context()->set_sloppy_arguments_boilerplate(*result); |
1149 factory->NewMap(JS_OBJECT_TYPE, Heap::kSloppyArgumentsObjectSize); | 1154 // Note: length must be added as the first property and |
1150 // Create the descriptor array for the arguments object. | 1155 // callee must be added as the second property. |
1151 Map::EnsureDescriptorSlack(map, 2); | 1156 JSObject::AddProperty( |
| 1157 result, factory->length_string(), |
| 1158 factory->undefined_value(), DONT_ENUM, |
| 1159 Object::FORCE_TAGGED, FORCE_FIELD); |
| 1160 JSObject::AddProperty( |
| 1161 result, factory->callee_string(), |
| 1162 factory->undefined_value(), DONT_ENUM, |
| 1163 Object::FORCE_TAGGED, FORCE_FIELD); |
1152 | 1164 |
1153 { // length | 1165 #ifdef DEBUG |
1154 FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex, | 1166 LookupResult lookup(isolate); |
1155 DONT_ENUM, Representation::Tagged()); | 1167 result->LookupOwn(factory->callee_string(), &lookup); |
1156 map->AppendDescriptor(&d); | 1168 ASSERT(lookup.IsField()); |
1157 } | 1169 ASSERT(lookup.GetFieldIndex().property_index() == |
1158 { // callee | 1170 Heap::kArgumentsCalleeIndex); |
1159 FieldDescriptor d(factory->callee_string(), Heap::kArgumentsCalleeIndex, | |
1160 DONT_ENUM, Representation::Tagged()); | |
1161 map->AppendDescriptor(&d); | |
1162 } | |
1163 | 1171 |
1164 map->set_function_with_prototype(true); | 1172 result->LookupOwn(factory->length_string(), &lookup); |
1165 map->set_prototype(native_context()->object_function()->prototype()); | 1173 ASSERT(lookup.IsField()); |
1166 map->set_pre_allocated_property_fields(2); | 1174 ASSERT(lookup.GetFieldIndex().property_index() == |
1167 map->set_inobject_properties(2); | 1175 Heap::kArgumentsLengthIndex); |
1168 native_context()->set_sloppy_arguments_map(*map); | |
1169 | 1176 |
1170 ASSERT(!function->has_initial_map()); | 1177 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); |
1171 function->set_initial_map(*map); | 1178 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); |
1172 map->set_constructor(*function); | |
1173 | 1179 |
1174 ASSERT(map->inobject_properties() > Heap::kArgumentsCalleeIndex); | 1180 // Check the state of the object. |
1175 ASSERT(map->inobject_properties() > Heap::kArgumentsLengthIndex); | 1181 ASSERT(result->HasFastProperties()); |
1176 ASSERT(!map->is_dictionary_map()); | 1182 ASSERT(result->HasFastObjectElements()); |
1177 ASSERT(IsFastObjectElementsKind(map->elements_kind())); | 1183 #endif |
1178 } | 1184 } |
1179 | 1185 |
1180 { // --- aliased arguments map | 1186 { // --- aliased_arguments_boilerplate_ |
1181 Handle<Map> map = Map::Copy(isolate->sloppy_arguments_map()); | 1187 // Set up a well-formed parameter map to make assertions happy. |
1182 map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS); | 1188 Handle<FixedArray> elements = factory->NewFixedArray(2); |
1183 ASSERT_EQ(2, map->pre_allocated_property_fields()); | 1189 elements->set_map(heap->sloppy_arguments_elements_map()); |
1184 native_context()->set_aliased_arguments_map(*map); | 1190 Handle<FixedArray> array; |
| 1191 array = factory->NewFixedArray(0); |
| 1192 elements->set(0, *array); |
| 1193 array = factory->NewFixedArray(0); |
| 1194 elements->set(1, *array); |
| 1195 |
| 1196 Handle<Map> old_map( |
| 1197 native_context()->sloppy_arguments_boilerplate()->map()); |
| 1198 Handle<Map> new_map = Map::Copy(old_map); |
| 1199 new_map->set_pre_allocated_property_fields(2); |
| 1200 Handle<JSObject> result = factory->NewJSObjectFromMap(new_map); |
| 1201 // Set elements kind after allocating the object because |
| 1202 // NewJSObjectFromMap assumes a fast elements map. |
| 1203 new_map->set_elements_kind(SLOPPY_ARGUMENTS_ELEMENTS); |
| 1204 result->set_elements(*elements); |
| 1205 ASSERT(result->HasSloppyArgumentsElements()); |
| 1206 native_context()->set_aliased_arguments_boilerplate(*result); |
1185 } | 1207 } |
1186 | 1208 |
1187 { // --- strict mode arguments map | 1209 { // --- strict mode arguments boilerplate |
1188 const PropertyAttributes attributes = | 1210 const PropertyAttributes attributes = |
1189 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); | 1211 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); |
1190 | 1212 |
1191 // Create the ThrowTypeError functions. | 1213 // Create the ThrowTypeError functions. |
1192 Handle<AccessorPair> callee = factory->NewAccessorPair(); | 1214 Handle<AccessorPair> callee = factory->NewAccessorPair(); |
1193 Handle<AccessorPair> caller = factory->NewAccessorPair(); | 1215 Handle<AccessorPair> caller = factory->NewAccessorPair(); |
1194 | 1216 |
1195 Handle<JSFunction> poison = GetStrictPoisonFunction(); | 1217 Handle<JSFunction> poison = GetStrictPoisonFunction(); |
1196 | 1218 |
1197 // Install the ThrowTypeError functions. | 1219 // Install the ThrowTypeError functions. |
1198 callee->set_getter(*poison); | 1220 callee->set_getter(*poison); |
1199 callee->set_setter(*poison); | 1221 callee->set_setter(*poison); |
1200 caller->set_getter(*poison); | 1222 caller->set_getter(*poison); |
1201 caller->set_setter(*poison); | 1223 caller->set_setter(*poison); |
1202 | 1224 |
1203 // Create the map. Allocate one in-object field for length. | 1225 // Create the map. Allocate one in-object field for length. |
1204 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, | 1226 Handle<Map> map = factory->NewMap(JS_OBJECT_TYPE, |
1205 Heap::kStrictArgumentsObjectSize); | 1227 Heap::kStrictArgumentsObjectSize); |
1206 // Create the descriptor array for the arguments object. | 1228 // Create the descriptor array for the arguments object. |
1207 Map::EnsureDescriptorSlack(map, 3); | 1229 Map::EnsureDescriptorSlack(map, 3); |
1208 | 1230 |
1209 { // length | 1231 { // length |
1210 FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex, | 1232 FieldDescriptor d( |
1211 DONT_ENUM, Representation::Tagged()); | 1233 factory->length_string(), 0, DONT_ENUM, Representation::Tagged()); |
1212 map->AppendDescriptor(&d); | 1234 map->AppendDescriptor(&d); |
1213 } | 1235 } |
1214 { // callee | 1236 { // callee |
1215 CallbacksDescriptor d(factory->callee_string(), callee, attributes); | 1237 CallbacksDescriptor d(factory->callee_string(), |
| 1238 callee, |
| 1239 attributes); |
1216 map->AppendDescriptor(&d); | 1240 map->AppendDescriptor(&d); |
1217 } | 1241 } |
1218 { // caller | 1242 { // caller |
1219 CallbacksDescriptor d(factory->caller_string(), caller, attributes); | 1243 CallbacksDescriptor d(factory->caller_string(), |
| 1244 caller, |
| 1245 attributes); |
1220 map->AppendDescriptor(&d); | 1246 map->AppendDescriptor(&d); |
1221 } | 1247 } |
1222 | 1248 |
1223 map->set_function_with_prototype(true); | 1249 map->set_function_with_prototype(true); |
1224 map->set_prototype(native_context()->object_function()->prototype()); | 1250 map->set_prototype(native_context()->object_function()->prototype()); |
1225 map->set_pre_allocated_property_fields(1); | 1251 map->set_pre_allocated_property_fields(1); |
1226 map->set_inobject_properties(1); | 1252 map->set_inobject_properties(1); |
1227 | 1253 |
1228 // Copy constructor from the sloppy arguments boilerplate. | 1254 // Copy constructor from the sloppy arguments boilerplate. |
1229 map->set_constructor( | 1255 map->set_constructor( |
1230 native_context()->sloppy_arguments_map()->constructor()); | 1256 native_context()->sloppy_arguments_boilerplate()->map()->constructor()); |
1231 | 1257 |
1232 native_context()->set_strict_arguments_map(*map); | 1258 // Allocate the arguments boilerplate object. |
| 1259 Handle<JSObject> result = factory->NewJSObjectFromMap(map); |
| 1260 native_context()->set_strict_arguments_boilerplate(*result); |
1233 | 1261 |
1234 ASSERT(map->inobject_properties() > Heap::kArgumentsLengthIndex); | 1262 #ifdef DEBUG |
1235 ASSERT(!map->is_dictionary_map()); | 1263 LookupResult lookup(isolate); |
1236 ASSERT(IsFastObjectElementsKind(map->elements_kind())); | 1264 result->LookupOwn(factory->length_string(), &lookup); |
| 1265 ASSERT(lookup.IsField()); |
| 1266 ASSERT(lookup.GetFieldIndex().property_index() == |
| 1267 Heap::kArgumentsLengthIndex); |
| 1268 |
| 1269 Handle<Object> length_value = Object::GetProperty( |
| 1270 result, factory->length_string()).ToHandleChecked(); |
| 1271 ASSERT_EQ(heap->undefined_value(), *length_value); |
| 1272 |
| 1273 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); |
| 1274 |
| 1275 // Check the state of the object. |
| 1276 ASSERT(result->HasFastProperties()); |
| 1277 ASSERT(result->HasFastObjectElements()); |
| 1278 #endif |
1237 } | 1279 } |
1238 | 1280 |
1239 { // --- context extension | 1281 { // --- context extension |
1240 // Create a function for the context extension objects. | 1282 // Create a function for the context extension objects. |
1241 Handle<Code> code = Handle<Code>( | 1283 Handle<Code> code = Handle<Code>( |
1242 isolate->builtins()->builtin(Builtins::kIllegal)); | 1284 isolate->builtins()->builtin(Builtins::kIllegal)); |
1243 Handle<JSFunction> context_extension_fun = factory->NewFunction( | 1285 Handle<JSFunction> context_extension_fun = factory->NewFunction( |
1244 factory->empty_string(), code, JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 1286 factory->empty_string(), code, JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
1245 JSObject::kHeaderSize); | 1287 JSObject::kHeaderSize); |
1246 | 1288 |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2143 BootstrapperActive active(this); | 2185 BootstrapperActive active(this); |
2144 SaveContext saved_context(isolate_); | 2186 SaveContext saved_context(isolate_); |
2145 isolate_->set_context(*native_context); | 2187 isolate_->set_context(*native_context); |
2146 return Genesis::InstallExtensions(native_context, extensions) && | 2188 return Genesis::InstallExtensions(native_context, extensions) && |
2147 Genesis::InstallSpecialObjects(native_context); | 2189 Genesis::InstallSpecialObjects(native_context); |
2148 } | 2190 } |
2149 | 2191 |
2150 | 2192 |
2151 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { | 2193 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
2152 Isolate* isolate = native_context->GetIsolate(); | 2194 Isolate* isolate = native_context->GetIsolate(); |
2153 // Don't install extensions into the snapshot. | |
2154 if (isolate->serializer_enabled()) return true; | |
2155 | |
2156 Factory* factory = isolate->factory(); | 2195 Factory* factory = isolate->factory(); |
2157 HandleScope scope(isolate); | 2196 HandleScope scope(isolate); |
2158 Handle<JSGlobalObject> global(JSGlobalObject::cast( | 2197 Handle<JSGlobalObject> global(JSGlobalObject::cast( |
2159 native_context->global_object())); | 2198 native_context->global_object())); |
2160 | |
2161 Handle<JSObject> Error = Handle<JSObject>::cast( | |
2162 Object::GetProperty(isolate, global, "Error").ToHandleChecked()); | |
2163 Handle<String> name = | |
2164 factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("stackTraceLimit")); | |
2165 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); | |
2166 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); | |
2167 | |
2168 // Expose the natives in global if a name for it is specified. | 2199 // Expose the natives in global if a name for it is specified. |
2169 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { | 2200 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { |
2170 Handle<String> natives = | 2201 Handle<String> natives = |
2171 factory->InternalizeUtf8String(FLAG_expose_natives_as); | 2202 factory->InternalizeUtf8String(FLAG_expose_natives_as); |
2172 JSObject::AddProperty(global, natives, handle(global->builtins()), | 2203 RETURN_ON_EXCEPTION_VALUE( |
2173 DONT_ENUM); | 2204 isolate, |
| 2205 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2206 global, natives, Handle<JSObject>(global->builtins()), DONT_ENUM), |
| 2207 false); |
| 2208 } |
| 2209 |
| 2210 Handle<Object> Error = Object::GetProperty( |
| 2211 isolate, global, "Error").ToHandleChecked(); |
| 2212 if (Error->IsJSObject()) { |
| 2213 Handle<String> name = factory->InternalizeOneByteString( |
| 2214 STATIC_ASCII_VECTOR("stackTraceLimit")); |
| 2215 Handle<Smi> stack_trace_limit( |
| 2216 Smi::FromInt(FLAG_stack_trace_limit), isolate); |
| 2217 RETURN_ON_EXCEPTION_VALUE( |
| 2218 isolate, |
| 2219 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2220 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), |
| 2221 false); |
2174 } | 2222 } |
2175 | 2223 |
2176 // Expose the stack trace symbol to native JS. | 2224 // Expose the stack trace symbol to native JS. |
2177 JSObject::AddProperty(handle(global->builtins()), | 2225 RETURN_ON_EXCEPTION_VALUE( |
2178 factory->InternalizeOneByteString( | 2226 isolate, |
2179 STATIC_ASCII_VECTOR("stack_trace_symbol")), | 2227 JSObject::SetOwnPropertyIgnoreAttributes( |
2180 factory->stack_trace_symbol(), NONE); | 2228 handle(native_context->builtins(), isolate), |
| 2229 factory->InternalizeOneByteString( |
| 2230 STATIC_ASCII_VECTOR("stack_trace_symbol")), |
| 2231 factory->stack_trace_symbol(), |
| 2232 NONE), |
| 2233 false); |
2181 | 2234 |
2182 // Expose the debug global object in global if a name for it is specified. | 2235 // Expose the debug global object in global if a name for it is specified. |
2183 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { | 2236 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
2184 // If loading fails we just bail out without installing the | 2237 // If loading fails we just bail out without installing the |
2185 // debugger but without tanking the whole context. | 2238 // debugger but without tanking the whole context. |
2186 Debug* debug = isolate->debug(); | 2239 Debug* debug = isolate->debug(); |
2187 if (!debug->Load()) return true; | 2240 if (!debug->Load()) return true; |
2188 Handle<Context> debug_context = debug->debug_context(); | 2241 Handle<Context> debug_context = debug->debug_context(); |
2189 // Set the security token for the debugger context to the same as | 2242 // Set the security token for the debugger context to the same as |
2190 // the shell native context to allow calling between these (otherwise | 2243 // the shell native context to allow calling between these (otherwise |
2191 // exposing debug global object doesn't make much sense). | 2244 // exposing debug global object doesn't make much sense). |
2192 debug_context->set_security_token(native_context->security_token()); | 2245 debug_context->set_security_token(native_context->security_token()); |
2193 Handle<String> debug_string = | 2246 Handle<String> debug_string = |
2194 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2247 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
2195 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); | 2248 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); |
2196 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); | 2249 RETURN_ON_EXCEPTION_VALUE( |
| 2250 isolate, |
| 2251 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2252 global, debug_string, global_proxy, DONT_ENUM), |
| 2253 false); |
2197 } | 2254 } |
2198 return true; | 2255 return true; |
2199 } | 2256 } |
2200 | 2257 |
2201 | 2258 |
2202 static uint32_t Hash(RegisteredExtension* extension) { | 2259 static uint32_t Hash(RegisteredExtension* extension) { |
2203 return v8::internal::ComputePointerHash(extension); | 2260 return v8::internal::ComputePointerHash(extension); |
2204 } | 2261 } |
2205 | 2262 |
2206 | 2263 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2700 return from + sizeof(NestingCounterType); | 2757 return from + sizeof(NestingCounterType); |
2701 } | 2758 } |
2702 | 2759 |
2703 | 2760 |
2704 // Called when the top-level V8 mutex is destroyed. | 2761 // Called when the top-level V8 mutex is destroyed. |
2705 void Bootstrapper::FreeThreadResources() { | 2762 void Bootstrapper::FreeThreadResources() { |
2706 ASSERT(!IsActive()); | 2763 ASSERT(!IsActive()); |
2707 } | 2764 } |
2708 | 2765 |
2709 } } // namespace v8::internal | 2766 } } // namespace v8::internal |
OLD | NEW |