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

Side by Side Diff: src/codegen.cc

Issue 585004: Move class declaration of Comment from codegen-inl.h to codegen.h... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: v2 Created 10 years, 10 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/codegen.h ('k') | src/codegen-inl.h » ('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 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 24 matching lines...) Expand all
35 #include "prettyprinter.h" 35 #include "prettyprinter.h"
36 #include "register-allocator-inl.h" 36 #include "register-allocator-inl.h"
37 #include "rewriter.h" 37 #include "rewriter.h"
38 #include "runtime.h" 38 #include "runtime.h"
39 #include "scopeinfo.h" 39 #include "scopeinfo.h"
40 #include "stub-cache.h" 40 #include "stub-cache.h"
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 #define __ ACCESS_MASM(masm_)
46
47 #ifdef DEBUG
48
49 Comment::Comment(MacroAssembler* masm, const char* msg)
50 : masm_(masm), msg_(msg) {
51 __ RecordComment(msg);
52 }
53
54
55 Comment::~Comment() {
56 if (msg_[0] == '[') __ RecordComment("]");
57 }
58
59 #endif // DEBUG
60
61 #undef __
62
45 63
46 CodeGenerator* CodeGeneratorScope::top_ = NULL; 64 CodeGenerator* CodeGeneratorScope::top_ = NULL;
47 65
48 66
49 DeferredCode::DeferredCode() 67 DeferredCode::DeferredCode()
50 : masm_(CodeGeneratorScope::Current()->masm()), 68 : masm_(CodeGeneratorScope::Current()->masm()),
51 statement_position_(masm_->current_statement_position()), 69 statement_position_(masm_->current_statement_position()),
52 position_(masm_->current_position()) { 70 position_(masm_->current_position()) {
53 ASSERT(statement_position_ != RelocInfo::kNoPosition); 71 ASSERT(statement_position_ != RelocInfo::kNoPosition);
54 ASSERT(position_ != RelocInfo::kNoPosition); 72 ASSERT(position_ != RelocInfo::kNoPosition);
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 527
510 #ifdef ENABLE_DEBUGGER_SUPPORT 528 #ifdef ENABLE_DEBUGGER_SUPPORT
511 void DebuggerStatementStub::Generate(MacroAssembler* masm) { 529 void DebuggerStatementStub::Generate(MacroAssembler* masm) {
512 Runtime::Function* f = Runtime::FunctionForId(Runtime::kDebugBreak); 530 Runtime::Function* f = Runtime::FunctionForId(Runtime::kDebugBreak);
513 masm->TailCallRuntime(ExternalReference(f), 0, f->result_size); 531 masm->TailCallRuntime(ExternalReference(f), 0, f->result_size);
514 } 532 }
515 #endif 533 #endif
516 534
517 535
518 } } // namespace v8::internal 536 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.h ('k') | src/codegen-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698