| 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 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 Handle<JSFunction> array_buffer_fun = | 1322 Handle<JSFunction> array_buffer_fun = |
| 1323 InstallFunction( | 1323 InstallFunction( |
| 1324 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, | 1324 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
| 1325 JSArrayBuffer::kSize + | 1325 JSArrayBuffer::kSize + |
| 1326 v8::ArrayBuffer::kInternalFieldCount * kPointerSize, | 1326 v8::ArrayBuffer::kInternalFieldCount * kPointerSize, |
| 1327 isolate()->initial_object_prototype(), | 1327 isolate()->initial_object_prototype(), |
| 1328 Builtins::kIllegal, true, true); | 1328 Builtins::kIllegal, true, true); |
| 1329 native_context()->set_array_buffer_fun(*array_buffer_fun); | 1329 native_context()->set_array_buffer_fun(*array_buffer_fun); |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 if (FLAG_harmony_data_view) { |
| 1333 // -- D a t a V i e w |
| 1334 Handle<JSFunction> data_view_fun = |
| 1335 InstallFunction(global, "DataView", JS_DATA_VIEW_TYPE, |
| 1336 JSDataView::kSize, |
| 1337 isolate()->initial_object_prototype(), |
| 1338 Builtins::kIllegal, true, true); |
| 1339 native_context()->set_data_view_fun(*data_view_fun); |
| 1340 } |
| 1341 |
| 1332 if (FLAG_harmony_typed_arrays) { | 1342 if (FLAG_harmony_typed_arrays) { |
| 1333 // -- T y p e d A r r a y s | 1343 // -- T y p e d A r r a y s |
| 1334 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array", | 1344 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array", |
| 1335 EXTERNAL_BYTE_ELEMENTS); | 1345 EXTERNAL_BYTE_ELEMENTS); |
| 1336 native_context()->set_int8_array_fun(*int8_fun); | 1346 native_context()->set_int8_array_fun(*int8_fun); |
| 1337 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array", | 1347 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array", |
| 1338 EXTERNAL_UNSIGNED_BYTE_ELEMENTS); | 1348 EXTERNAL_UNSIGNED_BYTE_ELEMENTS); |
| 1339 native_context()->set_uint8_array_fun(*uint8_fun); | 1349 native_context()->set_uint8_array_fun(*uint8_fun); |
| 1340 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array", | 1350 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array", |
| 1341 EXTERNAL_SHORT_ELEMENTS); | 1351 EXTERNAL_SHORT_ELEMENTS); |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2035 if (FLAG_harmony_observation && | 2045 if (FLAG_harmony_observation && |
| 2036 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2046 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2037 "native object-observe.js") == 0) { | 2047 "native object-observe.js") == 0) { |
| 2038 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2048 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2039 } | 2049 } |
| 2040 if (FLAG_harmony_array_buffer && | 2050 if (FLAG_harmony_array_buffer && |
| 2041 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2051 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2042 "native arraybuffer.js") == 0) { | 2052 "native arraybuffer.js") == 0) { |
| 2043 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2053 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2044 } | 2054 } |
| 2055 if (FLAG_harmony_data_view && |
| 2056 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2057 "native dataview.js") == 0) { |
| 2058 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2059 } |
| 2045 if (FLAG_harmony_typed_arrays && | 2060 if (FLAG_harmony_typed_arrays && |
| 2046 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2061 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2047 "native typedarray.js") == 0) { | 2062 "native typedarray.js") == 0) { |
| 2048 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2063 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2049 } | 2064 } |
| 2050 if (FLAG_harmony_generators && | 2065 if (FLAG_harmony_generators && |
| 2051 strcmp(ExperimentalNatives::GetScriptName(i).start(), | 2066 strcmp(ExperimentalNatives::GetScriptName(i).start(), |
| 2052 "native generator.js") == 0) { | 2067 "native generator.js") == 0) { |
| 2053 if (!CompileExperimentalBuiltin(isolate(), i)) return false; | 2068 if (!CompileExperimentalBuiltin(isolate(), i)) return false; |
| 2054 } | 2069 } |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2632 return from + sizeof(NestingCounterType); | 2647 return from + sizeof(NestingCounterType); |
| 2633 } | 2648 } |
| 2634 | 2649 |
| 2635 | 2650 |
| 2636 // Called when the top-level V8 mutex is destroyed. | 2651 // Called when the top-level V8 mutex is destroyed. |
| 2637 void Bootstrapper::FreeThreadResources() { | 2652 void Bootstrapper::FreeThreadResources() { |
| 2638 ASSERT(!IsActive()); | 2653 ASSERT(!IsActive()); |
| 2639 } | 2654 } |
| 2640 | 2655 |
| 2641 } } // namespace v8::internal | 2656 } } // namespace v8::internal |
| OLD | NEW |