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 6774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6785 return Utils::ToLocal(i_isolate->factory()->unscopables_symbol()); | 6785 return Utils::ToLocal(i_isolate->factory()->unscopables_symbol()); |
6786 } | 6786 } |
6787 | 6787 |
6788 | 6788 |
6789 Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) { | 6789 Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) { |
6790 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6790 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6791 return Utils::ToLocal(i_isolate->factory()->to_string_tag_symbol()); | 6791 return Utils::ToLocal(i_isolate->factory()->to_string_tag_symbol()); |
6792 } | 6792 } |
6793 | 6793 |
6794 | 6794 |
| 6795 Local<Symbol> v8::Symbol::GetIsConcatSpreadable(Isolate* isolate) { |
| 6796 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 6797 return Utils::ToLocal(i_isolate->factory()->is_concat_spreadable_symbol()); |
| 6798 } |
| 6799 |
| 6800 |
6795 Local<Number> v8::Number::New(Isolate* isolate, double value) { | 6801 Local<Number> v8::Number::New(Isolate* isolate, double value) { |
6796 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6802 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6797 if (std::isnan(value)) { | 6803 if (std::isnan(value)) { |
6798 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 6804 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
6799 value = std::numeric_limits<double>::quiet_NaN(); | 6805 value = std::numeric_limits<double>::quiet_NaN(); |
6800 } | 6806 } |
6801 ENTER_V8(internal_isolate); | 6807 ENTER_V8(internal_isolate); |
6802 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6808 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
6803 return Utils::NumberToLocal(result); | 6809 return Utils::NumberToLocal(result); |
6804 } | 6810 } |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8355 Address callback_address = | 8361 Address callback_address = |
8356 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8362 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8357 VMState<EXTERNAL> state(isolate); | 8363 VMState<EXTERNAL> state(isolate); |
8358 ExternalCallbackScope call_scope(isolate, callback_address); | 8364 ExternalCallbackScope call_scope(isolate, callback_address); |
8359 callback(info); | 8365 callback(info); |
8360 } | 8366 } |
8361 | 8367 |
8362 | 8368 |
8363 } // namespace internal | 8369 } // namespace internal |
8364 } // namespace v8 | 8370 } // namespace v8 |
OLD | NEW |