| 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/builtins.h" | 5 #include "src/builtins.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 DCHECK(!CalledAsConstructor(isolate)); | 1102 DCHECK(!CalledAsConstructor(isolate)); |
| 1103 Heap* heap = isolate->heap(); | 1103 Heap* heap = isolate->heap(); |
| 1104 | 1104 |
| 1105 Handle<Object> receiver = args.receiver(); | 1105 Handle<Object> receiver = args.receiver(); |
| 1106 | 1106 |
| 1107 // Get the object called. | 1107 // Get the object called. |
| 1108 JSObject* obj = JSObject::cast(*receiver); | 1108 JSObject* obj = JSObject::cast(*receiver); |
| 1109 | 1109 |
| 1110 // Get the invocation callback from the function descriptor that was | 1110 // Get the invocation callback from the function descriptor that was |
| 1111 // used to create the called object. | 1111 // used to create the called object. |
| 1112 DCHECK(obj->map()->has_instance_call_handler()); | 1112 DCHECK(obj->map()->is_callable()); |
| 1113 JSFunction* constructor = JSFunction::cast(obj->map()->GetConstructor()); | 1113 JSFunction* constructor = JSFunction::cast(obj->map()->GetConstructor()); |
| 1114 // TODO(ishell): turn this back to a DCHECK. | 1114 // TODO(ishell): turn this back to a DCHECK. |
| 1115 CHECK(constructor->shared()->IsApiFunction()); | 1115 CHECK(constructor->shared()->IsApiFunction()); |
| 1116 Object* handler = | 1116 Object* handler = |
| 1117 constructor->shared()->get_api_func_data()->instance_call_handler(); | 1117 constructor->shared()->get_api_func_data()->instance_call_handler(); |
| 1118 DCHECK(!handler->IsUndefined()); | 1118 DCHECK(!handler->IsUndefined()); |
| 1119 // TODO(ishell): remove this debugging code. | 1119 // TODO(ishell): remove this debugging code. |
| 1120 CHECK(handler->IsCallHandlerInfo()); | 1120 CHECK(handler->IsCallHandlerInfo()); |
| 1121 CallHandlerInfo* call_data = CallHandlerInfo::cast(handler); | 1121 CallHandlerInfo* call_data = CallHandlerInfo::cast(handler); |
| 1122 Object* callback_obj = call_data->callback(); | 1122 Object* callback_obj = call_data->callback(); |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1527 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1528 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1528 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1529 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1529 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1530 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1530 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1531 #undef DEFINE_BUILTIN_ACCESSOR_C | 1531 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1532 #undef DEFINE_BUILTIN_ACCESSOR_A | 1532 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1533 | 1533 |
| 1534 | 1534 |
| 1535 } // namespace internal | 1535 } // namespace internal |
| 1536 } // namespace v8 | 1536 } // namespace v8 |
| OLD | NEW |