OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 | 728 |
729 | 729 |
730 // Support function for computing call IC miss stubs. | 730 // Support function for computing call IC miss stubs. |
731 Handle<Code> ComputeCallMiss(int argc) { | 731 Handle<Code> ComputeCallMiss(int argc) { |
732 CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc), Code); | 732 CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc), Code); |
733 } | 733 } |
734 | 734 |
735 | 735 |
736 | 736 |
737 Object* LoadCallbackProperty(Arguments args) { | 737 Object* LoadCallbackProperty(Arguments args) { |
| 738 ASSERT(args[0]->IsJSObject()); |
| 739 ASSERT(args[1]->IsJSObject()); |
738 AccessorInfo* callback = AccessorInfo::cast(args[2]); | 740 AccessorInfo* callback = AccessorInfo::cast(args[2]); |
739 Address getter_address = v8::ToCData<Address>(callback->getter()); | 741 Address getter_address = v8::ToCData<Address>(callback->getter()); |
740 v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address); | 742 v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address); |
741 ASSERT(fun != NULL); | 743 ASSERT(fun != NULL); |
742 v8::AccessorInfo info(args.arguments()); | 744 CustomArguments custom_args(callback->data(), |
| 745 JSObject::cast(args[0]), |
| 746 JSObject::cast(args[1])); |
| 747 v8::AccessorInfo info(custom_args.end()); |
743 HandleScope scope; | 748 HandleScope scope; |
744 v8::Handle<v8::Value> result; | 749 v8::Handle<v8::Value> result; |
745 { | 750 { |
746 // Leaving JavaScript. | 751 // Leaving JavaScript. |
747 VMState state(EXTERNAL); | 752 VMState state(EXTERNAL); |
748 result = fun(v8::Utils::ToLocal(args.at<String>(4)), info); | 753 result = fun(v8::Utils::ToLocal(args.at<String>(4)), info); |
749 } | 754 } |
750 RETURN_IF_SCHEDULED_EXCEPTION(); | 755 RETURN_IF_SCHEDULED_EXCEPTION(); |
751 if (result.IsEmpty()) return Heap::undefined_value(); | 756 if (result.IsEmpty()) return Heap::undefined_value(); |
752 return *v8::Utils::OpenHandle(*result); | 757 return *v8::Utils::OpenHandle(*result); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 if (!result->IsFailure()) { | 1093 if (!result->IsFailure()) { |
1089 Code* code = Code::cast(result); | 1094 Code* code = Code::cast(result); |
1090 USE(code); | 1095 USE(code); |
1091 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub")); | 1096 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub")); |
1092 } | 1097 } |
1093 return result; | 1098 return result; |
1094 } | 1099 } |
1095 | 1100 |
1096 | 1101 |
1097 } } // namespace v8::internal | 1102 } } // namespace v8::internal |
OLD | NEW |