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

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

Issue 10033028: Reland arguments access support for inlined functions (r11109,r11118). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 // 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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 }; 1347 };
1348 1348
1349 1349
1350 class HEnterInlined: public HTemplateInstruction<0> { 1350 class HEnterInlined: public HTemplateInstruction<0> {
1351 public: 1351 public:
1352 HEnterInlined(Handle<JSFunction> closure, 1352 HEnterInlined(Handle<JSFunction> closure,
1353 int arguments_count, 1353 int arguments_count,
1354 FunctionLiteral* function, 1354 FunctionLiteral* function,
1355 CallKind call_kind, 1355 CallKind call_kind,
1356 bool is_construct, 1356 bool is_construct,
1357 Variable* arguments) 1357 Variable* arguments_var,
1358 ZoneList<HValue*>* arguments_values)
1358 : closure_(closure), 1359 : closure_(closure),
1359 arguments_count_(arguments_count), 1360 arguments_count_(arguments_count),
1360 function_(function), 1361 function_(function),
1361 call_kind_(call_kind), 1362 call_kind_(call_kind),
1362 is_construct_(is_construct), 1363 is_construct_(is_construct),
1363 arguments_(arguments) { 1364 arguments_var_(arguments_var),
1365 arguments_values_(arguments_values) {
1364 } 1366 }
1365 1367
1366 virtual void PrintDataTo(StringStream* stream); 1368 virtual void PrintDataTo(StringStream* stream);
1367 1369
1368 Handle<JSFunction> closure() const { return closure_; } 1370 Handle<JSFunction> closure() const { return closure_; }
1369 int arguments_count() const { return arguments_count_; } 1371 int arguments_count() const { return arguments_count_; }
1370 FunctionLiteral* function() const { return function_; } 1372 FunctionLiteral* function() const { return function_; }
1371 CallKind call_kind() const { return call_kind_; } 1373 CallKind call_kind() const { return call_kind_; }
1372 bool is_construct() const { return is_construct_; } 1374 bool is_construct() const { return is_construct_; }
1373 1375
1374 virtual Representation RequiredInputRepresentation(int index) { 1376 virtual Representation RequiredInputRepresentation(int index) {
1375 return Representation::None(); 1377 return Representation::None();
1376 } 1378 }
1377 1379
1378 Variable* arguments() { return arguments_; } 1380 Variable* arguments_var() { return arguments_var_; }
1381 ZoneList<HValue*>* arguments_values() { return arguments_values_; }
1379 1382
1380 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) 1383 DECLARE_CONCRETE_INSTRUCTION(EnterInlined)
1381 1384
1382 private: 1385 private:
1383 Handle<JSFunction> closure_; 1386 Handle<JSFunction> closure_;
1384 int arguments_count_; 1387 int arguments_count_;
1385 FunctionLiteral* function_; 1388 FunctionLiteral* function_;
1386 CallKind call_kind_; 1389 CallKind call_kind_;
1387 bool is_construct_; 1390 bool is_construct_;
1388 Variable* arguments_; 1391 Variable* arguments_var_;
1392 ZoneList<HValue*>* arguments_values_;
1389 }; 1393 };
1390 1394
1391 1395
1392 class HLeaveInlined: public HTemplateInstruction<0> { 1396 class HLeaveInlined: public HTemplateInstruction<0> {
1393 public: 1397 public:
1394 HLeaveInlined() {} 1398 explicit HLeaveInlined(bool arguments_pushed)
1399 : arguments_pushed_(arguments_pushed) { }
1395 1400
1396 virtual Representation RequiredInputRepresentation(int index) { 1401 virtual Representation RequiredInputRepresentation(int index) {
1397 return Representation::None(); 1402 return Representation::None();
1398 } 1403 }
1399 1404
1405 bool arguments_pushed() {
1406 return arguments_pushed_;
1407 }
1408
1400 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined) 1409 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined)
1410
1411 private:
1412 bool arguments_pushed_;
1401 }; 1413 };
1402 1414
1403 1415
1404 class HPushArgument: public HUnaryOperation { 1416 class HPushArgument: public HUnaryOperation {
1405 public: 1417 public:
1406 explicit HPushArgument(HValue* value) : HUnaryOperation(value) { 1418 explicit HPushArgument(HValue* value) : HUnaryOperation(value) {
1407 set_representation(Representation::Tagged()); 1419 set_representation(Representation::Tagged());
1408 } 1420 }
1409 1421
1410 virtual Representation RequiredInputRepresentation(int index) { 1422 virtual Representation RequiredInputRepresentation(int index) {
(...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after
4857 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 4869 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
4858 }; 4870 };
4859 4871
4860 4872
4861 #undef DECLARE_INSTRUCTION 4873 #undef DECLARE_INSTRUCTION
4862 #undef DECLARE_CONCRETE_INSTRUCTION 4874 #undef DECLARE_CONCRETE_INSTRUCTION
4863 4875
4864 } } // namespace v8::internal 4876 } } // namespace v8::internal
4865 4877
4866 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4878 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698