Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: src/arm/macro-assembler-arm.h

Issue 214623002: Only allow automatic FrameScope types for FrameAndConstantPoolScope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 }; 1517 };
1518 1518
1519 1519
1520 class FrameAndConstantPoolScope { 1520 class FrameAndConstantPoolScope {
1521 public: 1521 public:
1522 FrameAndConstantPoolScope(MacroAssembler* masm, StackFrame::Type type) 1522 FrameAndConstantPoolScope(MacroAssembler* masm, StackFrame::Type type)
1523 : masm_(masm), 1523 : masm_(masm),
1524 type_(type), 1524 type_(type),
1525 old_has_frame_(masm->has_frame()), 1525 old_has_frame_(masm->has_frame()),
1526 old_constant_pool_available_(masm->is_constant_pool_available()) { 1526 old_constant_pool_available_(masm->is_constant_pool_available()) {
1527 // We only want to enable constant pool access for non-manual frame scopes
1528 // to ensure the constant pool pointer is valid throughout the scope.
1529 ASSERT(type_ != StackFrame::MANUAL && type_ != StackFrame::NONE);
1527 masm->set_has_frame(true); 1530 masm->set_has_frame(true);
1528 masm->set_constant_pool_available(true); 1531 masm->set_constant_pool_available(true);
1529 if (type_ != StackFrame::MANUAL && type_ != StackFrame::NONE) { 1532 masm->EnterFrame(type, !old_constant_pool_available_);
1530 masm->EnterFrame(type, !old_constant_pool_available_);
1531 }
1532 } 1533 }
1533 1534
1534 ~FrameAndConstantPoolScope() { 1535 ~FrameAndConstantPoolScope() {
1535 masm_->LeaveFrame(type_); 1536 masm_->LeaveFrame(type_);
1536 masm_->set_has_frame(old_has_frame_); 1537 masm_->set_has_frame(old_has_frame_);
1537 masm_->set_constant_pool_available(old_constant_pool_available_); 1538 masm_->set_constant_pool_available(old_constant_pool_available_);
1538 } 1539 }
1539 1540
1540 // Normally we generate the leave-frame code when this object goes 1541 // Normally we generate the leave-frame code when this object goes
1541 // out of scope. Sometimes we may need to generate the code somewhere else 1542 // out of scope. Sometimes we may need to generate the code somewhere else
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1601 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1601 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1602 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1602 #else 1603 #else
1603 #define ACCESS_MASM(masm) masm-> 1604 #define ACCESS_MASM(masm) masm->
1604 #endif 1605 #endif
1605 1606
1606 1607
1607 } } // namespace v8::internal 1608 } } // namespace v8::internal
1608 1609
1609 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1610 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698