| 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 void EmitAssignment(Expression* expr); | 554 void EmitAssignment(Expression* expr); |
| 555 | 555 |
| 556 // Complete a variable assignment. The right-hand-side value is expected | 556 // Complete a variable assignment. The right-hand-side value is expected |
| 557 // in the accumulator. | 557 // in the accumulator. |
| 558 void EmitVariableAssignment(Variable* var, | 558 void EmitVariableAssignment(Variable* var, |
| 559 Token::Value op); | 559 Token::Value op); |
| 560 | 560 |
| 561 // Helper functions to EmitVariableAssignment | 561 // Helper functions to EmitVariableAssignment |
| 562 void EmitStoreToStackLocalOrContextSlot(Variable* var, | 562 void EmitStoreToStackLocalOrContextSlot(Variable* var, |
| 563 MemOperand location); | 563 MemOperand location); |
| 564 void EmitCallStoreContextSlot(Handle<String> name, LanguageMode mode); | 564 void EmitCallStoreContextSlot(Handle<String> name, StrictMode strict_mode); |
| 565 | 565 |
| 566 // Complete a named property assignment. The receiver is expected on top | 566 // Complete a named property assignment. The receiver is expected on top |
| 567 // of the stack and the right-hand-side value in the accumulator. | 567 // of the stack and the right-hand-side value in the accumulator. |
| 568 void EmitNamedPropertyAssignment(Assignment* expr); | 568 void EmitNamedPropertyAssignment(Assignment* expr); |
| 569 | 569 |
| 570 // Complete a keyed property assignment. The receiver and key are | 570 // Complete a keyed property assignment. The receiver and key are |
| 571 // expected on top of the stack and the right-hand-side value in the | 571 // expected on top of the stack and the right-hand-side value in the |
| 572 // accumulator. | 572 // accumulator. |
| 573 void EmitKeyedPropertyAssignment(Assignment* expr); | 573 void EmitKeyedPropertyAssignment(Assignment* expr); |
| 574 | 574 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 600 | 600 |
| 601 MacroAssembler* masm() { return masm_; } | 601 MacroAssembler* masm() { return masm_; } |
| 602 | 602 |
| 603 class ExpressionContext; | 603 class ExpressionContext; |
| 604 const ExpressionContext* context() { return context_; } | 604 const ExpressionContext* context() { return context_; } |
| 605 void set_new_context(const ExpressionContext* context) { context_ = context; } | 605 void set_new_context(const ExpressionContext* context) { context_ = context; } |
| 606 | 606 |
| 607 Handle<Script> script() { return info_->script(); } | 607 Handle<Script> script() { return info_->script(); } |
| 608 bool is_eval() { return info_->is_eval(); } | 608 bool is_eval() { return info_->is_eval(); } |
| 609 bool is_native() { return info_->is_native(); } | 609 bool is_native() { return info_->is_native(); } |
| 610 bool is_sloppy_mode() { return language_mode() == SLOPPY_MODE; } | 610 StrictMode strict_mode() { return function()->strict_mode(); } |
| 611 StrictModeFlag strict_mode() { | |
| 612 return is_sloppy_mode() ? kSloppyMode : kStrictMode; | |
| 613 } | |
| 614 LanguageMode language_mode() { return function()->language_mode(); } | |
| 615 FunctionLiteral* function() { return info_->function(); } | 611 FunctionLiteral* function() { return info_->function(); } |
| 616 Scope* scope() { return scope_; } | 612 Scope* scope() { return scope_; } |
| 617 | 613 |
| 618 static Register result_register(); | 614 static Register result_register(); |
| 619 static Register context_register(); | 615 static Register context_register(); |
| 620 | 616 |
| 621 // Set fields in the stack frame. Offsets are the frame pointer relative | 617 // Set fields in the stack frame. Offsets are the frame pointer relative |
| 622 // offsets defined in, e.g., StandardFrameConstants. | 618 // offsets defined in, e.g., StandardFrameConstants. |
| 623 void StoreToFrameField(int frame_offset, Register value); | 619 void StoreToFrameField(int frame_offset, Register value); |
| 624 | 620 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 | 961 |
| 966 Address start_; | 962 Address start_; |
| 967 Address instruction_start_; | 963 Address instruction_start_; |
| 968 uint32_t length_; | 964 uint32_t length_; |
| 969 }; | 965 }; |
| 970 | 966 |
| 971 | 967 |
| 972 } } // namespace v8::internal | 968 } } // namespace v8::internal |
| 973 | 969 |
| 974 #endif // V8_FULL_CODEGEN_H_ | 970 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |