Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 5767002: Merge math function ids and custom call generator ids. (Closed)
Patch Set: arm and x64 fixes. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, 2105 MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
2106 JSObject* holder, 2106 JSObject* holder,
2107 JSFunction* function, 2107 JSFunction* function,
2108 String* name, 2108 String* name,
2109 CheckType check) { 2109 CheckType check) {
2110 // ----------- S t a t e ------------- 2110 // ----------- S t a t e -------------
2111 // -- r2 : name 2111 // -- r2 : name
2112 // -- lr : return address 2112 // -- lr : return address
2113 // ----------------------------------- 2113 // -----------------------------------
2114 SharedFunctionInfo* function_info = function->shared(); 2114 SharedFunctionInfo* function_info = function->shared();
2115 if (function_info->HasCustomCallGenerator()) { 2115 if (function_info->HasBuiltinFunctionId()) {
2116 const int id = function_info->custom_call_generator_id(); 2116 BuiltinFunctionId id = function_info->builtin_function_id();
2117 MaybeObject* maybe_result = CompileCustomCall( 2117 MaybeObject* maybe_result = CompileCustomCall(
2118 id, object, holder, NULL, function, name); 2118 id, object, holder, NULL, function, name);
2119 Object* result; 2119 Object* result;
2120 if (!maybe_result->ToObject(&result)) return maybe_result; 2120 if (!maybe_result->ToObject(&result)) return maybe_result;
2121 // undefined means bail out to regular compiler. 2121 // undefined means bail out to regular compiler.
2122 if (!result->IsUndefined()) { 2122 if (!result->IsUndefined()) {
2123 return result; 2123 return result;
2124 } 2124 }
2125 } 2125 }
2126 2126
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 GlobalObject* holder, 2316 GlobalObject* holder,
2317 JSGlobalPropertyCell* cell, 2317 JSGlobalPropertyCell* cell,
2318 JSFunction* function, 2318 JSFunction* function,
2319 String* name) { 2319 String* name) {
2320 // ----------- S t a t e ------------- 2320 // ----------- S t a t e -------------
2321 // -- r2 : name 2321 // -- r2 : name
2322 // -- lr : return address 2322 // -- lr : return address
2323 // ----------------------------------- 2323 // -----------------------------------
2324 2324
2325 SharedFunctionInfo* function_info = function->shared(); 2325 SharedFunctionInfo* function_info = function->shared();
2326 if (function_info->HasCustomCallGenerator()) { 2326 if (function_info->HasBuiltinFunctionId()) {
2327 const int id = function_info->custom_call_generator_id(); 2327 BuiltinFunctionId id = function_info->builtin_function_id();
2328 MaybeObject* maybe_result = CompileCustomCall( 2328 MaybeObject* maybe_result = CompileCustomCall(
2329 id, object, holder, cell, function, name); 2329 id, object, holder, cell, function, name);
2330 Object* result; 2330 Object* result;
2331 if (!maybe_result->ToObject(&result)) return maybe_result; 2331 if (!maybe_result->ToObject(&result)) return maybe_result;
2332 // undefined means bail out to regular compiler. 2332 // undefined means bail out to regular compiler.
2333 if (!result->IsUndefined()) return result; 2333 if (!result->IsUndefined()) return result;
2334 } 2334 }
2335 2335
2336 Label miss; 2336 Label miss;
2337 2337
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3200 // Return the generated code. 3200 // Return the generated code.
3201 return GetCode(); 3201 return GetCode();
3202 } 3202 }
3203 3203
3204 3204
3205 #undef __ 3205 #undef __
3206 3206
3207 } } // namespace v8::internal 3207 } } // namespace v8::internal
3208 3208
3209 #endif // V8_TARGET_ARCH_ARM 3209 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ast.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698