| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 | 1044 |
| 1045 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( | 1045 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( |
| 1046 custom.end(), | 1046 custom.end(), |
| 1047 &args[0] - 1, | 1047 &args[0] - 1, |
| 1048 args.length() - 1, | 1048 args.length() - 1, |
| 1049 is_construct); | 1049 is_construct); |
| 1050 | 1050 |
| 1051 v8::Handle<v8::Value> value; | 1051 v8::Handle<v8::Value> value; |
| 1052 { | 1052 { |
| 1053 // Leaving JavaScript. | 1053 // Leaving JavaScript. |
| 1054 VMState state(EXTERNAL); | 1054 VMState state(isolate, EXTERNAL); |
| 1055 #ifdef ENABLE_LOGGING_AND_PROFILING | 1055 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 1056 state.set_external_callback(v8::ToCData<Address>(callback_obj)); | 1056 state.set_external_callback(v8::ToCData<Address>(callback_obj)); |
| 1057 #endif | 1057 #endif |
| 1058 value = callback(new_args); | 1058 value = callback(new_args); |
| 1059 } | 1059 } |
| 1060 if (value.IsEmpty()) { | 1060 if (value.IsEmpty()) { |
| 1061 result = heap->undefined_value(); | 1061 result = heap->undefined_value(); |
| 1062 } else { | 1062 } else { |
| 1063 result = *reinterpret_cast<Object**>(*value); | 1063 result = *reinterpret_cast<Object**>(*value); |
| 1064 } | 1064 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 custom.end(), | 1124 custom.end(), |
| 1125 &args[0] - 1, | 1125 &args[0] - 1, |
| 1126 args_length - 1, | 1126 args_length - 1, |
| 1127 is_construct); | 1127 is_construct); |
| 1128 | 1128 |
| 1129 HandleScope scope; | 1129 HandleScope scope; |
| 1130 Object* result; | 1130 Object* result; |
| 1131 v8::Handle<v8::Value> value; | 1131 v8::Handle<v8::Value> value; |
| 1132 { | 1132 { |
| 1133 // Leaving JavaScript. | 1133 // Leaving JavaScript. |
| 1134 VMState state(EXTERNAL); | 1134 VMState state(isolate, EXTERNAL); |
| 1135 #ifdef ENABLE_LOGGING_AND_PROFILING | 1135 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 1136 state.set_external_callback(v8::ToCData<Address>(callback_obj)); | 1136 state.set_external_callback(v8::ToCData<Address>(callback_obj)); |
| 1137 #endif | 1137 #endif |
| 1138 v8::InvocationCallback callback = | 1138 v8::InvocationCallback callback = |
| 1139 v8::ToCData<v8::InvocationCallback>(callback_obj); | 1139 v8::ToCData<v8::InvocationCallback>(callback_obj); |
| 1140 | 1140 |
| 1141 value = callback(new_args); | 1141 value = callback(new_args); |
| 1142 } | 1142 } |
| 1143 if (value.IsEmpty()) { | 1143 if (value.IsEmpty()) { |
| 1144 result = heap->undefined_value(); | 1144 result = heap->undefined_value(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 v8::ImplementationUtilities::PrepareArgumentsData(custom.end(), | 1192 v8::ImplementationUtilities::PrepareArgumentsData(custom.end(), |
| 1193 call_data->data(), constructor, obj); | 1193 call_data->data(), constructor, obj); |
| 1194 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( | 1194 v8::Arguments new_args = v8::ImplementationUtilities::NewArguments( |
| 1195 custom.end(), | 1195 custom.end(), |
| 1196 &args[0] - 1, | 1196 &args[0] - 1, |
| 1197 args.length() - 1, | 1197 args.length() - 1, |
| 1198 is_construct_call); | 1198 is_construct_call); |
| 1199 v8::Handle<v8::Value> value; | 1199 v8::Handle<v8::Value> value; |
| 1200 { | 1200 { |
| 1201 // Leaving JavaScript. | 1201 // Leaving JavaScript. |
| 1202 VMState state(EXTERNAL); | 1202 VMState state(isolate, EXTERNAL); |
| 1203 #ifdef ENABLE_LOGGING_AND_PROFILING | 1203 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 1204 state.set_external_callback(v8::ToCData<Address>(callback_obj)); | 1204 state.set_external_callback(v8::ToCData<Address>(callback_obj)); |
| 1205 #endif | 1205 #endif |
| 1206 value = callback(new_args); | 1206 value = callback(new_args); |
| 1207 } | 1207 } |
| 1208 if (value.IsEmpty()) { | 1208 if (value.IsEmpty()) { |
| 1209 result = heap->undefined_value(); | 1209 result = heap->undefined_value(); |
| 1210 } else { | 1210 } else { |
| 1211 result = *reinterpret_cast<Object**>(*value); | 1211 result = *reinterpret_cast<Object**>(*value); |
| 1212 } | 1212 } |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 Code* entry = Code::cast(builtins_[i]); | 1643 Code* entry = Code::cast(builtins_[i]); |
| 1644 if (entry->contains(pc)) { | 1644 if (entry->contains(pc)) { |
| 1645 return names_[i]; | 1645 return names_[i]; |
| 1646 } | 1646 } |
| 1647 } | 1647 } |
| 1648 } | 1648 } |
| 1649 return NULL; | 1649 return NULL; |
| 1650 } | 1650 } |
| 1651 | 1651 |
| 1652 } } // namespace v8::internal | 1652 } } // namespace v8::internal |
| OLD | NEW |