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

Side by Side Diff: src/hydrogen.h

Issue 330303002: Add machinery to support arguments escaping to safe builtins (Closed) Base URL: https://github.com/v8/v8.git@master
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
« 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 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 void VisitForValue(Expression* expr, 2286 void VisitForValue(Expression* expr,
2287 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED); 2287 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED);
2288 void VisitForTypeOf(Expression* expr); 2288 void VisitForTypeOf(Expression* expr);
2289 void VisitForEffect(Expression* expr); 2289 void VisitForEffect(Expression* expr);
2290 void VisitForControl(Expression* expr, 2290 void VisitForControl(Expression* expr,
2291 HBasicBlock* true_block, 2291 HBasicBlock* true_block,
2292 HBasicBlock* false_block); 2292 HBasicBlock* false_block);
2293 2293
2294 // Visit a list of expressions from left to right, each in a value context. 2294 // Visit a list of expressions from left to right, each in a value context.
2295 void VisitExpressions(ZoneList<Expression*>* exprs); 2295 void VisitExpressions(ZoneList<Expression*>* exprs);
2296 // Like VisitExpressions for the argument list for a call to function.
2297 // If the function supports safe usage of arguments and args contain
2298 // arguments, the caller must succeed in inlining the call as a builtin
2299 // or bailout manually.
2300 void VisitCallArguments(ZoneList<Expression*>* args,
2301 HValue* function,
2302 bool* args_contain_arguments);
2296 2303
2297 // Remove the arguments from the bailout environment and emit instructions 2304 // Remove the arguments from the bailout environment and emit instructions
2298 // to push them as outgoing parameters. 2305 // to push them as outgoing parameters.
2299 template <class Instruction> HInstruction* PreProcessCall(Instruction* call); 2306 template <class Instruction> HInstruction* PreProcessCall(Instruction* call);
2300 void PushArgumentsFromEnvironment(int count); 2307 void PushArgumentsFromEnvironment(int count);
2301 2308
2302 void SetUpScope(Scope* scope); 2309 void SetUpScope(Scope* scope);
2303 virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE; 2310 virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE;
2304 2311
2305 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE; 2312 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 BailoutId ast_id, 2366 BailoutId ast_id,
2360 BailoutId return_id); 2367 BailoutId return_id);
2361 bool TryInlineSetter(Handle<JSFunction> setter, 2368 bool TryInlineSetter(Handle<JSFunction> setter,
2362 Handle<Map> receiver_map, 2369 Handle<Map> receiver_map,
2363 BailoutId id, 2370 BailoutId id,
2364 BailoutId assignment_id, 2371 BailoutId assignment_id,
2365 HValue* implicit_return_value); 2372 HValue* implicit_return_value);
2366 bool TryInlineIndirectCall(Handle<JSFunction> function, 2373 bool TryInlineIndirectCall(Handle<JSFunction> function,
2367 Call* expr, 2374 Call* expr,
2368 int arguments_count); 2375 int arguments_count);
2376 void InlineBuiltinWithArguments(Call* expr,
2377 HValue* function,
2378 Handle<Map> receiver_map,
2379 int args_count_no_receiver);
2369 bool TryInlineBuiltinMethodCall(Call* expr, 2380 bool TryInlineBuiltinMethodCall(Call* expr,
2370 Handle<JSFunction> function, 2381 Handle<JSFunction> function,
2371 Handle<Map> receiver_map, 2382 Handle<Map> receiver_map,
2372 int args_count_no_receiver); 2383 int args_count_no_receiver);
2373 bool TryInlineBuiltinFunctionCall(Call* expr); 2384 bool TryInlineBuiltinFunctionCall(Call* expr);
2374 enum ApiCallType { 2385 enum ApiCallType {
2375 kCallApiFunction, 2386 kCallApiFunction,
2376 kCallApiMethod, 2387 kCallApiMethod,
2377 kCallApiGetter, 2388 kCallApiGetter,
2378 kCallApiSetter 2389 kCallApiSetter
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 } 2911 }
2901 2912
2902 private: 2913 private:
2903 HGraphBuilder* builder_; 2914 HGraphBuilder* builder_;
2904 }; 2915 };
2905 2916
2906 2917
2907 } } // namespace v8::internal 2918 } } // namespace v8::internal
2908 2919
2909 #endif // V8_HYDROGEN_H_ 2920 #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