OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 } | 535 } |
536 | 536 |
537 | 537 |
538 MaybeHandle<Object> Object::GetPropertyWithDefinedGetter( | 538 MaybeHandle<Object> Object::GetPropertyWithDefinedGetter( |
539 Handle<Object> receiver, | 539 Handle<Object> receiver, |
540 Handle<JSReceiver> getter) { | 540 Handle<JSReceiver> getter) { |
541 Isolate* isolate = getter->GetIsolate(); | 541 Isolate* isolate = getter->GetIsolate(); |
542 Debug* debug = isolate->debug(); | 542 Debug* debug = isolate->debug(); |
543 // Handle stepping into a getter if step into is active. | 543 // Handle stepping into a getter if step into is active. |
544 // TODO(rossberg): should this apply to getters that are function proxies? | 544 // TODO(rossberg): should this apply to getters that are function proxies? |
545 if (debug->StepInActive() && getter->IsJSFunction()) { | 545 if (debug->is_active()) { |
546 debug->HandleStepIn( | 546 debug->HandleStepIn(getter, Handle<Object>::null(), 0, false); |
547 Handle<JSFunction>::cast(getter), Handle<Object>::null(), 0, false); | |
548 } | 547 } |
549 | 548 |
550 return Execution::Call(isolate, getter, receiver, 0, NULL, true); | 549 return Execution::Call(isolate, getter, receiver, 0, NULL, true); |
551 } | 550 } |
552 | 551 |
553 | 552 |
554 MaybeHandle<Object> Object::SetPropertyWithDefinedSetter( | 553 MaybeHandle<Object> Object::SetPropertyWithDefinedSetter( |
555 Handle<Object> receiver, | 554 Handle<Object> receiver, |
556 Handle<JSReceiver> setter, | 555 Handle<JSReceiver> setter, |
557 Handle<Object> value) { | 556 Handle<Object> value) { |
558 Isolate* isolate = setter->GetIsolate(); | 557 Isolate* isolate = setter->GetIsolate(); |
559 | 558 |
560 Debug* debug = isolate->debug(); | 559 Debug* debug = isolate->debug(); |
561 // Handle stepping into a setter if step into is active. | 560 // Handle stepping into a setter if step into is active. |
562 // TODO(rossberg): should this apply to getters that are function proxies? | 561 // TODO(rossberg): should this apply to getters that are function proxies? |
563 if (debug->StepInActive() && setter->IsJSFunction()) { | 562 if (debug->is_active()) { |
564 debug->HandleStepIn( | 563 debug->HandleStepIn(setter, Handle<Object>::null(), 0, false); |
565 Handle<JSFunction>::cast(setter), Handle<Object>::null(), 0, false); | |
566 } | 564 } |
567 | 565 |
568 Handle<Object> argv[] = { value }; | 566 Handle<Object> argv[] = { value }; |
569 RETURN_ON_EXCEPTION(isolate, Execution::Call(isolate, setter, receiver, | 567 RETURN_ON_EXCEPTION(isolate, Execution::Call(isolate, setter, receiver, |
570 arraysize(argv), argv, true), | 568 arraysize(argv), argv, true), |
571 Object); | 569 Object); |
572 return value; | 570 return value; |
573 } | 571 } |
574 | 572 |
575 | 573 |
(...skipping 15989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16565 Handle<DependentCode> codes = | 16563 Handle<DependentCode> codes = |
16566 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16564 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
16567 DependentCode::kPropertyCellChangedGroup, | 16565 DependentCode::kPropertyCellChangedGroup, |
16568 info->object_wrapper()); | 16566 info->object_wrapper()); |
16569 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16567 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
16570 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16568 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
16571 cell, info->zone()); | 16569 cell, info->zone()); |
16572 } | 16570 } |
16573 | 16571 |
16574 } } // namespace v8::internal | 16572 } } // namespace v8::internal |
OLD | NEW |