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

Side by Side Diff: vm/code_generator_ia32.h

Issue 10375059: Use a reserved stack local variable to store the Code object so that it can be looked up easily whe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/code_generator.cc ('k') | vm/code_generator_ia32.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_CODE_GENERATOR_IA32_H_ 5 #ifndef VM_CODE_GENERATOR_IA32_H_
6 #define VM_CODE_GENERATOR_IA32_H_ 6 #define VM_CODE_GENERATOR_IA32_H_
7 7
8 #ifndef VM_CODE_GENERATOR_H_ 8 #ifndef VM_CODE_GENERATOR_H_
9 #error Do not include code_generator_ia32.h directly; use code_generator.h. 9 #error Do not include code_generator_ia32.h directly; use code_generator.h.
10 #endif 10 #endif
11 11
12 #include "vm/assembler.h"
13 #include "vm/ast.h" 12 #include "vm/ast.h"
14 #include "vm/growable_array.h" 13 #include "vm/growable_array.h"
15 #include "vm/parser.h" 14 #include "vm/parser.h"
16 15
17 namespace dart { 16 namespace dart {
18 17
19 // Forward declarations. 18 // Forward declarations.
20 class Assembler; 19 class Assembler;
21 class AstNode; 20 class AstNode;
22 class CodeGenerator; 21 class CodeGenerator;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual bool IsOptimizing() const { 111 virtual bool IsOptimizing() const {
113 return false; 112 return false;
114 } 113 }
115 114
116 void GenerateReturnEpilog(ReturnNode* node); 115 void GenerateReturnEpilog(ReturnNode* node);
117 116
118 // Return true if the VM may optimize functions. 117 // Return true if the VM may optimize functions.
119 static bool CanOptimize(); 118 static bool CanOptimize();
120 119
121 private: 120 private:
121 static const int kLocalsOffsetFromFP = (-1 * kWordSize);
122
122 // TODO(srdjan): Remove the friendship once the two compilers are properly 123 // TODO(srdjan): Remove the friendship once the two compilers are properly
123 // structured. 124 // structured.
124 friend class OptimizingCodeGenerator; 125 friend class OptimizingCodeGenerator;
125 126
126 // Return true if intrinsification succeeded and no more code is needed. 127 // Return true if intrinsification succeeded and no more code is needed.
127 // Returns false if either no intrinsification occured or if intrinsified 128 // Returns false if either no intrinsification occured or if intrinsified
128 // code needs the rest for slow case execution. 129 // code needs the rest for slow case execution.
129 bool TryIntrinsify(); 130 bool TryIntrinsify();
130 131
131 void IntrinsifyGetter(); 132 void IntrinsifyGetter();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // The runtime context level is only incremented when a new context is 260 // The runtime context level is only incremented when a new context is
260 // allocated and chained to the list of contexts. 261 // allocated and chained to the list of contexts.
261 intptr_t context_level_; 262 intptr_t context_level_;
262 263
263 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); 264 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator);
264 }; 265 };
265 266
266 } // namespace dart 267 } // namespace dart
267 268
268 #endif // VM_CODE_GENERATOR_IA32_H_ 269 #endif // VM_CODE_GENERATOR_IA32_H_
OLDNEW
« no previous file with comments | « vm/code_generator.cc ('k') | vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698