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

Side by Side Diff: src/hydrogen.h

Issue 308793012: Inline fast path for Array.indexOf() and Array.lastIndexOf(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: HOptimizedGraphBuilder::BuildArrayIndexOf() 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 "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 bool TryArgumentsAccess(Property* expr); 2244 bool TryArgumentsAccess(Property* expr);
2245 2245
2246 // Try to optimize fun.apply(receiver, arguments) pattern. 2246 // Try to optimize fun.apply(receiver, arguments) pattern.
2247 bool TryCallApply(Call* expr); 2247 bool TryCallApply(Call* expr);
2248 2248
2249 bool TryHandleArrayCall(Call* expr, HValue* function); 2249 bool TryHandleArrayCall(Call* expr, HValue* function);
2250 bool TryHandleArrayCallNew(CallNew* expr, HValue* function); 2250 bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
2251 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function, 2251 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function,
2252 Handle<AllocationSite> cell); 2252 Handle<AllocationSite> cell);
2253 2253
2254 enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf };
2255 HValue* BuildArrayIndexOf(HValue* receiver,
2256 HValue* search_element,
2257 ElementsKind kind,
2258 ArrayIndexOfMode mode);
2259
2254 HValue* ImplicitReceiverFor(HValue* function, 2260 HValue* ImplicitReceiverFor(HValue* function,
2255 Handle<JSFunction> target); 2261 Handle<JSFunction> target);
2256 2262
2257 int InliningAstSize(Handle<JSFunction> target); 2263 int InliningAstSize(Handle<JSFunction> target);
2258 bool TryInline(Handle<JSFunction> target, 2264 bool TryInline(Handle<JSFunction> target,
2259 int arguments_count, 2265 int arguments_count,
2260 HValue* implicit_return_value, 2266 HValue* implicit_return_value,
2261 BailoutId ast_id, 2267 BailoutId ast_id,
2262 BailoutId return_id, 2268 BailoutId return_id,
2263 InliningKind inlining_kind, 2269 InliningKind inlining_kind,
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 } 2816 }
2811 2817
2812 private: 2818 private:
2813 HGraphBuilder* builder_; 2819 HGraphBuilder* builder_;
2814 }; 2820 };
2815 2821
2816 2822
2817 } } // namespace v8::internal 2823 } } // namespace v8::internal
2818 2824
2819 #endif // V8_HYDROGEN_H_ 2825 #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