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

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

Issue 11414136: Implement proposed new identity spec. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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_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"
(...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 2216
2217 2217
2218 inline Representation BranchInstr::RequiredInputRepresentation( 2218 inline Representation BranchInstr::RequiredInputRepresentation(
2219 intptr_t i) const { 2219 intptr_t i) const {
2220 return comparison()->RequiredInputRepresentation(i); 2220 return comparison()->RequiredInputRepresentation(i);
2221 } 2221 }
2222 2222
2223 2223
2224 class StrictCompareInstr : public ComparisonInstr { 2224 class StrictCompareInstr : public ComparisonInstr {
2225 public: 2225 public:
2226 StrictCompareInstr(Token::Kind kind, Value* left, Value* right) 2226 StrictCompareInstr(Token::Kind kind, Value* left, Value* right);
2227 : ComparisonInstr(kind, left, right) {
2228 ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT));
2229 }
2230 2227
2231 DECLARE_INSTRUCTION(StrictCompare) 2228 DECLARE_INSTRUCTION(StrictCompare)
2232 virtual RawAbstractType* CompileType() const; 2229 virtual RawAbstractType* CompileType() const;
2233 2230
2234 virtual void PrintOperandsTo(BufferFormatter* f) const; 2231 virtual void PrintOperandsTo(BufferFormatter* f) const;
2235 2232
2236 virtual bool CanDeoptimize() const { return false; } 2233 virtual bool CanDeoptimize() const { return false; }
2237 2234
2238 virtual bool HasSideEffect() const { return false; } 2235 virtual bool HasSideEffect() const { return false; }
2239 2236
2240 virtual bool AttributesEqual(Instruction* other) const; 2237 virtual bool AttributesEqual(Instruction* other) const;
2241 virtual bool AffectedBySideEffect() const { return false; } 2238 virtual bool AffectedBySideEffect() const { return false; }
2242 2239
2243 virtual Definition* Canonicalize(); 2240 virtual Definition* Canonicalize();
2244 2241
2245 virtual intptr_t ResultCid() const { return kBoolCid; } 2242 virtual intptr_t ResultCid() const { return kBoolCid; }
2246 2243
2247 virtual void EmitBranchCode(FlowGraphCompiler* compiler, 2244 virtual void EmitBranchCode(FlowGraphCompiler* compiler,
2248 BranchInstr* branch); 2245 BranchInstr* branch);
2249 2246
2247 bool needs_number_check() const { return needs_number_check_; }
2248 void set_needs_number_check(bool value) { needs_number_check_ = value; }
2249
2250 private: 2250 private:
2251 // True if the comparison must check for double, Mint or Bigint and
2252 // use value comparison instead.
2253 bool needs_number_check_;
2254
2251 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr); 2255 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr);
2252 }; 2256 };
2253 2257
2254 2258
2255 class EqualityCompareInstr : public ComparisonInstr { 2259 class EqualityCompareInstr : public ComparisonInstr {
2256 public: 2260 public:
2257 EqualityCompareInstr(intptr_t token_pos, 2261 EqualityCompareInstr(intptr_t token_pos,
2258 Token::Kind kind, 2262 Token::Kind kind,
2259 Value* left, 2263 Value* left,
2260 Value* right) 2264 Value* right)
(...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 ForwardInstructionIterator* current_iterator_; 4279 ForwardInstructionIterator* current_iterator_;
4276 4280
4277 private: 4281 private:
4278 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4282 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4279 }; 4283 };
4280 4284
4281 4285
4282 } // namespace dart 4286 } // namespace dart
4283 4287
4284 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4288 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698