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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 ExternalReference miss_handler() { | 311 ExternalReference miss_handler() { |
312 ASSERT(has_miss_handler_); | 312 ASSERT(has_miss_handler_); |
313 return miss_handler_; | 313 return miss_handler_; |
314 } | 314 } |
315 | 315 |
316 bool has_miss_handler() { | 316 bool has_miss_handler() { |
317 return has_miss_handler_; | 317 return has_miss_handler_; |
318 } | 318 } |
319 | 319 |
320 Register GetParameterRegister(int index) { | 320 Register GetParameterRegister(int index) const { |
321 return register_params_[index]; | 321 return register_params_[index]; |
322 } | 322 } |
323 | 323 |
324 bool IsParameterCountRegister(int index) { | 324 bool IsParameterCountRegister(int index) { |
325 return GetParameterRegister(index).is(stack_parameter_count_); | 325 return GetParameterRegister(index).is(stack_parameter_count_); |
326 } | 326 } |
327 | 327 |
328 int GetHandlerParameterCount() { | 328 int GetHandlerParameterCount() { |
329 int params = environment_length(); | 329 int params = environment_length(); |
330 if (handler_arguments_mode_ == PASS_ARGUMENTS) { | 330 if (handler_arguments_mode_ == PASS_ARGUMENTS) { |
331 params += 1; | 331 params += 1; |
332 } | 332 } |
333 return params; | 333 return params; |
334 } | 334 } |
335 | 335 |
336 private: | 336 private: |
337 ExternalReference miss_handler_; | 337 ExternalReference miss_handler_; |
338 bool has_miss_handler_; | 338 bool has_miss_handler_; |
339 }; | 339 }; |
340 | 340 |
341 | 341 |
| 342 struct PlatformCallInterfaceDescriptor; |
| 343 |
| 344 |
| 345 struct CallInterfaceDescriptor { |
| 346 CallInterfaceDescriptor() |
| 347 : register_param_count_(-1), |
| 348 register_params_(NULL), |
| 349 param_representations_(NULL), |
| 350 platform_specific_descriptor_(NULL) { } |
| 351 |
| 352 bool initialized() const { return register_param_count_ >= 0; } |
| 353 |
| 354 int environment_length() const { |
| 355 return register_param_count_; |
| 356 } |
| 357 |
| 358 Representation GetParameterRepresentation(int index) const { |
| 359 return param_representations_[index]; |
| 360 } |
| 361 |
| 362 Register GetParameterRegister(int index) const { |
| 363 return register_params_[index]; |
| 364 } |
| 365 |
| 366 PlatformCallInterfaceDescriptor* platform_specific_descriptor() const { |
| 367 return platform_specific_descriptor_; |
| 368 } |
| 369 |
| 370 int register_param_count_; |
| 371 Register* register_params_; |
| 372 Representation* param_representations_; |
| 373 PlatformCallInterfaceDescriptor* platform_specific_descriptor_; |
| 374 }; |
| 375 |
| 376 |
342 class HydrogenCodeStub : public CodeStub { | 377 class HydrogenCodeStub : public CodeStub { |
343 public: | 378 public: |
344 enum InitializationState { | 379 enum InitializationState { |
345 UNINITIALIZED, | 380 UNINITIALIZED, |
346 INITIALIZED | 381 INITIALIZED |
347 }; | 382 }; |
348 | 383 |
349 explicit HydrogenCodeStub(InitializationState state = INITIALIZED) { | 384 explicit HydrogenCodeStub(InitializationState state = INITIALIZED) { |
350 is_uninitialized_ = (state == UNINITIALIZED); | 385 is_uninitialized_ = (state == UNINITIALIZED); |
351 } | 386 } |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2359 Isolate* isolate); | 2394 Isolate* isolate); |
2360 | 2395 |
2361 Major MajorKey() { return ProfileEntryHook; } | 2396 Major MajorKey() { return ProfileEntryHook; } |
2362 int MinorKey() { return 0; } | 2397 int MinorKey() { return 0; } |
2363 | 2398 |
2364 void Generate(MacroAssembler* masm); | 2399 void Generate(MacroAssembler* masm); |
2365 | 2400 |
2366 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2401 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2367 }; | 2402 }; |
2368 | 2403 |
| 2404 |
| 2405 class CallDescriptors { |
| 2406 public: |
| 2407 static void InitializeForIsolate(Isolate* isolate); |
| 2408 }; |
| 2409 |
2369 } } // namespace v8::internal | 2410 } } // namespace v8::internal |
2370 | 2411 |
2371 #endif // V8_CODE_STUBS_H_ | 2412 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |