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

Side by Side Diff: src/hydrogen-instructions.h

Issue 10836133: Inline simple setter calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added comment. Created 8 years, 4 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/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 bool is_function_entry() { return type_ == kFunctionEntry; } 1396 bool is_function_entry() { return type_ == kFunctionEntry; }
1397 bool is_backwards_branch() { return type_ == kBackwardsBranch; } 1397 bool is_backwards_branch() { return type_ == kBackwardsBranch; }
1398 1398
1399 DECLARE_CONCRETE_INSTRUCTION(StackCheck) 1399 DECLARE_CONCRETE_INSTRUCTION(StackCheck)
1400 1400
1401 private: 1401 private:
1402 Type type_; 1402 Type type_;
1403 }; 1403 };
1404 1404
1405 1405
1406 enum InliningKind {
1407 NORMAL_RETURN, // Normal function/method call and return.
1408 DROP_EXTRA_ON_RETURN, // Drop an extra value from the environment on return.
1409 CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value.
1410 SETTER_CALL_RETURN // Use the RHS of the assignment as the return value.
1411 };
1412
1413
1406 class HEnterInlined: public HTemplateInstruction<0> { 1414 class HEnterInlined: public HTemplateInstruction<0> {
1407 public: 1415 public:
1408 HEnterInlined(Handle<JSFunction> closure, 1416 HEnterInlined(Handle<JSFunction> closure,
1409 int arguments_count, 1417 int arguments_count,
1410 FunctionLiteral* function, 1418 FunctionLiteral* function,
1411 CallKind call_kind, 1419 CallKind call_kind,
1412 bool is_construct, 1420 InliningKind inlining_kind,
1413 Variable* arguments_var, 1421 Variable* arguments_var,
1414 ZoneList<HValue*>* arguments_values) 1422 ZoneList<HValue*>* arguments_values)
1415 : closure_(closure), 1423 : closure_(closure),
1416 arguments_count_(arguments_count), 1424 arguments_count_(arguments_count),
1417 function_(function), 1425 function_(function),
1418 call_kind_(call_kind), 1426 call_kind_(call_kind),
1419 is_construct_(is_construct), 1427 inlining_kind_(inlining_kind),
1420 arguments_var_(arguments_var), 1428 arguments_var_(arguments_var),
1421 arguments_values_(arguments_values) { 1429 arguments_values_(arguments_values) {
1422 } 1430 }
1423 1431
1424 virtual void PrintDataTo(StringStream* stream); 1432 virtual void PrintDataTo(StringStream* stream);
1425 1433
1426 Handle<JSFunction> closure() const { return closure_; } 1434 Handle<JSFunction> closure() const { return closure_; }
1427 int arguments_count() const { return arguments_count_; } 1435 int arguments_count() const { return arguments_count_; }
1428 FunctionLiteral* function() const { return function_; } 1436 FunctionLiteral* function() const { return function_; }
1429 CallKind call_kind() const { return call_kind_; } 1437 CallKind call_kind() const { return call_kind_; }
1430 bool is_construct() const { return is_construct_; } 1438 InliningKind inlining_kind() const { return inlining_kind_; }
1431 1439
1432 virtual Representation RequiredInputRepresentation(int index) { 1440 virtual Representation RequiredInputRepresentation(int index) {
1433 return Representation::None(); 1441 return Representation::None();
1434 } 1442 }
1435 1443
1436 Variable* arguments_var() { return arguments_var_; } 1444 Variable* arguments_var() { return arguments_var_; }
1437 ZoneList<HValue*>* arguments_values() { return arguments_values_; } 1445 ZoneList<HValue*>* arguments_values() { return arguments_values_; }
1438 1446
1439 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) 1447 DECLARE_CONCRETE_INSTRUCTION(EnterInlined)
1440 1448
1441 private: 1449 private:
1442 Handle<JSFunction> closure_; 1450 Handle<JSFunction> closure_;
1443 int arguments_count_; 1451 int arguments_count_;
1444 FunctionLiteral* function_; 1452 FunctionLiteral* function_;
1445 CallKind call_kind_; 1453 CallKind call_kind_;
1446 bool is_construct_; 1454 InliningKind inlining_kind_;
1447 Variable* arguments_var_; 1455 Variable* arguments_var_;
1448 ZoneList<HValue*>* arguments_values_; 1456 ZoneList<HValue*>* arguments_values_;
1449 }; 1457 };
1450 1458
1451 1459
1452 class HLeaveInlined: public HTemplateInstruction<0> { 1460 class HLeaveInlined: public HTemplateInstruction<0> {
1453 public: 1461 public:
1454 explicit HLeaveInlined(bool arguments_pushed) 1462 explicit HLeaveInlined(bool arguments_pushed)
1455 : arguments_pushed_(arguments_pushed) { } 1463 : arguments_pushed_(arguments_pushed) { }
1456 1464
(...skipping 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after
5240 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5248 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
5241 }; 5249 };
5242 5250
5243 5251
5244 #undef DECLARE_INSTRUCTION 5252 #undef DECLARE_INSTRUCTION
5245 #undef DECLARE_CONCRETE_INSTRUCTION 5253 #undef DECLARE_CONCRETE_INSTRUCTION
5246 5254
5247 } } // namespace v8::internal 5255 } } // namespace v8::internal
5248 5256
5249 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5257 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698