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

Unified Diff: src/codegen-inl.h

Issue 118226: Simplify the processing of deferred code in the code generator. Our... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-inl.h
===================================================================
--- src/codegen-inl.h (revision 2099)
+++ src/codegen-inl.h (working copy)
@@ -32,28 +32,22 @@
#include "codegen.h"
#include "register-allocator-inl.h"
+#if V8_TARGET_ARCH_IA32
+#include "ia32/codegen-ia32-inl.h"
+#elif V8_TARGET_ARCH_X64
+#include "x64/codegen-x64-inl.h"
+#elif V8_TARGET_ARCH_ARM
+#include "arm/codegen-arm-inl.h"
+#else
+#error Unsupported target architecture.
+#endif
+
+
namespace v8 {
namespace internal {
+#define __ ACCESS_MASM(masm_)
-void DeferredCode::SetEntryFrame(Result* arg) {
- ASSERT(cgen()->has_valid_frame());
- cgen()->frame()->Push(arg);
- enter()->set_entry_frame(new VirtualFrame(cgen()->frame()));
- *arg = cgen()->frame()->Pop();
-}
-
-
-void DeferredCode::SetEntryFrame(Result* arg0, Result* arg1) {
- ASSERT(cgen()->has_valid_frame());
- cgen()->frame()->Push(arg0);
- cgen()->frame()->Push(arg1);
- enter()->set_entry_frame(new VirtualFrame(cgen()->frame()));
- *arg1 = cgen()->frame()->Pop();
- *arg0 = cgen()->frame()->Pop();
-}
-
-
// -----------------------------------------------------------------------------
// Support for "structured" code comments.
//
@@ -64,15 +58,12 @@
class Comment BASE_EMBEDDED {
public:
- Comment(MacroAssembler* masm, const char* msg)
- : masm_(masm),
- msg_(msg) {
- masm_->RecordComment(msg);
+ Comment(MacroAssembler* masm, const char* msg) : masm_(masm), msg_(msg) {
+ __ RecordComment(msg);
}
~Comment() {
- if (msg_[0] == '[')
- masm_->RecordComment("]");
+ if (msg_[0] == '[') __ RecordComment("]");
}
private:
@@ -89,7 +80,9 @@
#endif // DEBUG
+#undef __
+
} } // namespace v8::internal
#endif // V8_CODEGEN_INL_H_
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698