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

Side by Side Diff: src/mips/lithium-mips.h

Issue 9808058: MIPS: Support arguments object access from inlined functions. (Closed)
Patch Set: Created 8 years, 9 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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 V(Typeof) \ 172 V(Typeof) \
173 V(TypeofIsAndBranch) \ 173 V(TypeofIsAndBranch) \
174 V(UnaryMathOperation) \ 174 V(UnaryMathOperation) \
175 V(UnknownOSRValue) \ 175 V(UnknownOSRValue) \
176 V(ValueOf) \ 176 V(ValueOf) \
177 V(ForInPrepareMap) \ 177 V(ForInPrepareMap) \
178 V(ForInCacheArray) \ 178 V(ForInCacheArray) \
179 V(CheckMapValue) \ 179 V(CheckMapValue) \
180 V(LoadFieldByIndex) \ 180 V(LoadFieldByIndex) \
181 V(DateField) \ 181 V(DateField) \
182 V(WrapReceiver) 182 V(WrapReceiver) \
183 V(Pop)
183 184
184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
185 virtual Opcode opcode() const { return LInstruction::k##type; } \ 186 virtual Opcode opcode() const { return LInstruction::k##type; } \
186 virtual void CompileToNative(LCodeGen* generator); \ 187 virtual void CompileToNative(LCodeGen* generator); \
187 virtual const char* Mnemonic() const { return mnemonic; } \ 188 virtual const char* Mnemonic() const { return mnemonic; } \
188 static L##type* cast(LInstruction* instr) { \ 189 static L##type* cast(LInstruction* instr) { \
189 ASSERT(instr->Is##type()); \ 190 ASSERT(instr->Is##type()); \
190 return reinterpret_cast<L##type*>(instr); \ 191 return reinterpret_cast<L##type*>(instr); \
191 } 192 }
192 193
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 explicit LArgumentsLength(LOperand* elements) { 527 explicit LArgumentsLength(LOperand* elements) {
527 inputs_[0] = elements; 528 inputs_[0] = elements;
528 } 529 }
529 530
530 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") 531 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
531 }; 532 };
532 533
533 534
534 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { 535 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> {
535 public: 536 public:
536 LArgumentsElements() { } 537 explicit LArgumentsElements(bool from_inlined)
538 : from_inlined_(from_inlined) { }
539
540 bool from_inlined() const { return from_inlined_; }
537 541
538 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 542 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
543
544 private:
545 bool from_inlined_;
539 }; 546 };
540 547
541 548
542 class LModI: public LTemplateInstruction<1, 2, 3> { 549 class LModI: public LTemplateInstruction<1, 2, 3> {
543 public: 550 public:
544 // Used when the right hand is a constant power of 2. 551 // Used when the right hand is a constant power of 2.
545 LModI(LOperand* left, 552 LModI(LOperand* left,
546 LOperand* right) { 553 LOperand* right) {
547 inputs_[0] = left; 554 inputs_[0] = left;
548 inputs_[1] = right; 555 inputs_[1] = right;
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1358 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1352 public: 1359 public:
1353 explicit LPushArgument(LOperand* value) { 1360 explicit LPushArgument(LOperand* value) {
1354 inputs_[0] = value; 1361 inputs_[0] = value;
1355 } 1362 }
1356 1363
1357 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1364 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1358 }; 1365 };
1359 1366
1360 1367
1368 class LPop: public LTemplateInstruction<0, 0, 0> {
1369 public:
1370 explicit LPop(int count) : count_(count) { }
1371
1372 int count() const { return count_; }
1373
1374 DECLARE_CONCRETE_INSTRUCTION(Pop, "pop")
1375
1376 private:
1377 int count_;
1378 };
1379
1380
1361 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1381 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1362 public: 1382 public:
1363 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1383 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1364 DECLARE_HYDROGEN_ACCESSOR(ThisFunction) 1384 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1365 }; 1385 };
1366 1386
1367 1387
1368 class LContext: public LTemplateInstruction<1, 0, 0> { 1388 class LContext: public LTemplateInstruction<1, 0, 0> {
1369 public: 1389 public:
1370 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1390 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 2404
2385 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2405 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2386 }; 2406 };
2387 2407
2388 #undef DECLARE_HYDROGEN_ACCESSOR 2408 #undef DECLARE_HYDROGEN_ACCESSOR
2389 #undef DECLARE_CONCRETE_INSTRUCTION 2409 #undef DECLARE_CONCRETE_INSTRUCTION
2390 2410
2391 } } // namespace v8::internal 2411 } } // namespace v8::internal
2392 2412
2393 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2413 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698