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

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

Issue 6838018: Support %_CallFunction in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Include regression test. Created 9 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 V(GlobalReceiver) \ 99 V(GlobalReceiver) \
100 V(Goto) \ 100 V(Goto) \
101 V(HasCachedArrayIndex) \ 101 V(HasCachedArrayIndex) \
102 V(HasCachedArrayIndexAndBranch) \ 102 V(HasCachedArrayIndexAndBranch) \
103 V(HasInstanceType) \ 103 V(HasInstanceType) \
104 V(HasInstanceTypeAndBranch) \ 104 V(HasInstanceTypeAndBranch) \
105 V(InstanceOf) \ 105 V(InstanceOf) \
106 V(InstanceOfAndBranch) \ 106 V(InstanceOfAndBranch) \
107 V(InstanceOfKnownGlobal) \ 107 V(InstanceOfKnownGlobal) \
108 V(Integer32ToDouble) \ 108 V(Integer32ToDouble) \
109 V(InvokeFunction) \
109 V(IsNull) \ 110 V(IsNull) \
110 V(IsNullAndBranch) \ 111 V(IsNullAndBranch) \
111 V(IsObject) \ 112 V(IsObject) \
112 V(IsObjectAndBranch) \ 113 V(IsObjectAndBranch) \
113 V(IsSmi) \ 114 V(IsSmi) \
114 V(IsSmiAndBranch) \ 115 V(IsSmiAndBranch) \
115 V(IsConstructCall) \ 116 V(IsConstructCall) \
116 V(IsConstructCallAndBranch) \ 117 V(IsConstructCallAndBranch) \
117 V(JSArrayLength) \ 118 V(JSArrayLength) \
118 V(Label) \ 119 V(Label) \
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1444 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1444 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1445 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1445 1446
1446 virtual void PrintDataTo(StringStream* stream); 1447 virtual void PrintDataTo(StringStream* stream);
1447 1448
1448 Handle<JSFunction> function() { return hydrogen()->function(); } 1449 Handle<JSFunction> function() { return hydrogen()->function(); }
1449 int arity() const { return hydrogen()->argument_count() - 1; } 1450 int arity() const { return hydrogen()->argument_count() - 1; }
1450 }; 1451 };
1451 1452
1452 1453
1454 class LInvokeFunction: public LTemplateInstruction<1, 2, 0> {
1455 public:
1456 LInvokeFunction(LOperand* context, LOperand* function) {
1457 inputs_[0] = context;
1458 inputs_[1] = function;
1459 }
1460
1461 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1462 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1463
1464 LOperand* context() { return inputs_[0]; }
1465 LOperand* function() { return inputs_[1]; }
1466
1467 virtual void PrintDataTo(StringStream* stream);
1468
1469 int arity() const { return hydrogen()->argument_count() - 1; }
1470 };
1471
1472
1453 class LCallKeyed: public LTemplateInstruction<1, 2, 0> { 1473 class LCallKeyed: public LTemplateInstruction<1, 2, 0> {
1454 public: 1474 public:
1455 LCallKeyed(LOperand* context, LOperand* key) { 1475 LCallKeyed(LOperand* context, LOperand* key) {
1456 inputs_[0] = context; 1476 inputs_[0] = context;
1457 inputs_[1] = key; 1477 inputs_[1] = key;
1458 } 1478 }
1459 1479
1460 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1480 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1461 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1481 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1462 1482
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2250 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2231 }; 2251 };
2232 2252
2233 #undef DECLARE_HYDROGEN_ACCESSOR 2253 #undef DECLARE_HYDROGEN_ACCESSOR
2234 #undef DECLARE_INSTRUCTION 2254 #undef DECLARE_INSTRUCTION
2235 #undef DECLARE_CONCRETE_INSTRUCTION 2255 #undef DECLARE_CONCRETE_INSTRUCTION
2236 2256
2237 } } // namespace v8::internal 2257 } } // namespace v8::internal
2238 2258
2239 #endif // V8_IA32_LITHIUM_IA32_H_ 2259 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698