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 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2656 const int table_num_bytes = constants_size * kDoubleSize; | 2656 const int table_num_bytes = constants_size * kDoubleSize; |
2657 v8::Local<v8::ArrayBuffer> trig_buffer = v8::ArrayBuffer::New( | 2657 v8::Local<v8::ArrayBuffer> trig_buffer = v8::ArrayBuffer::New( |
2658 reinterpret_cast<v8::Isolate*>(isolate), | 2658 reinterpret_cast<v8::Isolate*>(isolate), |
2659 const_cast<double*>(fdlibm::TrigonometricConstants::constants), | 2659 const_cast<double*>(fdlibm::TrigonometricConstants::constants), |
2660 table_num_bytes); | 2660 table_num_bytes); |
2661 v8::Local<v8::Float64Array> trig_table = | 2661 v8::Local<v8::Float64Array> trig_table = |
2662 v8::Float64Array::New(trig_buffer, 0, constants_size); | 2662 v8::Float64Array::New(trig_buffer, 0, constants_size); |
2663 | 2663 |
2664 Runtime::DefineObjectProperty( | 2664 Runtime::DefineObjectProperty( |
2665 builtins, | 2665 builtins, |
2666 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("kTrig")), | 2666 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("kMath")), |
2667 Utils::OpenHandle(*trig_table), NONE).Assert(); | 2667 Utils::OpenHandle(*trig_table), NONE).Assert(); |
2668 } | 2668 } |
2669 | 2669 |
2670 result_ = native_context(); | 2670 result_ = native_context(); |
2671 } | 2671 } |
2672 | 2672 |
2673 | 2673 |
2674 // Support for thread preemption. | 2674 // Support for thread preemption. |
2675 | 2675 |
2676 // Reserve space for statics needing saving and restoring. | 2676 // Reserve space for statics needing saving and restoring. |
(...skipping 16 matching lines...) Expand all Loading... |
2693 return from + sizeof(NestingCounterType); | 2693 return from + sizeof(NestingCounterType); |
2694 } | 2694 } |
2695 | 2695 |
2696 | 2696 |
2697 // Called when the top-level V8 mutex is destroyed. | 2697 // Called when the top-level V8 mutex is destroyed. |
2698 void Bootstrapper::FreeThreadResources() { | 2698 void Bootstrapper::FreeThreadResources() { |
2699 DCHECK(!IsActive()); | 2699 DCHECK(!IsActive()); |
2700 } | 2700 } |
2701 | 2701 |
2702 } } // namespace v8::internal | 2702 } } // namespace v8::internal |
OLD | NEW |