| 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 2664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 Utils::OpenHandle(*buffer)->set_should_be_freed(true); | 2675 Utils::OpenHandle(*buffer)->set_should_be_freed(true); |
| 2676 v8::Local<v8::Uint32Array> ta = v8::Uint32Array::New(buffer, 0, num_elems); | 2676 v8::Local<v8::Uint32Array> ta = v8::Uint32Array::New(buffer, 0, num_elems); |
| 2677 Handle<JSBuiltinsObject> builtins(native_context()->builtins()); | 2677 Handle<JSBuiltinsObject> builtins(native_context()->builtins()); |
| 2678 Runtime::DefineObjectProperty(builtins, | 2678 Runtime::DefineObjectProperty(builtins, |
| 2679 factory()->InternalizeOneByteString( | 2679 factory()->InternalizeOneByteString( |
| 2680 STATIC_ASCII_VECTOR("rngstate")), | 2680 STATIC_ASCII_VECTOR("rngstate")), |
| 2681 Utils::OpenHandle(*ta), | 2681 Utils::OpenHandle(*ta), |
| 2682 NONE).Assert(); | 2682 NONE).Assert(); |
| 2683 | 2683 |
| 2684 // Initialize trigonometric lookup tables and constants. | 2684 // Initialize trigonometric lookup tables and constants. |
| 2685 const int constants_size = ARRAY_SIZE(fdlibm::MathConstants::constants); | 2685 const int constants_size = arraysize(fdlibm::MathConstants::constants); |
| 2686 const int table_num_bytes = constants_size * kDoubleSize; | 2686 const int table_num_bytes = constants_size * kDoubleSize; |
| 2687 v8::Local<v8::ArrayBuffer> trig_buffer = v8::ArrayBuffer::New( | 2687 v8::Local<v8::ArrayBuffer> trig_buffer = v8::ArrayBuffer::New( |
| 2688 reinterpret_cast<v8::Isolate*>(isolate), | 2688 reinterpret_cast<v8::Isolate*>(isolate), |
| 2689 const_cast<double*>(fdlibm::MathConstants::constants), table_num_bytes); | 2689 const_cast<double*>(fdlibm::MathConstants::constants), table_num_bytes); |
| 2690 v8::Local<v8::Float64Array> trig_table = | 2690 v8::Local<v8::Float64Array> trig_table = |
| 2691 v8::Float64Array::New(trig_buffer, 0, constants_size); | 2691 v8::Float64Array::New(trig_buffer, 0, constants_size); |
| 2692 | 2692 |
| 2693 Runtime::DefineObjectProperty( | 2693 Runtime::DefineObjectProperty( |
| 2694 builtins, | 2694 builtins, |
| 2695 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("kMath")), | 2695 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("kMath")), |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2722 return from + sizeof(NestingCounterType); | 2722 return from + sizeof(NestingCounterType); |
| 2723 } | 2723 } |
| 2724 | 2724 |
| 2725 | 2725 |
| 2726 // Called when the top-level V8 mutex is destroyed. | 2726 // Called when the top-level V8 mutex is destroyed. |
| 2727 void Bootstrapper::FreeThreadResources() { | 2727 void Bootstrapper::FreeThreadResources() { |
| 2728 DCHECK(!IsActive()); | 2728 DCHECK(!IsActive()); |
| 2729 } | 2729 } |
| 2730 | 2730 |
| 2731 } } // namespace v8::internal | 2731 } } // namespace v8::internal |
| OLD | NEW |