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

Side by Side Diff: src/codegen.h

Issue 113455: Clean up the Result class. Reduce the size of Result from four words... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/codegen.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 80
81 #if V8_TARGET_ARCH_IA32 81 #if V8_TARGET_ARCH_IA32
82 #include "ia32/codegen-ia32.h" 82 #include "ia32/codegen-ia32.h"
83 #elif V8_TARGET_ARCH_X64 83 #elif V8_TARGET_ARCH_X64
84 #include "x64/codegen-x64.h" 84 #include "x64/codegen-x64.h"
85 #elif V8_TARGET_ARCH_ARM 85 #elif V8_TARGET_ARCH_ARM
86 #include "arm/codegen-arm.h" 86 #include "arm/codegen-arm.h"
87 #endif 87 #endif
88 88
89 #include "register-allocator.h"
90
89 namespace v8 { namespace internal { 91 namespace v8 { namespace internal {
90 92
91 93
94 // Code generation can be nested. Code generation scopes form a stack
95 // of active code generators.
96 class CodeGeneratorScope BASE_EMBEDDED {
97 public:
98 explicit CodeGeneratorScope(CodeGenerator* cgen) {
99 previous = Result::cgen_;
Kevin Millikin (Chromium) 2009/05/15 10:50:49 Does the static top code generator belong to the R
Mads Ager (chromium) 2009/05/15 11:05:25 Good point. I moved it to the CodeGeneratorScope.
100 Result::cgen_ = cgen;
101 }
102 ~CodeGeneratorScope() {
103 Result::cgen_ = previous;
104 }
105 private:
106 CodeGenerator* previous;
107 };
108
109
92 // Use lazy compilation; defaults to true. 110 // Use lazy compilation; defaults to true.
93 // NOTE: Do not remove non-lazy compilation until we can properly 111 // NOTE: Do not remove non-lazy compilation until we can properly
94 // install extensions with lazy compilation enabled. At the 112 // install extensions with lazy compilation enabled. At the
95 // moment, this doesn't work for the extensions in Google3, 113 // moment, this doesn't work for the extensions in Google3,
96 // and we can only run the tests with --nolazy. 114 // and we can only run the tests with --nolazy.
97 115
98 116
99 // Deferred code objects are small pieces of code that are compiled 117 // Deferred code objects are small pieces of code that are compiled
100 // out of line. They are used to defer the compilation of uncommon 118 // out of line. They are used to defer the compilation of uncommon
101 // paths thereby avoiding expensive jumps around uncommon code parts. 119 // paths thereby avoiding expensive jumps around uncommon code parts.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 PrintF("ArgumentsAccessStub (type %d)\n", type_); 339 PrintF("ArgumentsAccessStub (type %d)\n", type_);
322 } 340 }
323 #endif 341 #endif
324 }; 342 };
325 343
326 344
327 } // namespace internal 345 } // namespace internal
328 } // namespace v8 346 } // namespace v8
329 347
330 #endif // V8_CODEGEN_H_ 348 #endif // V8_CODEGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698