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

Side by Side Diff: src/crankshaft/hydrogen.h

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/code-stubs.h ('k') | src/crankshaft/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_CRANKSHAFT_HYDROGEN_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_
6 #define V8_CRANKSHAFT_HYDROGEN_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_H_
7 7
8 #include "src/accessors.h" 8 #include "src/accessors.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 HValue* ImplicitReceiverFor(HValue* function, 2420 HValue* ImplicitReceiverFor(HValue* function,
2421 Handle<JSFunction> target); 2421 Handle<JSFunction> target);
2422 2422
2423 int InliningAstSize(Handle<JSFunction> target); 2423 int InliningAstSize(Handle<JSFunction> target);
2424 bool TryInline(Handle<JSFunction> target, int arguments_count, 2424 bool TryInline(Handle<JSFunction> target, int arguments_count,
2425 HValue* implicit_return_value, BailoutId ast_id, 2425 HValue* implicit_return_value, BailoutId ast_id,
2426 BailoutId return_id, InliningKind inlining_kind); 2426 BailoutId return_id, InliningKind inlining_kind);
2427 2427
2428 bool TryInlineCall(Call* expr); 2428 bool TryInlineCall(Call* expr);
2429 bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value); 2429 bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value);
2430 bool TryInlineGetter(Handle<Object> getter, Handle<Map> receiver_map, 2430 bool TryInlineGetter(Handle<JSFunction> getter,
2431 BailoutId ast_id, BailoutId return_id); 2431 Handle<Map> receiver_map,
2432 bool TryInlineSetter(Handle<Object> setter, Handle<Map> receiver_map, 2432 BailoutId ast_id,
2433 BailoutId id, BailoutId assignment_id, 2433 BailoutId return_id);
2434 bool TryInlineSetter(Handle<JSFunction> setter,
2435 Handle<Map> receiver_map,
2436 BailoutId id,
2437 BailoutId assignment_id,
2434 HValue* implicit_return_value); 2438 HValue* implicit_return_value);
2435 bool TryInlineIndirectCall(Handle<JSFunction> function, Call* expr, 2439 bool TryInlineIndirectCall(Handle<JSFunction> function, Call* expr,
2436 int arguments_count); 2440 int arguments_count);
2437 bool TryInlineBuiltinMethodCall(Call* expr, Handle<JSFunction> function, 2441 bool TryInlineBuiltinMethodCall(Call* expr, Handle<JSFunction> function,
2438 Handle<Map> receiver_map, 2442 Handle<Map> receiver_map,
2439 int args_count_no_receiver); 2443 int args_count_no_receiver);
2440 bool TryInlineBuiltinFunctionCall(Call* expr); 2444 bool TryInlineBuiltinFunctionCall(Call* expr);
2441 enum ApiCallType { 2445 enum ApiCallType {
2442 kCallApiFunction, 2446 kCallApiFunction,
2443 kCallApiMethod, 2447 kCallApiMethod,
2444 kCallApiGetter, 2448 kCallApiGetter,
2445 kCallApiSetter 2449 kCallApiSetter
2446 }; 2450 };
2447 bool TryInlineApiMethodCall(Call* expr, 2451 bool TryInlineApiMethodCall(Call* expr,
2448 HValue* receiver, 2452 HValue* receiver,
2449 SmallMapList* receiver_types); 2453 SmallMapList* receiver_types);
2450 bool TryInlineApiFunctionCall(Call* expr, HValue* receiver); 2454 bool TryInlineApiFunctionCall(Call* expr, HValue* receiver);
2451 bool TryInlineApiGetter(Handle<Object> function, Handle<Map> receiver_map, 2455 bool TryInlineApiGetter(Handle<JSFunction> function,
2456 Handle<Map> receiver_map,
2452 BailoutId ast_id); 2457 BailoutId ast_id);
2453 bool TryInlineApiSetter(Handle<Object> function, Handle<Map> receiver_map, 2458 bool TryInlineApiSetter(Handle<JSFunction> function,
2459 Handle<Map> receiver_map,
2454 BailoutId ast_id); 2460 BailoutId ast_id);
2455 bool TryInlineApiCall(Handle<Object> function, HValue* receiver, 2461 bool TryInlineApiCall(Handle<JSFunction> function,
2456 SmallMapList* receiver_maps, int argc, BailoutId ast_id, 2462 HValue* receiver,
2457 ApiCallType call_type); 2463 SmallMapList* receiver_maps,
2464 int argc,
2465 BailoutId ast_id,
2466 ApiCallType call_type);
2458 static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map); 2467 static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map);
2459 static bool CanInlineArrayResizeOperation(Handle<Map> receiver_map); 2468 static bool CanInlineArrayResizeOperation(Handle<Map> receiver_map);
2460 2469
2461 // If --trace-inlining, print a line of the inlining trace. Inlining 2470 // If --trace-inlining, print a line of the inlining trace. Inlining
2462 // succeeded if the reason string is NULL and failed if there is a 2471 // succeeded if the reason string is NULL and failed if there is a
2463 // non-NULL reason string. 2472 // non-NULL reason string.
2464 void TraceInline(Handle<JSFunction> target, 2473 void TraceInline(Handle<JSFunction> target,
2465 Handle<JSFunction> caller, 2474 Handle<JSFunction> caller,
2466 const char* failure_reason); 2475 const char* failure_reason);
2467 2476
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 return true; 2599 return true;
2591 } 2600 }
2592 return false; 2601 return false;
2593 } 2602 }
2594 2603
2595 bool has_holder() { return !holder_.is_null(); } 2604 bool has_holder() { return !holder_.is_null(); }
2596 bool IsLoad() const { return access_type_ == LOAD; } 2605 bool IsLoad() const { return access_type_ == LOAD; }
2597 2606
2598 Isolate* isolate() const { return builder_->isolate(); } 2607 Isolate* isolate() const { return builder_->isolate(); }
2599 Handle<JSObject> holder() { return holder_; } 2608 Handle<JSObject> holder() { return holder_; }
2600 Handle<Object> accessor() { return accessor_; } 2609 Handle<JSFunction> accessor() { return accessor_; }
2601 Handle<Object> constant() { return constant_; } 2610 Handle<Object> constant() { return constant_; }
2602 Handle<Map> transition() { return transition_; } 2611 Handle<Map> transition() { return transition_; }
2603 SmallMapList* field_maps() { return &field_maps_; } 2612 SmallMapList* field_maps() { return &field_maps_; }
2604 HType field_type() const { return field_type_; } 2613 HType field_type() const { return field_type_; }
2605 HObjectAccess access() { return access_; } 2614 HObjectAccess access() { return access_; }
2606 2615
2607 bool IsFound() const { return lookup_type_ != NOT_FOUND; } 2616 bool IsFound() const { return lookup_type_ != NOT_FOUND; }
2608 bool IsProperty() const { return IsFound() && !IsTransition(); } 2617 bool IsProperty() const { return IsFound() && !IsTransition(); }
2609 bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; } 2618 bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; }
2610 bool IsData() const { 2619 bool IsData() const {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 void GeneralizeRepresentation(Representation r) { 2705 void GeneralizeRepresentation(Representation r) {
2697 access_ = access_.WithRepresentation( 2706 access_ = access_.WithRepresentation(
2698 access_.representation().generalize(r)); 2707 access_.representation().generalize(r));
2699 } 2708 }
2700 2709
2701 HOptimizedGraphBuilder* builder_; 2710 HOptimizedGraphBuilder* builder_;
2702 PropertyAccessType access_type_; 2711 PropertyAccessType access_type_;
2703 Handle<Map> map_; 2712 Handle<Map> map_;
2704 Handle<Name> name_; 2713 Handle<Name> name_;
2705 Handle<JSObject> holder_; 2714 Handle<JSObject> holder_;
2706 Handle<Object> accessor_; 2715 Handle<JSFunction> accessor_;
2707 Handle<JSObject> api_holder_; 2716 Handle<JSObject> api_holder_;
2708 Handle<Object> constant_; 2717 Handle<Object> constant_;
2709 SmallMapList field_maps_; 2718 SmallMapList field_maps_;
2710 HType field_type_; 2719 HType field_type_;
2711 HObjectAccess access_; 2720 HObjectAccess access_;
2712 2721
2713 enum { NOT_FOUND, DESCRIPTOR_TYPE, TRANSITION_TYPE } lookup_type_; 2722 enum { NOT_FOUND, DESCRIPTOR_TYPE, TRANSITION_TYPE } lookup_type_;
2714 Handle<Map> transition_; 2723 Handle<Map> transition_;
2715 int number_; 2724 int number_;
2716 PropertyDetails details_; 2725 PropertyDetails details_;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3054 3063
3055 private: 3064 private:
3056 HGraphBuilder* builder_; 3065 HGraphBuilder* builder_;
3057 }; 3066 };
3058 3067
3059 3068
3060 } // namespace internal 3069 } // namespace internal
3061 } // namespace v8 3070 } // namespace v8
3062 3071
3063 #endif // V8_CRANKSHAFT_HYDROGEN_H_ 3072 #endif // V8_CRANKSHAFT_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698