OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 6775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6786 return Utils::ToLocal(i_isolate->factory()->unscopables_symbol()); | 6786 return Utils::ToLocal(i_isolate->factory()->unscopables_symbol()); |
6787 } | 6787 } |
6788 | 6788 |
6789 | 6789 |
6790 Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) { | 6790 Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) { |
6791 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6791 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6792 return Utils::ToLocal(i_isolate->factory()->to_string_tag_symbol()); | 6792 return Utils::ToLocal(i_isolate->factory()->to_string_tag_symbol()); |
6793 } | 6793 } |
6794 | 6794 |
6795 | 6795 |
| 6796 Local<Symbol> v8::Symbol::GetIsConcatSpreadable(Isolate* isolate) { |
| 6797 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 6798 return Utils::ToLocal(i_isolate->factory()->is_concat_spreadable_symbol()); |
| 6799 } |
| 6800 |
| 6801 |
6796 Local<Number> v8::Number::New(Isolate* isolate, double value) { | 6802 Local<Number> v8::Number::New(Isolate* isolate, double value) { |
6797 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6803 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6798 if (std::isnan(value)) { | 6804 if (std::isnan(value)) { |
6799 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 6805 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
6800 value = std::numeric_limits<double>::quiet_NaN(); | 6806 value = std::numeric_limits<double>::quiet_NaN(); |
6801 } | 6807 } |
6802 ENTER_V8(internal_isolate); | 6808 ENTER_V8(internal_isolate); |
6803 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6809 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
6804 return Utils::NumberToLocal(result); | 6810 return Utils::NumberToLocal(result); |
6805 } | 6811 } |
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8349 Address callback_address = | 8355 Address callback_address = |
8350 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8356 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8351 VMState<EXTERNAL> state(isolate); | 8357 VMState<EXTERNAL> state(isolate); |
8352 ExternalCallbackScope call_scope(isolate, callback_address); | 8358 ExternalCallbackScope call_scope(isolate, callback_address); |
8353 callback(info); | 8359 callback(info); |
8354 } | 8360 } |
8355 | 8361 |
8356 | 8362 |
8357 } // namespace internal | 8363 } // namespace internal |
8358 } // namespace v8 | 8364 } // namespace v8 |
OLD | NEW |