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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 extra_expression_stack_count_(0), |
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 int extra_expression_stack_count_; |
271 Register* register_params_; | 271 Register* register_params_; |
272 Address deoptimization_handler_; | 272 Address deoptimization_handler_; |
| 273 |
| 274 int environment_length() const { |
| 275 if (stack_parameter_count_ != NULL) { |
| 276 return register_param_count_ + 1; |
| 277 } |
| 278 return register_param_count_; |
| 279 } |
273 }; | 280 }; |
274 | 281 |
275 | 282 |
276 class HydrogenCodeStub : public CodeStub { | 283 class HydrogenCodeStub : public CodeStub { |
277 public: | 284 public: |
278 // Retrieve the code for the stub. Generate the code if needed. | 285 // Retrieve the code for the stub. Generate the code if needed. |
279 virtual Handle<Code> GenerateCode() = 0; | 286 virtual Handle<Code> GenerateCode() = 0; |
280 | 287 |
281 virtual int GetCodeKind() { return Code::COMPILED_STUB; } | 288 virtual int GetCodeKind() { return Code::COMPILED_STUB; } |
282 | 289 |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 | 1619 |
1613 // The current function entry hook. | 1620 // The current function entry hook. |
1614 static FunctionEntryHook entry_hook_; | 1621 static FunctionEntryHook entry_hook_; |
1615 | 1622 |
1616 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1623 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
1617 }; | 1624 }; |
1618 | 1625 |
1619 } } // namespace v8::internal | 1626 } } // namespace v8::internal |
1620 | 1627 |
1621 #endif // V8_CODE_STUBS_H_ | 1628 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |