OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 Register GetTOSRegister(); | 384 Register GetTOSRegister(); |
385 | 385 |
386 // Push multiple registers on the stack and the virtual frame | 386 // Push multiple registers on the stack and the virtual frame |
387 // Register are selected by setting bit in src_regs and | 387 // Register are selected by setting bit in src_regs and |
388 // are pushed in decreasing order: r15 .. r0. | 388 // are pushed in decreasing order: r15 .. r0. |
389 void EmitPushMultiple(int count, int src_regs); | 389 void EmitPushMultiple(int count, int src_regs); |
390 | 390 |
391 static Register scratch0() { return r7; } | 391 static Register scratch0() { return r7; } |
392 static Register scratch1() { return r9; } | 392 static Register scratch1() { return r9; } |
393 | 393 |
394 inline void RaiseHeight(int count, unsigned known_smi_map = 0) { | |
395 ASSERT(count >= 32 || known_smi_map < (1u << count)); | |
396 element_count_ += count; | |
397 if (count >= kTOSKnownSmiMapSize) { | |
398 tos_known_smi_map_ = known_smi_map; | |
399 } else { | |
400 tos_known_smi_map_ = ((tos_known_smi_map_ << count) | known_smi_map); | |
401 } | |
402 } | |
Erik Corry
2010/11/05 22:04:36
This change is not necessary if EmitPush is used.
zhangk
2010/11/09 23:07:53
On 2010/11/05 22:04:36, Erik Corry wrote:
Done.
| |
403 | |
394 private: | 404 private: |
395 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset; | 405 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset; |
396 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset; | 406 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset; |
397 static const int kContextOffset = StandardFrameConstants::kContextOffset; | 407 static const int kContextOffset = StandardFrameConstants::kContextOffset; |
398 | 408 |
399 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize; | 409 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize; |
400 static const int kPreallocatedElements = 5 + 8; // 8 expression stack slots. | 410 static const int kPreallocatedElements = 5 + 8; // 8 expression stack slots. |
401 | 411 |
402 // 5 states for the top of stack, which can be in memory or in r0 and r1. | 412 // 5 states for the top of stack, which can be in memory or in r0 and r1. |
403 enum TopOfStack { | 413 enum TopOfStack { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
493 | 503 |
494 inline void LowerHeight(int count) { | 504 inline void LowerHeight(int count) { |
495 element_count_ -= count; | 505 element_count_ -= count; |
496 if (count >= kTOSKnownSmiMapSize) { | 506 if (count >= kTOSKnownSmiMapSize) { |
497 tos_known_smi_map_ = 0; | 507 tos_known_smi_map_ = 0; |
498 } else { | 508 } else { |
499 tos_known_smi_map_ >>= count; | 509 tos_known_smi_map_ >>= count; |
500 } | 510 } |
501 } | 511 } |
502 | 512 |
503 inline void RaiseHeight(int count, unsigned known_smi_map = 0) { | |
504 ASSERT(count >= 32 || known_smi_map < (1u << count)); | |
505 element_count_ += count; | |
506 if (count >= kTOSKnownSmiMapSize) { | |
507 tos_known_smi_map_ = known_smi_map; | |
508 } else { | |
509 tos_known_smi_map_ = ((tos_known_smi_map_ << count) | known_smi_map); | |
510 } | |
511 } | |
512 | |
513 friend class JumpTarget; | 513 friend class JumpTarget; |
514 }; | 514 }; |
515 | 515 |
516 | 516 |
517 } } // namespace v8::internal | 517 } } // namespace v8::internal |
518 | 518 |
519 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ | 519 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ |
OLD | NEW |