OLD | NEW |
---|---|
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 protected: | 256 protected: |
257 // Generates the assembler code for the stub. | 257 // Generates the assembler code for the stub. |
258 virtual void Generate(MacroAssembler* masm) = 0; | 258 virtual void Generate(MacroAssembler* masm) = 0; |
259 }; | 259 }; |
260 | 260 |
261 | 261 |
262 struct CodeStubInterfaceDescriptor { | 262 struct CodeStubInterfaceDescriptor { |
263 CodeStubInterfaceDescriptor() | 263 CodeStubInterfaceDescriptor() |
264 : register_param_count_(-1), | 264 : register_param_count_(-1), |
265 stack_parameter_count_(NULL), | 265 stack_parameter_count_(NULL), |
266 extra_expression_stack_count_(0), | 266 acting_as_js_function_(false), |
267 register_params_(NULL) { } | 267 register_params_(NULL) { } |
268 int register_param_count_; | 268 int register_param_count_; |
269 const Register* stack_parameter_count_; | 269 const Register* stack_parameter_count_; |
270 int extra_expression_stack_count_; | 270 bool acting_as_js_function_; |
danno
2013/03/22 14:06:50
Can you please turn this bool into an enum?
mvstanton
2013/04/02 07:43:12
Done.
| |
271 Register* register_params_; | 271 Register* register_params_; |
272 Address deoptimization_handler_; | 272 Address deoptimization_handler_; |
273 | 273 |
274 int environment_length() const { | 274 int environment_length() const { |
275 if (stack_parameter_count_ != NULL) { | 275 if (stack_parameter_count_ != NULL) { |
276 return register_param_count_ + 1; | 276 return register_param_count_ + 1; |
277 } | 277 } |
278 return register_param_count_; | 278 return register_param_count_; |
279 } | 279 } |
280 }; | 280 }; |
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1563 void Generate(MacroAssembler* masm); | 1563 void Generate(MacroAssembler* masm); |
1564 | 1564 |
1565 bool fp_registers_; | 1565 bool fp_registers_; |
1566 | 1566 |
1567 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); | 1567 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); |
1568 }; | 1568 }; |
1569 | 1569 |
1570 | 1570 |
1571 class StubFailureTrampolineStub : public PlatformCodeStub { | 1571 class StubFailureTrampolineStub : public PlatformCodeStub { |
1572 public: | 1572 public: |
1573 static const int kMaxExtraExpressionStackCount = 1; | 1573 explicit StubFailureTrampolineStub(bool acting_as_js_function) |
1574 | 1574 : acting_as_js_function_(acting_as_js_function) {} |
1575 explicit StubFailureTrampolineStub(int extra_expression_stack_count) | |
1576 : extra_expression_stack_count_(extra_expression_stack_count) {} | |
1577 | 1575 |
1578 virtual bool IsPregenerated() { return true; } | 1576 virtual bool IsPregenerated() { return true; } |
1579 | 1577 |
1580 static void GenerateAheadOfTime(Isolate* isolate); | 1578 static void GenerateAheadOfTime(Isolate* isolate); |
1581 | 1579 |
1582 private: | 1580 private: |
1583 Major MajorKey() { return StubFailureTrampoline; } | 1581 Major MajorKey() { return StubFailureTrampoline; } |
1584 int MinorKey() { return extra_expression_stack_count_; } | 1582 int MinorKey() { return acting_as_js_function_; } |
1585 | 1583 |
1586 void Generate(MacroAssembler* masm); | 1584 void Generate(MacroAssembler* masm); |
1587 | 1585 |
1588 int extra_expression_stack_count_; | 1586 bool acting_as_js_function_; |
1589 | 1587 |
1590 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub); | 1588 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub); |
1591 }; | 1589 }; |
1592 | 1590 |
1593 | 1591 |
1594 class ProfileEntryHookStub : public PlatformCodeStub { | 1592 class ProfileEntryHookStub : public PlatformCodeStub { |
1595 public: | 1593 public: |
1596 explicit ProfileEntryHookStub() {} | 1594 explicit ProfileEntryHookStub() {} |
1597 | 1595 |
1598 // The profile entry hook function is not allowed to cause a GC. | 1596 // The profile entry hook function is not allowed to cause a GC. |
(...skipping 20 matching lines...) Expand all Loading... | |
1619 | 1617 |
1620 // The current function entry hook. | 1618 // The current function entry hook. |
1621 static FunctionEntryHook entry_hook_; | 1619 static FunctionEntryHook entry_hook_; |
1622 | 1620 |
1623 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1621 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
1624 }; | 1622 }; |
1625 | 1623 |
1626 } } // namespace v8::internal | 1624 } } // namespace v8::internal |
1627 | 1625 |
1628 #endif // V8_CODE_STUBS_H_ | 1626 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |