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 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2562 i::Handle<i::JSFunction> func = i::Handle<i::JSFunction>::cast(obj); | 2562 i::Handle<i::JSFunction> func = i::Handle<i::JSFunction>::cast(obj); |
2563 return func->shared()->is_generator(); | 2563 return func->shared()->is_generator(); |
2564 } | 2564 } |
2565 | 2565 |
2566 | 2566 |
2567 bool Value::IsGeneratorObject() const { | 2567 bool Value::IsGeneratorObject() const { |
2568 return Utils::OpenHandle(this)->IsJSGeneratorObject(); | 2568 return Utils::OpenHandle(this)->IsJSGeneratorObject(); |
2569 } | 2569 } |
2570 | 2570 |
2571 | 2571 |
| 2572 bool Value::IsMapIterator() const { |
| 2573 return Utils::OpenHandle(this)->IsJSMapIterator(); |
| 2574 } |
| 2575 |
| 2576 |
| 2577 bool Value::IsSetIterator() const { |
| 2578 return Utils::OpenHandle(this)->IsJSSetIterator(); |
| 2579 } |
| 2580 |
| 2581 |
2572 Local<String> Value::ToString(Isolate* v8_isolate) const { | 2582 Local<String> Value::ToString(Isolate* v8_isolate) const { |
2573 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 2583 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
2574 i::Handle<i::Object> str; | 2584 i::Handle<i::Object> str; |
2575 if (obj->IsString()) { | 2585 if (obj->IsString()) { |
2576 str = obj; | 2586 str = obj; |
2577 } else { | 2587 } else { |
2578 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 2588 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
2579 LOG_API(isolate, "ToString"); | 2589 LOG_API(isolate, "ToString"); |
2580 ENTER_V8(isolate); | 2590 ENTER_V8(isolate); |
2581 EXCEPTION_PREAMBLE(isolate); | 2591 EXCEPTION_PREAMBLE(isolate); |
(...skipping 5177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7759 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7769 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7760 Address callback_address = | 7770 Address callback_address = |
7761 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7771 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7762 VMState<EXTERNAL> state(isolate); | 7772 VMState<EXTERNAL> state(isolate); |
7763 ExternalCallbackScope call_scope(isolate, callback_address); | 7773 ExternalCallbackScope call_scope(isolate, callback_address); |
7764 callback(info); | 7774 callback(info); |
7765 } | 7775 } |
7766 | 7776 |
7767 | 7777 |
7768 } } // namespace v8::internal | 7778 } } // namespace v8::internal |
OLD | NEW |