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

Side by Side Diff: src/arm/codegen-arm.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 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
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/codegen-arm.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static bool MakeCode(CompilationInfo* info); 202 static bool MakeCode(CompilationInfo* info);
203 203
204 // Printing of AST, etc. as requested by flags. 204 // Printing of AST, etc. as requested by flags.
205 static void MakeCodePrologue(CompilationInfo* info); 205 static void MakeCodePrologue(CompilationInfo* info);
206 206
207 // Allocate and install the code. 207 // Allocate and install the code.
208 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, 208 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm,
209 Code::Flags flags, 209 Code::Flags flags,
210 CompilationInfo* info); 210 CompilationInfo* info);
211 211
212 // Print the code after compiling it.
213 static void PrintCode(Handle<Code> code, CompilationInfo* info);
214
212 #ifdef ENABLE_LOGGING_AND_PROFILING 215 #ifdef ENABLE_LOGGING_AND_PROFILING
213 static bool ShouldGenerateLog(Expression* type); 216 static bool ShouldGenerateLog(Expression* type);
214 #endif 217 #endif
215 218
216 static void SetFunctionInfo(Handle<JSFunction> fun, 219 static void SetFunctionInfo(Handle<JSFunction> fun,
217 FunctionLiteral* lit, 220 FunctionLiteral* lit,
218 bool is_toplevel, 221 bool is_toplevel,
219 Handle<Script> script); 222 Handle<Script> script);
220 223
221 static bool RecordPositions(MacroAssembler* masm, 224 static bool RecordPositions(MacroAssembler* masm,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 263 }
261 264
262 void AddDeferred(DeferredCode* code) { deferred_.Add(code); } 265 void AddDeferred(DeferredCode* code) { deferred_.Add(code); }
263 266
264 // Constants related to patching of inlined load/store. 267 // Constants related to patching of inlined load/store.
265 static int GetInlinedKeyedLoadInstructionsAfterPatch() { 268 static int GetInlinedKeyedLoadInstructionsAfterPatch() {
266 return FLAG_debug_code ? 32 : 13; 269 return FLAG_debug_code ? 32 : 13;
267 } 270 }
268 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5; 271 static const int kInlinedKeyedStoreInstructionsAfterPatch = 5;
269 static int GetInlinedNamedStoreInstructionsAfterPatch() { 272 static int GetInlinedNamedStoreInstructionsAfterPatch() {
270 ASSERT(inlined_write_barrier_size_ != -1); 273 ASSERT(Isolate::Current()->inlined_write_barrier_size() != -1);
271 return inlined_write_barrier_size_ + 4; 274 return Isolate::Current()->inlined_write_barrier_size() + 4;
272 } 275 }
273 276
274 private: 277 private:
275 // Type of a member function that generates inline code for a native function. 278 // Type of a member function that generates inline code for a native function.
276 typedef void (CodeGenerator::*InlineFunctionGenerator) 279 typedef void (CodeGenerator::*InlineFunctionGenerator)
277 (ZoneList<Expression*>*); 280 (ZoneList<Expression*>*);
278 281
279 static const InlineFunctionGenerator kInlineFunctionGenerators[]; 282 static const InlineFunctionGenerator kInlineFunctionGenerators[];
280 283
281 // Construction/Destruction 284 // Construction/Destruction
(...skipping 16 matching lines...) Expand all
298 JumpTarget* false_target() const { return state_->false_target(); } 301 JumpTarget* false_target() const { return state_->false_target(); }
299 302
300 // Track loop nesting level. 303 // Track loop nesting level.
301 int loop_nesting() const { return loop_nesting_; } 304 int loop_nesting() const { return loop_nesting_; }
302 void IncrementLoopNesting() { loop_nesting_++; } 305 void IncrementLoopNesting() { loop_nesting_++; }
303 void DecrementLoopNesting() { loop_nesting_--; } 306 void DecrementLoopNesting() { loop_nesting_--; }
304 307
305 // Node visitors. 308 // Node visitors.
306 void VisitStatements(ZoneList<Statement*>* statements); 309 void VisitStatements(ZoneList<Statement*>* statements);
307 310
311 virtual void VisitSlot(Slot* node);
308 #define DEF_VISIT(type) \ 312 #define DEF_VISIT(type) \
309 void Visit##type(type* node); 313 virtual void Visit##type(type* node);
310 AST_NODE_LIST(DEF_VISIT) 314 AST_NODE_LIST(DEF_VISIT)
311 #undef DEF_VISIT 315 #undef DEF_VISIT
312 316
313 // Main code generation function 317 // Main code generation function
314 void Generate(CompilationInfo* info); 318 void Generate(CompilationInfo* info);
315 319
316 // Generate the return sequence code. Should be called no more than 320 // Generate the return sequence code. Should be called no more than
317 // once per compiled function, immediately after binding the return 321 // once per compiled function, immediately after binding the return
318 // target (which can not be done more than once). The return value should 322 // target (which can not be done more than once). The return value should
319 // be in r0. 323 // be in r0.
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 Vector<TypeInfo>* type_info_; 567 Vector<TypeInfo>* type_info_;
564 568
565 // Jump targets 569 // Jump targets
566 BreakTarget function_return_; 570 BreakTarget function_return_;
567 571
568 // True if the function return is shadowed (ie, jumping to the target 572 // True if the function return is shadowed (ie, jumping to the target
569 // function_return_ does not jump to the true function return, but rather 573 // function_return_ does not jump to the true function return, but rather
570 // to some unlinking code). 574 // to some unlinking code).
571 bool function_return_is_shadowed_; 575 bool function_return_is_shadowed_;
572 576
573 // Size of inlined write barriers generated by EmitNamedStore.
574 static int inlined_write_barrier_size_;
575
576 friend class VirtualFrame; 577 friend class VirtualFrame;
577 friend class Isolate; 578 friend class Isolate;
578 friend class JumpTarget; 579 friend class JumpTarget;
579 friend class Reference; 580 friend class Reference;
580 friend class FastCodeGenerator; 581 friend class FastCodeGenerator;
581 friend class FullCodeGenerator; 582 friend class FullCodeGenerator;
582 friend class FullCodeGenSyntaxChecker; 583 friend class FullCodeGenSyntaxChecker;
583 friend class InlineRuntimeFunctionsTable; 584 friend class InlineRuntimeFunctionsTable;
585 friend class LCodeGen;
584 586
585 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); 587 DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
586 }; 588 };
587 589
588 590
589 } } // namespace v8::internal 591 } } // namespace v8::internal
590 592
591 #endif // V8_ARM_CODEGEN_ARM_H_ 593 #endif // V8_ARM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698