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

Side by Side Diff: src/ia32/stub-cache-ia32.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 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 CheckType check) { 2126 CheckType check) {
2127 // ----------- S t a t e ------------- 2127 // ----------- S t a t e -------------
2128 // -- ecx : name 2128 // -- ecx : name
2129 // -- esp[0] : return address 2129 // -- esp[0] : return address
2130 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 2130 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
2131 // -- ... 2131 // -- ...
2132 // -- esp[(argc + 1) * 4] : receiver 2132 // -- esp[(argc + 1) * 4] : receiver
2133 // ----------------------------------- 2133 // -----------------------------------
2134 2134
2135 SharedFunctionInfo* function_info = function->shared(); 2135 SharedFunctionInfo* function_info = function->shared();
2136 if (function_info->HasCustomCallGenerator()) { 2136 if (function_info->HasBuiltinFunctionId()) {
2137 const int id = function_info->custom_call_generator_id(); 2137 BuiltinFunctionId id = function_info->builtin_function_id();
2138 MaybeObject* maybe_result = CompileCustomCall( 2138 MaybeObject* maybe_result = CompileCustomCall(
2139 id, object, holder, NULL, function, name); 2139 id, object, holder, NULL, function, name);
2140 Object* result; 2140 Object* result;
2141 if (!maybe_result->ToObject(&result)) return maybe_result; 2141 if (!maybe_result->ToObject(&result)) return maybe_result;
2142 // undefined means bail out to regular compiler. 2142 // undefined means bail out to regular compiler.
2143 if (!result->IsUndefined()) return result; 2143 if (!result->IsUndefined()) return result;
2144 } 2144 }
2145 2145
2146 Label miss_in_smi_check; 2146 Label miss_in_smi_check;
2147 2147
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 String* name) { 2368 String* name) {
2369 // ----------- S t a t e ------------- 2369 // ----------- S t a t e -------------
2370 // -- ecx : name 2370 // -- ecx : name
2371 // -- esp[0] : return address 2371 // -- esp[0] : return address
2372 // -- esp[(argc - n) * 4] : arg[n] (zero-based) 2372 // -- esp[(argc - n) * 4] : arg[n] (zero-based)
2373 // -- ... 2373 // -- ...
2374 // -- esp[(argc + 1) * 4] : receiver 2374 // -- esp[(argc + 1) * 4] : receiver
2375 // ----------------------------------- 2375 // -----------------------------------
2376 2376
2377 SharedFunctionInfo* function_info = function->shared(); 2377 SharedFunctionInfo* function_info = function->shared();
2378 if (function_info->HasCustomCallGenerator()) { 2378 if (function_info->HasBuiltinFunctionId()) {
2379 const int id = function_info->custom_call_generator_id(); 2379 BuiltinFunctionId id = function_info->builtin_function_id();
2380 MaybeObject* maybe_result = CompileCustomCall( 2380 MaybeObject* maybe_result = CompileCustomCall(
2381 id, object, holder, cell, function, name); 2381 id, object, holder, cell, function, name);
2382 Object* result; 2382 Object* result;
2383 if (!maybe_result->ToObject(&result)) return maybe_result; 2383 if (!maybe_result->ToObject(&result)) return maybe_result;
2384 // undefined means bail out to regular compiler. 2384 // undefined means bail out to regular compiler.
2385 if (!result->IsUndefined()) return result; 2385 if (!result->IsUndefined()) return result;
2386 } 2386 }
2387 2387
2388 Label miss; 2388 Label miss;
2389 2389
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 // Return the generated code. 3282 // Return the generated code.
3283 return GetCode(); 3283 return GetCode();
3284 } 3284 }
3285 3285
3286 3286
3287 #undef __ 3287 #undef __
3288 3288
3289 } } // namespace v8::internal 3289 } } // namespace v8::internal
3290 3290
3291 #endif // V8_TARGET_ARCH_IA32 3291 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/math.js » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698