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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 } | 953 } |
954 | 954 |
955 | 955 |
956 // ------------------------------------------------------------------------ | 956 // ------------------------------------------------------------------------ |
957 // StubCompiler implementation. | 957 // StubCompiler implementation. |
958 | 958 |
959 | 959 |
960 MaybeObject* LoadCallbackProperty(Arguments args) { | 960 MaybeObject* LoadCallbackProperty(Arguments args) { |
961 ASSERT(args[0]->IsJSObject()); | 961 ASSERT(args[0]->IsJSObject()); |
962 ASSERT(args[1]->IsJSObject()); | 962 ASSERT(args[1]->IsJSObject()); |
963 AccessorInfo* callback = AccessorInfo::cast(args[2]); | 963 AccessorInfo* callback = AccessorInfo::cast(args[3]); |
964 Address getter_address = v8::ToCData<Address>(callback->getter()); | 964 Address getter_address = v8::ToCData<Address>(callback->getter()); |
965 v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address); | 965 v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address); |
966 ASSERT(fun != NULL); | 966 ASSERT(fun != NULL); |
967 CustomArguments custom_args(callback->data(), | 967 v8::AccessorInfo info(&args[0]); |
968 JSObject::cast(args[0]), | |
969 JSObject::cast(args[1])); | |
970 v8::AccessorInfo info(custom_args.end()); | |
971 HandleScope scope; | 968 HandleScope scope; |
972 v8::Handle<v8::Value> result; | 969 v8::Handle<v8::Value> result; |
973 { | 970 { |
974 // Leaving JavaScript. | 971 // Leaving JavaScript. |
975 VMState state(EXTERNAL); | 972 VMState state(EXTERNAL); |
976 #ifdef ENABLE_LOGGING_AND_PROFILING | 973 #ifdef ENABLE_LOGGING_AND_PROFILING |
977 state.set_external_callback(getter_address); | 974 state.set_external_callback(getter_address); |
978 #endif | 975 #endif |
979 result = fun(v8::Utils::ToLocal(args.at<String>(4)), info); | 976 result = fun(v8::Utils::ToLocal(args.at<String>(4)), info); |
980 } | 977 } |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 expected_receiver_type_ = | 1536 expected_receiver_type_ = |
1540 FunctionTemplateInfo::cast(signature->receiver()); | 1537 FunctionTemplateInfo::cast(signature->receiver()); |
1541 } | 1538 } |
1542 } | 1539 } |
1543 | 1540 |
1544 is_simple_api_call_ = true; | 1541 is_simple_api_call_ = true; |
1545 } | 1542 } |
1546 | 1543 |
1547 | 1544 |
1548 } } // namespace v8::internal | 1545 } } // namespace v8::internal |
OLD | NEW |