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

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
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" 12 #include "vm/assembler.h"
13 #include "vm/assembler_macros.h"
13 #include "vm/ast.h" 14 #include "vm/ast.h"
14 #include "vm/growable_array.h" 15 #include "vm/growable_array.h"
15 #include "vm/parser.h" 16 #include "vm/parser.h"
16 17
17 namespace dart { 18 namespace dart {
18 19
19 // Forward declarations. 20 // Forward declarations.
20 class Assembler; 21 class Assembler;
21 class AstNode; 22 class AstNode;
22 class CodeGenerator; 23 class CodeGenerator;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual bool IsOptimizing() const { 113 virtual bool IsOptimizing() const {
113 return false; 114 return false;
114 } 115 }
115 116
116 void GenerateReturnEpilog(ReturnNode* node); 117 void GenerateReturnEpilog(ReturnNode* node);
117 118
118 // Return true if the VM may optimize functions. 119 // Return true if the VM may optimize functions.
119 static bool CanOptimize(); 120 static bool CanOptimize();
120 121
121 private: 122 private:
123 static const int kLocalsOffsetFromFP = (-1 * kWordSize);
124
122 // TODO(srdjan): Remove the friendship once the two compilers are properly 125 // TODO(srdjan): Remove the friendship once the two compilers are properly
123 // structured. 126 // structured.
124 friend class OptimizingCodeGenerator; 127 friend class OptimizingCodeGenerator;
125 128
126 // Return true if intrinsification succeeded and no more code is needed. 129 // Return true if intrinsification succeeded and no more code is needed.
127 // Returns false if either no intrinsification occured or if intrinsified 130 // Returns false if either no intrinsification occured or if intrinsified
128 // code needs the rest for slow case execution. 131 // code needs the rest for slow case execution.
129 bool TryIntrinsify(); 132 bool TryIntrinsify();
130 133
131 void IntrinsifyGetter(); 134 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 262 // The runtime context level is only incremented when a new context is
260 // allocated and chained to the list of contexts. 263 // allocated and chained to the list of contexts.
261 intptr_t context_level_; 264 intptr_t context_level_;
262 265
263 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); 266 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator);
264 }; 267 };
265 268
266 } // namespace dart 269 } // namespace dart
267 270
268 #endif // VM_CODE_GENERATOR_IA32_H_ 271 #endif // VM_CODE_GENERATOR_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698