OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 } | 1970 } |
1971 | 1971 |
1972 CallOptimization optimization(function); | 1972 CallOptimization optimization(function); |
1973 return optimization.is_simple_api_call(); | 1973 return optimization.is_simple_api_call(); |
1974 } | 1974 } |
1975 | 1975 |
1976 | 1976 |
1977 Handle<Code> CallStubCompiler::CompileCustomCall( | 1977 Handle<Code> CallStubCompiler::CompileCustomCall( |
1978 Handle<Object> object, | 1978 Handle<Object> object, |
1979 Handle<JSObject> holder, | 1979 Handle<JSObject> holder, |
1980 Handle<JSGlobalPropertyCell> cell, | 1980 Handle<Cell> cell, |
1981 Handle<JSFunction> function, | 1981 Handle<JSFunction> function, |
1982 Handle<String> fname) { | 1982 Handle<String> fname) { |
1983 ASSERT(HasCustomCallGenerator(function)); | 1983 ASSERT(HasCustomCallGenerator(function)); |
1984 | 1984 |
1985 if (function->shared()->HasBuiltinFunctionId()) { | 1985 if (function->shared()->HasBuiltinFunctionId()) { |
1986 BuiltinFunctionId id = function->shared()->builtin_function_id(); | 1986 BuiltinFunctionId id = function->shared()->builtin_function_id(); |
1987 #define CALL_GENERATOR_CASE(name) \ | 1987 #define CALL_GENERATOR_CASE(name) \ |
1988 if (id == k##name) { \ | 1988 if (id == k##name) { \ |
1989 return CallStubCompiler::Compile##name##Call(object, \ | 1989 return CallStubCompiler::Compile##name##Call(object, \ |
1990 holder, \ | 1990 holder, \ |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2093 Handle<FunctionTemplateInfo>( | 2093 Handle<FunctionTemplateInfo>( |
2094 FunctionTemplateInfo::cast(signature->receiver())); | 2094 FunctionTemplateInfo::cast(signature->receiver())); |
2095 } | 2095 } |
2096 } | 2096 } |
2097 | 2097 |
2098 is_simple_api_call_ = true; | 2098 is_simple_api_call_ = true; |
2099 } | 2099 } |
2100 | 2100 |
2101 | 2101 |
2102 } } // namespace v8::internal | 2102 } } // namespace v8::internal |
OLD | NEW |