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

Side by Side Diff: src/hydrogen.h

Issue 131663003: Make the strict-mode calling convention for contextual calls the default one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm port Created 6 years, 11 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 | « src/compiler.cc ('k') | 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 // 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 HEnvironment* CopyWithoutHistory() const; 633 HEnvironment* CopyWithoutHistory() const;
634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; 634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const;
635 635
636 // Create an "inlined version" of this environment, where the original 636 // Create an "inlined version" of this environment, where the original
637 // environment is the outer environment but the top expression stack 637 // environment is the outer environment but the top expression stack
638 // elements are moved to an inner environment as parameters. 638 // elements are moved to an inner environment as parameters.
639 HEnvironment* CopyForInlining(Handle<JSFunction> target, 639 HEnvironment* CopyForInlining(Handle<JSFunction> target,
640 int arguments, 640 int arguments,
641 FunctionLiteral* function, 641 FunctionLiteral* function,
642 HConstant* undefined, 642 HConstant* undefined,
643 InliningKind inlining_kind, 643 InliningKind inlining_kind) const;
644 bool undefined_receiver) const;
645
646 static bool UseUndefinedReceiver(Handle<JSFunction> closure,
647 FunctionLiteral* function,
648 CallKind call_kind,
649 InliningKind inlining_kind) {
650 return (closure->shared()->native() || !function->is_classic_mode()) &&
651 call_kind == CALL_AS_FUNCTION && inlining_kind != CONSTRUCT_CALL_RETURN;
652 }
653 644
654 HEnvironment* DiscardInlined(bool drop_extra) { 645 HEnvironment* DiscardInlined(bool drop_extra) {
655 HEnvironment* outer = outer_; 646 HEnvironment* outer = outer_;
656 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; 647 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_;
657 if (drop_extra) outer->Drop(1); 648 if (drop_extra) outer->Drop(1);
658 return outer; 649 return outer;
659 } 650 }
660 651
661 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); 652 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
662 653
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 GlobalPropertyAccess LookupGlobalProperty(Variable* var, 2187 GlobalPropertyAccess LookupGlobalProperty(Variable* var,
2197 LookupResult* lookup, 2188 LookupResult* lookup,
2198 bool is_store); 2189 bool is_store);
2199 2190
2200 void EnsureArgumentsArePushedForAccess(); 2191 void EnsureArgumentsArePushedForAccess();
2201 bool TryArgumentsAccess(Property* expr); 2192 bool TryArgumentsAccess(Property* expr);
2202 2193
2203 // Try to optimize fun.apply(receiver, arguments) pattern. 2194 // Try to optimize fun.apply(receiver, arguments) pattern.
2204 bool TryCallApply(Call* expr); 2195 bool TryCallApply(Call* expr);
2205 2196
2197 HValue* ImplicitReceiverFor(HValue* function,
2198 Handle<JSFunction> target);
2199
2206 int InliningAstSize(Handle<JSFunction> target); 2200 int InliningAstSize(Handle<JSFunction> target);
2207 bool TryInline(CallKind call_kind, 2201 bool TryInline(CallKind call_kind,
2208 Handle<JSFunction> target, 2202 Handle<JSFunction> target,
2209 int arguments_count, 2203 int arguments_count,
2210 HValue* implicit_return_value, 2204 HValue* implicit_return_value,
2211 BailoutId ast_id, 2205 BailoutId ast_id,
2212 BailoutId return_id, 2206 BailoutId return_id,
2213 InliningKind inlining_kind); 2207 InliningKind inlining_kind);
2214 2208
2215 bool TryInlineCall(Call* expr, bool drop_extra = false); 2209 bool TryInlineCall(Call* expr, bool drop_extra = false);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 HValue* object_elements, 2490 HValue* object_elements,
2497 AllocationSiteUsageContext* site_context); 2491 AllocationSiteUsageContext* site_context);
2498 2492
2499 void AddCheckPrototypeMaps(Handle<JSObject> holder, 2493 void AddCheckPrototypeMaps(Handle<JSObject> holder,
2500 Handle<Map> receiver_map); 2494 Handle<Map> receiver_map);
2501 2495
2502 void AddCheckConstantFunction(Handle<JSObject> holder, 2496 void AddCheckConstantFunction(Handle<JSObject> holder,
2503 HValue* receiver, 2497 HValue* receiver,
2504 Handle<Map> receiver_map); 2498 Handle<Map> receiver_map);
2505 2499
2506 void InstallGlobalReceiverInExpressionStack(int index,
2507 Handle<JSFunction> function);
2508
2509 // The translation state of the currently-being-translated function. 2500 // The translation state of the currently-being-translated function.
2510 FunctionState* function_state_; 2501 FunctionState* function_state_;
2511 2502
2512 // The base of the function state stack. 2503 // The base of the function state stack.
2513 FunctionState initial_function_state_; 2504 FunctionState initial_function_state_;
2514 2505
2515 // Expression context of the currently visited subexpression. NULL when 2506 // Expression context of the currently visited subexpression. NULL when
2516 // visiting statements. 2507 // visiting statements.
2517 AstContext* ast_context_; 2508 AstContext* ast_context_;
2518 2509
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 } 2681 }
2691 2682
2692 private: 2683 private:
2693 HGraphBuilder* builder_; 2684 HGraphBuilder* builder_;
2694 }; 2685 };
2695 2686
2696 2687
2697 } } // namespace v8::internal 2688 } } // namespace v8::internal
2698 2689
2699 #endif // V8_HYDROGEN_H_ 2690 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698