| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 | 2029 |
| 2030 | 2030 |
| 2031 static i::Handle<i::Object> CallV8HeapFunction(const char* name, | 2031 static i::Handle<i::Object> CallV8HeapFunction(const char* name, |
| 2032 i::Handle<i::Object> recv, | 2032 i::Handle<i::Object> recv, |
| 2033 int argc, | 2033 int argc, |
| 2034 i::Handle<i::Object> argv[], | 2034 i::Handle<i::Object> argv[], |
| 2035 bool* has_pending_exception) { | 2035 bool* has_pending_exception) { |
| 2036 i::Isolate* isolate = i::Isolate::Current(); | 2036 i::Isolate* isolate = i::Isolate::Current(); |
| 2037 i::Handle<i::String> fmt_str = | 2037 i::Handle<i::String> fmt_str = |
| 2038 isolate->factory()->InternalizeUtf8String(name); | 2038 isolate->factory()->InternalizeUtf8String(name); |
| 2039 i::Object* object_fun = | 2039 i::Handle<i::Object> object_fun = |
| 2040 isolate->js_builtins_object()->GetPropertyNoExceptionThrown(*fmt_str); | 2040 i::GlobalObject::GetPropertyNoExceptionThrown( |
| 2041 i::Handle<i::JSFunction> fun = | 2041 isolate->js_builtins_object(), fmt_str); |
| 2042 i::Handle<i::JSFunction>(i::JSFunction::cast(object_fun)); | 2042 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(object_fun); |
| 2043 i::Handle<i::Object> value = i::Execution::Call( | 2043 i::Handle<i::Object> value = i::Execution::Call( |
| 2044 isolate, fun, recv, argc, argv, has_pending_exception); | 2044 isolate, fun, recv, argc, argv, has_pending_exception); |
| 2045 return value; | 2045 return value; |
| 2046 } | 2046 } |
| 2047 | 2047 |
| 2048 | 2048 |
| 2049 static i::Handle<i::Object> CallV8HeapFunction(const char* name, | 2049 static i::Handle<i::Object> CallV8HeapFunction(const char* name, |
| 2050 i::Handle<i::Object> data, | 2050 i::Handle<i::Object> data, |
| 2051 bool* has_pending_exception) { | 2051 bool* has_pending_exception) { |
| 2052 i::Handle<i::Object> argv[] = { data }; | 2052 i::Handle<i::Object> argv[] = { data }; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2477 i::Isolate* isolate = i::Isolate::Current(); | 2477 i::Isolate* isolate = i::Isolate::Current(); |
| 2478 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 2478 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
| 2479 return obj->HasSpecificClassOf(isolate->heap()->Number_string()); | 2479 return obj->HasSpecificClassOf(isolate->heap()->Number_string()); |
| 2480 } | 2480 } |
| 2481 | 2481 |
| 2482 | 2482 |
| 2483 static i::Object* LookupBuiltin(i::Isolate* isolate, | 2483 static i::Object* LookupBuiltin(i::Isolate* isolate, |
| 2484 const char* builtin_name) { | 2484 const char* builtin_name) { |
| 2485 i::Handle<i::String> string = | 2485 i::Handle<i::String> string = |
| 2486 isolate->factory()->InternalizeUtf8String(builtin_name); | 2486 isolate->factory()->InternalizeUtf8String(builtin_name); |
| 2487 i::Handle<i::JSBuiltinsObject> builtins = isolate->js_builtins_object(); | 2487 return *i::GlobalObject::GetPropertyNoExceptionThrown( |
| 2488 return builtins->GetPropertyNoExceptionThrown(*string); | 2488 isolate->js_builtins_object(), string); |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 | 2491 |
| 2492 static bool CheckConstructor(i::Isolate* isolate, | 2492 static bool CheckConstructor(i::Isolate* isolate, |
| 2493 i::Handle<i::JSObject> obj, | 2493 i::Handle<i::JSObject> obj, |
| 2494 const char* class_name) { | 2494 const char* class_name) { |
| 2495 i::Object* constr = obj->map()->constructor(); | 2495 i::Object* constr = obj->map()->constructor(); |
| 2496 if (!constr->IsJSFunction()) return false; | 2496 if (!constr->IsJSFunction()) return false; |
| 2497 i::JSFunction* func = i::JSFunction::cast(constr); | 2497 i::JSFunction* func = i::JSFunction::cast(constr); |
| 2498 return func->shared()->native() && | 2498 return func->shared()->native() && |
| (...skipping 5173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7672 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7672 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7673 Address callback_address = | 7673 Address callback_address = |
| 7674 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7674 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7675 VMState<EXTERNAL> state(isolate); | 7675 VMState<EXTERNAL> state(isolate); |
| 7676 ExternalCallbackScope call_scope(isolate, callback_address); | 7676 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7677 callback(info); | 7677 callback(info); |
| 7678 } | 7678 } |
| 7679 | 7679 |
| 7680 | 7680 |
| 7681 } } // namespace v8::internal | 7681 } } // namespace v8::internal |
| OLD | NEW |