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

Side by Side Diff: src/hydrogen.h

Issue 279423005: Customized support for feedback on calls to Array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 } 1284 }
1285 1285
1286 template<class I, class P1, class P2, class P3, class P4, 1286 template<class I, class P1, class P2, class P3, class P4,
1287 class P5, class P6, class P7, class P8> 1287 class P5, class P6, class P7, class P8>
1288 I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { 1288 I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) {
1289 return AddInstructionTyped(New<I>(p1, p2, p3, p4, p5, p6, p7, p8)); 1289 return AddInstructionTyped(New<I>(p1, p2, p3, p4, p5, p6, p7, p8));
1290 } 1290 }
1291 1291
1292 void AddSimulate(BailoutId id, RemovableSimulate removable = FIXED_SIMULATE); 1292 void AddSimulate(BailoutId id, RemovableSimulate removable = FIXED_SIMULATE);
1293 1293
1294 // When initializing arrays, we'll unfold the loop if the number of elements
1295 // is known at compile time and is <= kLoopUnfoldLimit.
1296 static const int kLoopUnfoldLimit = 8;
danno 2014/05/16 16:34:11 I've always been suspicious of this name. You shou
mvstanton 2014/05/19 13:45:24 Done.
1297
1294 protected: 1298 protected:
1295 virtual bool BuildGraph() = 0; 1299 virtual bool BuildGraph() = 0;
1296 1300
1297 HBasicBlock* CreateBasicBlock(HEnvironment* env); 1301 HBasicBlock* CreateBasicBlock(HEnvironment* env);
1298 HBasicBlock* CreateLoopHeaderBlock(); 1302 HBasicBlock* CreateLoopHeaderBlock();
1299 1303
1300 HValue* BuildCheckHeapObject(HValue* object); 1304 HValue* BuildCheckHeapObject(HValue* object);
1301 HValue* BuildCheckString(HValue* string); 1305 HValue* BuildCheckString(HValue* string);
1302 HValue* BuildWrapReceiver(HValue* object, HValue* function); 1306 HValue* BuildWrapReceiver(HValue* object, HValue* function);
1303 1307
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 GlobalPropertyAccess LookupGlobalProperty(Variable* var, 2244 GlobalPropertyAccess LookupGlobalProperty(Variable* var,
2241 LookupResult* lookup, 2245 LookupResult* lookup,
2242 PropertyAccessType access_type); 2246 PropertyAccessType access_type);
2243 2247
2244 void EnsureArgumentsArePushedForAccess(); 2248 void EnsureArgumentsArePushedForAccess();
2245 bool TryArgumentsAccess(Property* expr); 2249 bool TryArgumentsAccess(Property* expr);
2246 2250
2247 // Try to optimize fun.apply(receiver, arguments) pattern. 2251 // Try to optimize fun.apply(receiver, arguments) pattern.
2248 bool TryCallApply(Call* expr); 2252 bool TryCallApply(Call* expr);
2249 2253
2254 bool TryHandleArrayCall(Call* expr, HValue* function);
2255 bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
2256 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function,
2257 Handle<AllocationSite> cell);
2258
2250 HValue* ImplicitReceiverFor(HValue* function, 2259 HValue* ImplicitReceiverFor(HValue* function,
2251 Handle<JSFunction> target); 2260 Handle<JSFunction> target);
2252 2261
2253 int InliningAstSize(Handle<JSFunction> target); 2262 int InliningAstSize(Handle<JSFunction> target);
2254 bool TryInline(Handle<JSFunction> target, 2263 bool TryInline(Handle<JSFunction> target,
2255 int arguments_count, 2264 int arguments_count,
2256 HValue* implicit_return_value, 2265 HValue* implicit_return_value,
2257 BailoutId ast_id, 2266 BailoutId ast_id,
2258 BailoutId return_id, 2267 BailoutId return_id,
2259 InliningKind inlining_kind, 2268 InliningKind inlining_kind,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 2332
2324 HValue* BuildAllocateExternalElements( 2333 HValue* BuildAllocateExternalElements(
2325 ExternalArrayType array_type, 2334 ExternalArrayType array_type,
2326 bool is_zero_byte_offset, 2335 bool is_zero_byte_offset,
2327 HValue* buffer, HValue* byte_offset, HValue* length); 2336 HValue* buffer, HValue* byte_offset, HValue* length);
2328 HValue* BuildAllocateFixedTypedArray( 2337 HValue* BuildAllocateFixedTypedArray(
2329 ExternalArrayType array_type, size_t element_size, 2338 ExternalArrayType array_type, size_t element_size,
2330 ElementsKind fixed_elements_kind, 2339 ElementsKind fixed_elements_kind,
2331 HValue* byte_length, HValue* length); 2340 HValue* byte_length, HValue* length);
2332 2341
2333 bool IsCallNewArrayInlineable(CallNew* expr); 2342 Handle<JSFunction> array_function() {
2334 void BuildInlinedCallNewArray(CallNew* expr); 2343 return handle(isolate()->native_context()->array_function());
2344 }
2345
2346 bool IsCallArrayInlineable(int argument_count, Handle<AllocationSite> site);
2347 void BuildInlinedCallArray(Expression* expression, int argument_count,
2348 Handle<AllocationSite> site);
2335 2349
2336 class PropertyAccessInfo { 2350 class PropertyAccessInfo {
2337 public: 2351 public:
2338 PropertyAccessInfo(HOptimizedGraphBuilder* builder, 2352 PropertyAccessInfo(HOptimizedGraphBuilder* builder,
2339 PropertyAccessType access_type, 2353 PropertyAccessType access_type,
2340 Type* type, 2354 Type* type,
2341 Handle<String> name) 2355 Handle<String> name)
2342 : lookup_(builder->isolate()), 2356 : lookup_(builder->isolate()),
2343 builder_(builder), 2357 builder_(builder),
2344 access_type_(access_type), 2358 access_type_(access_type),
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 } 2815 }
2802 2816
2803 private: 2817 private:
2804 HGraphBuilder* builder_; 2818 HGraphBuilder* builder_;
2805 }; 2819 };
2806 2820
2807 2821
2808 } } // namespace v8::internal 2822 } } // namespace v8::internal
2809 2823
2810 #endif // V8_HYDROGEN_H_ 2824 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698