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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 21885003: Enables unboxed mints in ia32 javascript int compatability mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
11 #include "vm/handles_impl.h" 11 #include "vm/handles_impl.h"
12 #include "vm/locations.h" 12 #include "vm/locations.h"
13 #include "vm/object.h" 13 #include "vm/object.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
18
17 class BitVector; 19 class BitVector;
18 class BlockEntryInstr; 20 class BlockEntryInstr;
19 class BufferFormatter; 21 class BufferFormatter;
20 class CatchBlockEntryInstr; 22 class CatchBlockEntryInstr;
21 class ComparisonInstr; 23 class ComparisonInstr;
22 class ControlInstruction; 24 class ControlInstruction;
23 class Definition; 25 class Definition;
24 class Environment; 26 class Environment;
25 class FlowGraph; 27 class FlowGraph;
26 class FlowGraphBuilder; 28 class FlowGraphBuilder;
(...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after
5800 } 5802 }
5801 5803
5802 Value* left() const { return inputs_[0]; } 5804 Value* left() const { return inputs_[0]; }
5803 Value* right() const { return inputs_[1]; } 5805 Value* right() const { return inputs_[1]; }
5804 5806
5805 Token::Kind op_kind() const { return op_kind_; } 5807 Token::Kind op_kind() const { return op_kind_; }
5806 5808
5807 virtual void PrintOperandsTo(BufferFormatter* f) const; 5809 virtual void PrintOperandsTo(BufferFormatter* f) const;
5808 5810
5809 virtual bool CanDeoptimize() const { 5811 virtual bool CanDeoptimize() const {
5810 return (op_kind() == Token::kADD) || (op_kind() == Token::kSUB); 5812 return FLAG_throw_on_javascript_int_overflow ||
5813 (op_kind() == Token::kADD) || (op_kind() == Token::kSUB);
5811 } 5814 }
5812 5815
5813 virtual Representation representation() const { 5816 virtual Representation representation() const {
5814 return kUnboxedMint; 5817 return kUnboxedMint;
5815 } 5818 }
5816 5819
5817 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5820 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5818 ASSERT((idx == 0) || (idx == 1)); 5821 ASSERT((idx == 0) || (idx == 1));
5819 return kUnboxedMint; 5822 return kUnboxedMint;
5820 } 5823 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
5914 // Override generated deopt-id. 5917 // Override generated deopt-id.
5915 deopt_id_ = deopt_id; 5918 deopt_id_ = deopt_id;
5916 } 5919 }
5917 5920
5918 Value* value() const { return inputs_[0]; } 5921 Value* value() const { return inputs_[0]; }
5919 5922
5920 Token::Kind op_kind() const { return op_kind_; } 5923 Token::Kind op_kind() const { return op_kind_; }
5921 5924
5922 virtual void PrintOperandsTo(BufferFormatter* f) const; 5925 virtual void PrintOperandsTo(BufferFormatter* f) const;
5923 5926
5924 virtual bool CanDeoptimize() const { return false; } 5927 virtual bool CanDeoptimize() const {
5928 return FLAG_throw_on_javascript_int_overflow;
5929 }
5925 5930
5926 virtual Representation representation() const { 5931 virtual Representation representation() const {
5927 return kUnboxedMint; 5932 return kUnboxedMint;
5928 } 5933 }
5929 5934
5930 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5935 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5931 ASSERT(idx == 0); 5936 ASSERT(idx == 0);
5932 return kUnboxedMint; 5937 return kUnboxedMint;
5933 } 5938 }
5934 5939
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
6626 ForwardInstructionIterator* current_iterator_; 6631 ForwardInstructionIterator* current_iterator_;
6627 6632
6628 private: 6633 private:
6629 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6634 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6630 }; 6635 };
6631 6636
6632 6637
6633 } // namespace dart 6638 } // namespace dart
6634 6639
6635 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6640 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698