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