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 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 { // -- A r r a y B u f f e r | 1321 { // -- A r r a y B u f f e r |
1322 Handle<JSFunction> array_buffer_fun = | 1322 Handle<JSFunction> array_buffer_fun = |
1323 InstallFunction(global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, | 1323 InstallFunction(global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
1324 JSArrayBuffer::kSize, | 1324 JSArrayBuffer::kSize, |
1325 isolate()->initial_object_prototype(), | 1325 isolate()->initial_object_prototype(), |
1326 Builtins::kIllegal, true); | 1326 Builtins::kIllegal, true); |
1327 native_context()->set_array_buffer_fun(*array_buffer_fun); | 1327 native_context()->set_array_buffer_fun(*array_buffer_fun); |
1328 } | 1328 } |
1329 { | 1329 { |
1330 // -- T y p e d A r r a y s | 1330 // -- T y p e d A r r a y s |
1331 native_context()->set_int8_array_fun( | 1331 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array"); |
1332 *InstallTypedArray("Int8Array")); | 1332 native_context()->set_int8_array_fun(*int8_fun); |
1333 native_context()->set_uint8_array_fun( | 1333 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array"); |
1334 *InstallTypedArray("Uint8Array")); | 1334 native_context()->set_uint8_array_fun(*uint8_fun); |
1335 native_context()->set_int16_array_fun( | 1335 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array"); |
1336 *InstallTypedArray("Int16Array")); | 1336 native_context()->set_int16_array_fun(*int16_fun); |
1337 native_context()->set_uint16_array_fun( | 1337 Handle<JSFunction> uint16_fun = InstallTypedArray("Uint16Array"); |
1338 *InstallTypedArray("Uint16Array")); | 1338 native_context()->set_uint16_array_fun(*uint16_fun); |
1339 native_context()->set_int32_array_fun( | 1339 Handle<JSFunction> int32_fun = InstallTypedArray("Int32Array"); |
1340 *InstallTypedArray("Int32Array")); | 1340 native_context()->set_int32_array_fun(*int32_fun); |
1341 native_context()->set_uint32_array_fun( | 1341 Handle<JSFunction> uint32_fun = InstallTypedArray("Uint32Array"); |
1342 *InstallTypedArray("Uint32Array")); | 1342 native_context()->set_uint32_array_fun(*uint32_fun); |
1343 native_context()->set_float_array_fun( | 1343 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array"); |
1344 *InstallTypedArray("Float32Array")); | 1344 native_context()->set_float_array_fun(*float_fun); |
1345 native_context()->set_double_array_fun( | 1345 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array"); |
1346 *InstallTypedArray("Float64Array")); | 1346 native_context()->set_double_array_fun(*double_fun); |
1347 } | 1347 } |
1348 } | 1348 } |
1349 | 1349 |
1350 if (FLAG_harmony_generators) { | 1350 if (FLAG_harmony_generators) { |
1351 // Create generator meta-objects and install them on the builtins object. | 1351 // Create generator meta-objects and install them on the builtins object. |
1352 Handle<JSObject> builtins(native_context()->builtins()); | 1352 Handle<JSObject> builtins(native_context()->builtins()); |
1353 Handle<JSObject> generator_object_prototype = | 1353 Handle<JSObject> generator_object_prototype = |
1354 factory()->NewJSObject(isolate()->object_function(), TENURED); | 1354 factory()->NewJSObject(isolate()->object_function(), TENURED); |
1355 Handle<JSFunction> generator_function_prototype = | 1355 Handle<JSFunction> generator_function_prototype = |
1356 InstallFunction(builtins, "GeneratorFunctionPrototype", | 1356 InstallFunction(builtins, "GeneratorFunctionPrototype", |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2578 return from + sizeof(NestingCounterType); | 2578 return from + sizeof(NestingCounterType); |
2579 } | 2579 } |
2580 | 2580 |
2581 | 2581 |
2582 // Called when the top-level V8 mutex is destroyed. | 2582 // Called when the top-level V8 mutex is destroyed. |
2583 void Bootstrapper::FreeThreadResources() { | 2583 void Bootstrapper::FreeThreadResources() { |
2584 ASSERT(!IsActive()); | 2584 ASSERT(!IsActive()); |
2585 } | 2585 } |
2586 | 2586 |
2587 } } // namespace v8::internal | 2587 } } // namespace v8::internal |
OLD | NEW |