OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 return CallTrap( | 461 return CallTrap( |
462 proxy, "get", isolate->derived_get_trap(), ARRAY_SIZE(args), args); | 462 proxy, "get", isolate->derived_get_trap(), ARRAY_SIZE(args), args); |
463 } | 463 } |
464 | 464 |
465 | 465 |
466 MaybeHandle<Object> Object::GetPropertyWithDefinedGetter( | 466 MaybeHandle<Object> Object::GetPropertyWithDefinedGetter( |
467 Handle<Object> object, | 467 Handle<Object> object, |
468 Handle<Object> receiver, | 468 Handle<Object> receiver, |
469 Handle<JSReceiver> getter) { | 469 Handle<JSReceiver> getter) { |
470 Isolate* isolate = getter->GetIsolate(); | 470 Isolate* isolate = getter->GetIsolate(); |
471 #ifdef ENABLE_DEBUGGER_SUPPORT | |
472 Debug* debug = isolate->debug(); | 471 Debug* debug = isolate->debug(); |
473 // Handle stepping into a getter if step into is active. | 472 // Handle stepping into a getter if step into is active. |
474 // TODO(rossberg): should this apply to getters that are function proxies? | 473 // TODO(rossberg): should this apply to getters that are function proxies? |
475 if (debug->StepInActive() && getter->IsJSFunction()) { | 474 if (debug->StepInActive() && getter->IsJSFunction()) { |
476 debug->HandleStepIn( | 475 debug->HandleStepIn( |
477 Handle<JSFunction>::cast(getter), Handle<Object>::null(), 0, false); | 476 Handle<JSFunction>::cast(getter), Handle<Object>::null(), 0, false); |
478 } | 477 } |
479 #endif | |
480 | 478 |
481 return Execution::Call(isolate, getter, receiver, 0, NULL, true); | 479 return Execution::Call(isolate, getter, receiver, 0, NULL, true); |
482 } | 480 } |
483 | 481 |
484 | 482 |
485 // Only deal with CALLBACKS and INTERCEPTOR | 483 // Only deal with CALLBACKS and INTERCEPTOR |
486 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( | 484 MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck( |
487 Handle<JSObject> object, | 485 Handle<JSObject> object, |
488 Handle<Object> receiver, | 486 Handle<Object> receiver, |
489 LookupResult* result, | 487 LookupResult* result, |
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2933 return MaybeHandle<Object>(); | 2931 return MaybeHandle<Object>(); |
2934 } | 2932 } |
2935 | 2933 |
2936 | 2934 |
2937 MaybeHandle<Object> JSReceiver::SetPropertyWithDefinedSetter( | 2935 MaybeHandle<Object> JSReceiver::SetPropertyWithDefinedSetter( |
2938 Handle<JSReceiver> object, | 2936 Handle<JSReceiver> object, |
2939 Handle<JSReceiver> setter, | 2937 Handle<JSReceiver> setter, |
2940 Handle<Object> value) { | 2938 Handle<Object> value) { |
2941 Isolate* isolate = object->GetIsolate(); | 2939 Isolate* isolate = object->GetIsolate(); |
2942 | 2940 |
2943 #ifdef ENABLE_DEBUGGER_SUPPORT | |
2944 Debug* debug = isolate->debug(); | 2941 Debug* debug = isolate->debug(); |
2945 // Handle stepping into a setter if step into is active. | 2942 // Handle stepping into a setter if step into is active. |
2946 // TODO(rossberg): should this apply to getters that are function proxies? | 2943 // TODO(rossberg): should this apply to getters that are function proxies? |
2947 if (debug->StepInActive() && setter->IsJSFunction()) { | 2944 if (debug->StepInActive() && setter->IsJSFunction()) { |
2948 debug->HandleStepIn( | 2945 debug->HandleStepIn( |
2949 Handle<JSFunction>::cast(setter), Handle<Object>::null(), 0, false); | 2946 Handle<JSFunction>::cast(setter), Handle<Object>::null(), 0, false); |
2950 } | 2947 } |
2951 #endif | |
2952 | 2948 |
2953 Handle<Object> argv[] = { value }; | 2949 Handle<Object> argv[] = { value }; |
2954 RETURN_ON_EXCEPTION( | 2950 RETURN_ON_EXCEPTION( |
2955 isolate, | 2951 isolate, |
2956 Execution::Call(isolate, setter, object, ARRAY_SIZE(argv), argv), | 2952 Execution::Call(isolate, setter, object, ARRAY_SIZE(argv), argv), |
2957 Object); | 2953 Object); |
2958 return value; | 2954 return value; |
2959 } | 2955 } |
2960 | 2956 |
2961 | 2957 |
(...skipping 13899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16861 } | 16857 } |
16862 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); | 16858 ASSERT(reinterpret_cast<uintptr_t>(array) % sizeof(uintptr_t) == 0); |
16863 DeclaredAccessorDescriptorData* data = | 16859 DeclaredAccessorDescriptorData* data = |
16864 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); | 16860 reinterpret_cast<DeclaredAccessorDescriptorData*>(array); |
16865 *data = descriptor; | 16861 *data = descriptor; |
16866 } | 16862 } |
16867 return value; | 16863 return value; |
16868 } | 16864 } |
16869 | 16865 |
16870 | 16866 |
16871 #ifdef ENABLE_DEBUGGER_SUPPORT | |
16872 // Check if there is a break point at this code position. | 16867 // Check if there is a break point at this code position. |
16873 bool DebugInfo::HasBreakPoint(int code_position) { | 16868 bool DebugInfo::HasBreakPoint(int code_position) { |
16874 // Get the break point info object for this code position. | 16869 // Get the break point info object for this code position. |
16875 Object* break_point_info = GetBreakPointInfo(code_position); | 16870 Object* break_point_info = GetBreakPointInfo(code_position); |
16876 | 16871 |
16877 // If there is no break point info object or no break points in the break | 16872 // If there is no break point info object or no break points in the break |
16878 // point info object there is no break point at this code position. | 16873 // point info object there is no break point at this code position. |
16879 if (break_point_info->IsUndefined()) return false; | 16874 if (break_point_info->IsUndefined()) return false; |
16880 return BreakPointInfo::cast(break_point_info)->GetBreakPointCount() > 0; | 16875 return BreakPointInfo::cast(break_point_info)->GetBreakPointCount() > 0; |
16881 } | 16876 } |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17115 | 17110 |
17116 // Get the number of break points. | 17111 // Get the number of break points. |
17117 int BreakPointInfo::GetBreakPointCount() { | 17112 int BreakPointInfo::GetBreakPointCount() { |
17118 // No break point. | 17113 // No break point. |
17119 if (break_point_objects()->IsUndefined()) return 0; | 17114 if (break_point_objects()->IsUndefined()) return 0; |
17120 // Single break point. | 17115 // Single break point. |
17121 if (!break_point_objects()->IsFixedArray()) return 1; | 17116 if (!break_point_objects()->IsFixedArray()) return 1; |
17122 // Multiple break points. | 17117 // Multiple break points. |
17123 return FixedArray::cast(break_point_objects())->length(); | 17118 return FixedArray::cast(break_point_objects())->length(); |
17124 } | 17119 } |
17125 #endif // ENABLE_DEBUGGER_SUPPORT | |
17126 | 17120 |
17127 | 17121 |
17128 Object* JSDate::GetField(Object* object, Smi* index) { | 17122 Object* JSDate::GetField(Object* object, Smi* index) { |
17129 return JSDate::cast(object)->DoGetField( | 17123 return JSDate::cast(object)->DoGetField( |
17130 static_cast<FieldIndex>(index->value())); | 17124 static_cast<FieldIndex>(index->value())); |
17131 } | 17125 } |
17132 | 17126 |
17133 | 17127 |
17134 Object* JSDate::DoGetField(FieldIndex index) { | 17128 Object* JSDate::DoGetField(FieldIndex index) { |
17135 ASSERT(index != kDateValue); | 17129 ASSERT(index != kDateValue); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17402 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17396 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17403 static const char* error_messages_[] = { | 17397 static const char* error_messages_[] = { |
17404 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17398 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17405 }; | 17399 }; |
17406 #undef ERROR_MESSAGES_TEXTS | 17400 #undef ERROR_MESSAGES_TEXTS |
17407 return error_messages_[reason]; | 17401 return error_messages_[reason]; |
17408 } | 17402 } |
17409 | 17403 |
17410 | 17404 |
17411 } } // namespace v8::internal | 17405 } } // namespace v8::internal |
OLD | NEW |