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

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

Issue 67163: Avoid a call to the runtime system when doing binary fp ops on ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 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-arm.cc ('k') | src/codegen-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 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 17 matching lines...) Expand all
28 #ifndef V8_CODEGEN_IA32_H_ 28 #ifndef V8_CODEGEN_IA32_H_
29 #define V8_CODEGEN_IA32_H_ 29 #define V8_CODEGEN_IA32_H_
30 30
31 namespace v8 { namespace internal { 31 namespace v8 { namespace internal {
32 32
33 // Forward declarations 33 // Forward declarations
34 class DeferredCode; 34 class DeferredCode;
35 class RegisterAllocator; 35 class RegisterAllocator;
36 class RegisterFile; 36 class RegisterFile;
37 37
38 // Mode to overwrite BinaryExpression values.
39 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
40
41 enum InitState { CONST_INIT, NOT_CONST_INIT }; 38 enum InitState { CONST_INIT, NOT_CONST_INIT };
42 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; 39 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF };
43 40
44 41
45 // ------------------------------------------------------------------------- 42 // -------------------------------------------------------------------------
46 // Reference support 43 // Reference support
47 44
48 // A reference is a C++ stack-allocated object that keeps an ECMA 45 // A reference is a C++ stack-allocated object that keeps an ECMA
49 // reference on the execution stack while in scope. For variables 46 // reference on the execution stack while in scope. For variables
50 // the reference is empty, indicating that it isn't necessary to 47 // the reference is empty, indicating that it isn't necessary to
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // through the context chain. 425 // through the context chain.
429 void LoadTypeofExpression(Expression* x); 426 void LoadTypeofExpression(Expression* x);
430 427
431 // Translate the value on top of the frame into control flow to the 428 // Translate the value on top of the frame into control flow to the
432 // control destination. 429 // control destination.
433 void ToBoolean(ControlDestination* destination); 430 void ToBoolean(ControlDestination* destination);
434 431
435 void GenericBinaryOperation( 432 void GenericBinaryOperation(
436 Token::Value op, 433 Token::Value op,
437 SmiAnalysis* type, 434 SmiAnalysis* type,
438 const OverwriteMode overwrite_mode = NO_OVERWRITE); 435 OverwriteMode overwrite_mode);
439 436
440 // If possible, combine two constant smi values using op to produce 437 // If possible, combine two constant smi values using op to produce
441 // a smi result, and push it on the virtual frame, all at compile time. 438 // a smi result, and push it on the virtual frame, all at compile time.
442 // Returns true if it succeeds. Otherwise it has no effect. 439 // Returns true if it succeeds. Otherwise it has no effect.
443 bool FoldConstantSmis(Token::Value op, int left, int right); 440 bool FoldConstantSmis(Token::Value op, int left, int right);
444 441
445 // Emit code to perform a binary operation on a constant 442 // Emit code to perform a binary operation on a constant
446 // smi and a likely smi. Consumes the Result *operand. 443 // smi and a likely smi. Consumes the Result *operand.
447 void ConstantSmiBinaryOperation(Token::Value op, 444 void ConstantSmiBinaryOperation(Token::Value op,
448 Result* operand, 445 Result* operand,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 friend class Reference; 609 friend class Reference;
613 friend class Result; 610 friend class Result;
614 611
615 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); 612 DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
616 }; 613 };
617 614
618 615
619 } } // namespace v8::internal 616 } } // namespace v8::internal
620 617
621 #endif // V8_CODEGEN_IA32_H_ 618 #endif // V8_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/codegen-arm.cc ('k') | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698