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

Side by Side Diff: src/hydrogen.h

Issue 347573002: Revert "Optimize Function.prototype.call" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 kUseCell, 2314 kUseCell,
2315 kUseGeneric 2315 kUseGeneric
2316 }; 2316 };
2317 GlobalPropertyAccess LookupGlobalProperty(Variable* var, 2317 GlobalPropertyAccess LookupGlobalProperty(Variable* var,
2318 LookupResult* lookup, 2318 LookupResult* lookup,
2319 PropertyAccessType access_type); 2319 PropertyAccessType access_type);
2320 2320
2321 void EnsureArgumentsArePushedForAccess(); 2321 void EnsureArgumentsArePushedForAccess();
2322 bool TryArgumentsAccess(Property* expr); 2322 bool TryArgumentsAccess(Property* expr);
2323 2323
2324 // Shared code for .call and .apply optimizations. 2324 // Try to optimize fun.apply(receiver, arguments) pattern.
2325 void HandleIndirectCall(Call* expr, HValue* function, int arguments_count); 2325 bool TryCallApply(Call* expr);
2326 // Try to optimize indirect calls such as fun.apply(receiver, arguments)
2327 // or fun.call(...).
2328 bool TryIndirectCall(Call* expr);
2329 void BuildFunctionApply(Call* expr);
2330 void BuildFunctionCall(Call* expr);
2331 2326
2332 bool TryHandleArrayCall(Call* expr, HValue* function); 2327 bool TryHandleArrayCall(Call* expr, HValue* function);
2333 bool TryHandleArrayCallNew(CallNew* expr, HValue* function); 2328 bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
2334 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function, 2329 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function,
2335 Handle<AllocationSite> cell); 2330 Handle<AllocationSite> cell);
2336 2331
2337 enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf }; 2332 enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf };
2338 HValue* BuildArrayIndexOf(HValue* receiver, 2333 HValue* BuildArrayIndexOf(HValue* receiver,
2339 HValue* search_element, 2334 HValue* search_element,
2340 ElementsKind kind, 2335 ElementsKind kind,
(...skipping 15 matching lines...) Expand all
2356 bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value); 2351 bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value);
2357 bool TryInlineGetter(Handle<JSFunction> getter, 2352 bool TryInlineGetter(Handle<JSFunction> getter,
2358 Handle<Map> receiver_map, 2353 Handle<Map> receiver_map,
2359 BailoutId ast_id, 2354 BailoutId ast_id,
2360 BailoutId return_id); 2355 BailoutId return_id);
2361 bool TryInlineSetter(Handle<JSFunction> setter, 2356 bool TryInlineSetter(Handle<JSFunction> setter,
2362 Handle<Map> receiver_map, 2357 Handle<Map> receiver_map,
2363 BailoutId id, 2358 BailoutId id,
2364 BailoutId assignment_id, 2359 BailoutId assignment_id,
2365 HValue* implicit_return_value); 2360 HValue* implicit_return_value);
2366 bool TryInlineIndirectCall(Handle<JSFunction> function, 2361 bool TryInlineApply(Handle<JSFunction> function,
2367 Call* expr, 2362 Call* expr,
2368 int arguments_count); 2363 int arguments_count);
2369 bool TryInlineBuiltinMethodCall(Call* expr, 2364 bool TryInlineBuiltinMethodCall(Call* expr,
2370 Handle<JSFunction> function, 2365 HValue* receiver,
2371 Handle<Map> receiver_map, 2366 Handle<Map> receiver_map);
2372 int args_count_no_receiver);
2373 bool TryInlineBuiltinFunctionCall(Call* expr); 2367 bool TryInlineBuiltinFunctionCall(Call* expr);
2374 enum ApiCallType { 2368 enum ApiCallType {
2375 kCallApiFunction, 2369 kCallApiFunction,
2376 kCallApiMethod, 2370 kCallApiMethod,
2377 kCallApiGetter, 2371 kCallApiGetter,
2378 kCallApiSetter 2372 kCallApiSetter
2379 }; 2373 };
2380 bool TryInlineApiMethodCall(Call* expr, 2374 bool TryInlineApiMethodCall(Call* expr,
2381 HValue* receiver, 2375 HValue* receiver,
2382 SmallMapList* receiver_types); 2376 SmallMapList* receiver_types);
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 } 2894 }
2901 2895
2902 private: 2896 private:
2903 HGraphBuilder* builder_; 2897 HGraphBuilder* builder_;
2904 }; 2898 };
2905 2899
2906 2900
2907 } } // namespace v8::internal 2901 } } // namespace v8::internal
2908 2902
2909 #endif // V8_HYDROGEN_H_ 2903 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698